You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importosfromament_index_python.packagesimportget_package_share_directoryfromlaunchimportLaunchDescriptionfromlaunch_ros.actionsimportNodeimportlaunch################### user configure parameters for ros2 start ###################xfer_format=1# 0-Pointcloud2(PointXYZRTL), 1-customized pointcloud formatmulti_topic=0# 0-All LiDARs share the same topic, 1-One LiDAR one topicdata_src=0# 0-lidar, others-Invalid data srcpublish_freq=10.0# freqency of publish, 5.0, 10.0, 20.0, 50.0, etc.output_type=0frame_id='livox_frame'lvx_file_path='/home/livox/livox_test.lvx'cmdline_bd_code='<bd_code>'cur_path=os.path.split(os.path.realpath(__file__))[0] +'/'cur_config_path=cur_path+'../config'user_config_path=os.path.join(cur_config_path, 'HORIZON_config.json')
################### user configure parameters for ros2 end #####################livox_ros2_params= [
{"xfer_format": xfer_format},
{"multi_topic": multi_topic},
{"data_src": data_src},
{"publish_freq": publish_freq},
{"output_data_type": output_type},
{"frame_id": frame_id},
{"lvx_file_path": lvx_file_path},
{"user_config_path": user_config_path},
{"cmdline_input_bd_code": cmdline_bd_code}
]
defgenerate_launch_description():
livox_driver=Node(
package='livox_ros_driver2',
executable='livox_ros_driver2_node',
name='livox_lidar_publisher',
output='screen',
parameters=livox_ros2_params
)
returnLaunchDescription([
livox_driver,
])
result:
$ ros2 launch livox_ros_driver2 msg_HORIZON_launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2024-04-25-17-22-54-400569-ansan-ppl-vueron-141435
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [livox_ros_driver2_node-1]: process started with pid [141437]
[livox_ros_driver2_node-1] [INFO] [1714033374.457089543] [livox_lidar_publisher]: Livox Ros Driver2 Version: 1.0.0
[livox_ros_driver2_node-1] [INFO] [1714033374.457433843] [livox_lidar_publisher]: Data Source is raw lidar.
[livox_ros_driver2_node-1] [INFO] [1714033374.457447643] [livox_lidar_publisher]: Config file : /home/user/Workspace/ws_livox2/install/livox_ros_driver2/share/livox_ros_driver2/launch_ROS2/../config/HORIZON_config.json
[livox_ros_driver2_node-1] LdsLidar *GetInstance
[livox_ros_driver2_node-1] config lidar type: 1
[livox_ros_driver2_node-1] [INFO] [1714033374.458125043] [livox_lidar_publisher]: Init lds lidar success!
$ ros2 node list
/livox_lidar_publisher
$ ros2 topic list
/parameter_events
/rosout
After the message "Init lds lidar success!" is displayed, no further messages appear, and although the node is confirmed in the node list, nothing can be found in the topic list.
I need your help.
The text was updated successfully, but these errors were encountered:
As far as I can remember, Horizon doesn't need a complex config file
If you are using ROS2, the static library of SDK1 needs to be changed to a dynamic library
Workaround: Delete or rename liblivox_sdk_static.a under /usr/local/lib (for example, liblivox_sdk_static.a.ak) and then run colcon build
The ros2 driver will automatically compile the dynamic library and pass the compilation.
Your host needs to be in the same static network segment as the LiDAR
Livox Horizon ip: 172.16.1.30
Host PC ip: 172.16.1.245
HORIZON_config.json
msg_HORIZON_launch.py
result:
After the message "Init lds lidar success!" is displayed, no further messages appear, and although the node is confirmed in the node list, nothing can be found in the topic list.
I need your help.
The text was updated successfully, but these errors were encountered: