如果需要在功能包livox_ros_driver2中的节点livox_ros_driver2_node中同时驱动2台mid360实现数据采集和公布,需要做如下配置:
1.修改/home/xxx/ws_xxx/src/livox_ros_driver2-master/launch_ROS1/msg_MID360.launch文件中:<arg name="multi_topic" default="1"/>,表示配置多个话题。
2.修改/home/xxx/ws_xxx/src/livox_ros_driver2-master/config/MID360_config.json文件,修改后如下:
{
"lidar_summary_info" : {
"lidar_type": 8
},
"MID360": {
"lidar_net_info" : {
"cmd_data_port": 56100,
"push_msg_port": 56200,
"point_data_port": 56300,
"imu_data_port": 56400,
"log_data_port": 56500
},
"host_net_info" : {
"cmd_data_ip" : "192.168.1.10",
"cmd_data_port": 56101,
"push_msg_ip": "192.168.1.10",
"push_msg_port": 56201,
"point_data_ip": "192.168.1.10",
"point_data_port": 56301,
"imu_data_ip" : "192.168.1.10",
"imu_data_port": 56401,
"log_data_ip" : "",
"log_data_port": 56501
}
},
"lidar_configs" : [
{
"ip" : "192.168.1.123",
"pcl_data_type" : 1,
"pattern_mode" : 0,
"extrinsic_parameter" : {
"roll": 0.0,
"pitch": 0.0,
"yaw": 0.0,
"x": 0,
"y": 0,
"z": 0
}
},
{
"ip" : "192.168.1.124",
"pcl_data_type" : 1,
"pattern_mode" : 0,
"extrinsic_parameter" : {
"roll": 0.0,
"pitch": 0.0,
"yaw": 0.0,
"x": 0,
"y": 0,
"z": 0
}
}
]
}
在"lidar_configs" 下面添加了一个mid360雷达的参数。
3.修改完成后,打开终端:
source devel/setup.bash
roslaunch livox_ros_driver2 msg_MID360.launch
启动节点,新建终端,输入:rostopic list ,打印输出每个mid360公布的话题,话题名为:/livox/imu_ip地址和/livox/lidar_ip地址。