Skip to content

Commit 43bb2f4

Browse files
author
louie.xu
committed
update README.md and fix version number
1 parent b6ff7d1 commit 43bb2f4

2 files changed

Lines changed: 185 additions & 2 deletions

File tree

README.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,189 @@ For more infomation about the HAP config, please refer to:
329329
}
330330
]
331331
}
332+
```
333+
3. when multiple nics on the host connect to multiple LiDARs, you need to add objects corresponding to different LiDARs to the lidar_configs array. Run different luanch files separately, and the following is an example of mixing lidar configuration file contents:
334+
335+
**MID360_config1:**
336+
```json
337+
{
338+
"lidar_summary_info" : {
339+
"lidar_type": 8 # protocol type index,please don't revise this value
340+
},
341+
"MID360": {
342+
"lidar_net_info": {
343+
"cmd_data_port": 56100, # command port
344+
"push_msg_port": 56200,
345+
"point_data_port": 56300,
346+
"imu_data_port": 56400,
347+
"log_data_port": 56500
348+
},
349+
"host_net_info": [
350+
{
351+
"lidar_ip": ["192.168.1.100"], # Lidar ip
352+
"host_ip": "192.168.1.5", # host ip
353+
"cmd_data_port": 56101,
354+
"push_msg_port": 56201,
355+
"point_data_port": 56301,
356+
"imu_data_port": 56401,
357+
"log_data_port": 56501
358+
}
359+
]
360+
},
361+
"lidar_configs": [
362+
{
363+
"ip": "192.168.1.100", # ip of the LiDAR you want to config
364+
"pcl_data_type": 1,
365+
"pattern_mode": 0,
366+
"extrinsic_parameter": {
367+
"roll": 0.0,
368+
"pitch": 0.0,
369+
"yaw": 0.0,
370+
"x": 0,
371+
"y": 0,
372+
"z": 0
373+
}
374+
}
375+
]
376+
}
377+
```
378+
**MID360_config2:**
379+
```json
380+
{
381+
"lidar_summary_info" : {
382+
"lidar_type": 8 # protocol type index,please don't revise this value
383+
},
384+
"MID360": {
385+
"lidar_net_info": {
386+
"cmd_data_port": 56100, # command port
387+
"push_msg_port": 56200,
388+
"point_data_port": 56300,
389+
"imu_data_port": 56400,
390+
"log_data_port": 56500
391+
},
392+
"host_net_info": [
393+
{
394+
"lidar_ip": ["192.168.2.100"], # Lidar ip
395+
"host_ip": "192.168.2.5", # host ip
396+
"cmd_data_port": 56101,
397+
"push_msg_port": 56201,
398+
"point_data_port": 56301,
399+
"imu_data_port": 56401,
400+
"log_data_port": 56501
401+
}
402+
]
403+
},
404+
"lidar_configs": [
405+
{
406+
"ip": "192.168.2.100", # ip of the LiDAR you want to config
407+
"pcl_data_type": 1,
408+
"pattern_mode": 0,
409+
"extrinsic_parameter": {
410+
"roll": 0.0,
411+
"pitch": 0.0,
412+
"yaw": 0.0,
413+
"x": 0,
414+
"y": 0,
415+
"z": 0
416+
}
417+
}
418+
]
419+
}
420+
```
421+
**Launch1:**
422+
```
423+
<launch>
424+
<!--user configure parameters for ros start-->
425+
<arg name="lvx_file_path" default="livox_test.lvx"/>
426+
<arg name="bd_list" default="100000000000000"/>
427+
<arg name="xfer_format" default="0"/>
428+
<arg name="multi_topic" default="1"/>
429+
<arg name="data_src" default="0"/>
430+
<arg name="publish_freq" default="10.0"/>
431+
<arg name="output_type" default="0"/>
432+
<arg name="rviz_enable" default="true"/>
433+
<arg name="rosbag_enable" default="false"/>
434+
<arg name="cmdline_arg" default="$(arg bd_list)"/>
435+
<arg name="msg_frame_id" default="livox_frame"/>
436+
<arg name="lidar_bag" default="true"/>
437+
<arg name="imu_bag" default="true"/>
438+
<!--user configure parameters for ros end-->
439+
440+
<param name="xfer_format" value="$(arg xfer_format)"/>
441+
<param name="multi_topic" value="$(arg multi_topic)"/>
442+
<param name="data_src" value="$(arg data_src)"/>
443+
<param name="publish_freq" type="double" value="$(arg publish_freq)"/>
444+
<param name="output_data_type" value="$(arg output_type)"/>
445+
<param name="cmdline_str" type="string" value="$(arg bd_list)"/>
446+
<param name="cmdline_file_path" type="string" value="$(arg lvx_file_path)"/>
447+
<param name="user_config_path" type="string" value="$(find livox_ros_driver2)/config/MID360_config1.json"/> # Mid360 MID360_config1 name
448+
<param name="frame_id" type="string" value="$(arg msg_frame_id)"/>
449+
<param name="enable_lidar_bag" type="bool" value="$(arg lidar_bag)"/>
450+
<param name="enable_imu_bag" type="bool" value="$(arg imu_bag)"/>
451+
452+
<node name="livox_lidar_publisher1" pkg="livox_ros_driver2"
453+
type="livox_ros_driver2_node" required="true"
454+
output="screen" args="$(arg cmdline_arg)"/>
455+
456+
<group if="$(arg rviz_enable)">
457+
<node name="livox_rviz" pkg="rviz" type="rviz" respawn="true"
458+
args="-d $(find livox_ros_driver2)/config/display_point_cloud_ROS1.rviz"/>
459+
</group>
460+
461+
<group if="$(arg rosbag_enable)">
462+
<node pkg="rosbag" type="record" name="record" output="screen"
463+
args="-a"/>
464+
</group>
465+
466+
</launch>
467+
```
468+
**Launch2:**
469+
```
470+
<launch>
471+
<!--user configure parameters for ros start-->
472+
<arg name="lvx_file_path" default="livox_test.lvx"/>
473+
<arg name="bd_list" default="100000000000000"/>
474+
<arg name="xfer_format" default="0"/>
475+
<arg name="multi_topic" default="1"/>
476+
<arg name="data_src" default="0"/>
477+
<arg name="publish_freq" default="10.0"/>
478+
<arg name="output_type" default="0"/>
479+
<arg name="rviz_enable" default="true"/>
480+
<arg name="rosbag_enable" default="false"/>
481+
<arg name="cmdline_arg" default="$(arg bd_list)"/>
482+
<arg name="msg_frame_id" default="livox_frame"/>
483+
<arg name="lidar_bag" default="true"/>
484+
<arg name="imu_bag" default="true"/>
485+
<!--user configure parameters for ros end-->
486+
487+
<param name="xfer_format" value="$(arg xfer_format)"/>
488+
<param name="multi_topic" value="$(arg multi_topic)"/>
489+
<param name="data_src" value="$(arg data_src)"/>
490+
<param name="publish_freq" type="double" value="$(arg publish_freq)"/>
491+
<param name="output_data_type" value="$(arg output_type)"/>
492+
<param name="cmdline_str" type="string" value="$(arg bd_list)"/>
493+
<param name="cmdline_file_path" type="string" value="$(arg lvx_file_path)"/>
494+
<param name="user_config_path" type="string" value="$(find livox_ros_driver2)/config/MID360_config2.json"/> # Mid360 MID360_config2 name
495+
<param name="frame_id" type="string" value="$(arg msg_frame_id)"/>
496+
<param name="enable_lidar_bag" type="bool" value="$(arg lidar_bag)"/>
497+
<param name="enable_imu_bag" type="bool" value="$(arg imu_bag)"/>
498+
499+
<node name="livox_lidar_publisher1" pkg="livox_ros_driver2"
500+
type="livox_ros_driver2_node" required="true"
501+
output="screen" args="$(arg cmdline_arg)"/>
502+
503+
<group if="$(arg rviz_enable)">
504+
<node name="livox_rviz" pkg="rviz" type="rviz" respawn="true"
505+
args="-d $(find livox_ros_driver2)/config/display_point_cloud_ROS1.rviz"/>
506+
</group>
507+
508+
<group if="$(arg rosbag_enable)">
509+
<node pkg="rosbag" type="record" name="record" output="screen"
510+
args="-a"/>
511+
</group>
512+
513+
</launch>
514+
332515
```
333516

334517
## 5. Supported LiDAR list

src/include/livox_ros_driver2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#define LIVOX_ROS_DRIVER2_INClUDE_H_
2727

2828
#define LIVOX_ROS_DRIVER2_VER_MAJOR 1
29-
#define LIVOX_ROS_DRIVER2_VER_MINOR 0
30-
#define LIVOX_ROS_DRIVER2_VER_PATCH 0
29+
#define LIVOX_ROS_DRIVER2_VER_MINOR 2
30+
#define LIVOX_ROS_DRIVER2_VER_PATCH 4
3131

3232
#define GET_STRING(n) GET_STRING_DIRECT(n)
3333
#define GET_STRING_DIRECT(n) #n

0 commit comments

Comments
 (0)