Skip to content

Commit

Permalink
refactor: Modify the readme
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Zhang <hitxfd.tony@gmail.com>
  • Loading branch information
Tony-HIT committed Aug 15, 2018
1 parent e910f92 commit 1618d80
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 23 deletions.
25 changes: 20 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(3) Please also install libpcap-dev.

#### 2. Install
(1). Copy the whole rslidar directory into ROS workspace, i.e "~/catkin_ws/src".
(1). Copy the whole rslidar ROS driver directory into ROS workspace, i.e "~/catkin_ws/src".

(2). Check the file attributes:

Expand All @@ -22,10 +22,10 @@ cd ~/catkin_ws
catkin_make
```
#### 3. Configure PC IP
By default, the RSLIDAR is configured to **192.168.1.200** as its device IP and **192.168.1.102** as PC IP that it would communicate. The default MSOP port is 6699.
By default, the RSLIDAR is configured to **192.168.1.200** as its device IP and **192.168.1.102** as PC IP that it would communicate. The default **MSOP port is 6699** while **DIFOP port is 7788**.
So you need configure your PC IP as a static one **192.168.1.102**.

#### 4. Run and view real time data
#### 4. Run as independent node
We have provide example launch files under rslidar_pointcloud/launch, we can run the launch file to view the point cloud data. For example, if we want to view RS-LiDAR-16 real time data:
(1). Open a new terminal and run:

Expand All @@ -43,10 +43,25 @@ rviz
Set the Fixed Frame to "**rslidar**".
Add a Pointcloud2 type and set the topic to "**rslidar_points**".

#### 5. About the lidar data
Under "**rslidar_pointcloud/data**" directory, you can find the lidar data files for the exact sensor. By default the launch file "rs_lidar_16.launch" load the three files:
#### 5. Run as nodelet
We can also run the driver node and cloud node as a nodelet.
Open a new terminal and run:

```
cd ~/catkin_ws
source devel/setup.bash
roslaunch rslidar_pointcloud cloud_nodelet.launch
```
Then we can run view the pointcloud via "rviz"

#### 6. About the lidar calibration parameters
Under "**rslidar_pointcloud/data**" directory, you can find the lidar calibration parameters files for the exact sensor. By default the launch file "rs_lidar_16.launch" load the three files:
- rslidar_pointcloud/data/rs_lidar_16/angle.csv
- rslidar_pointcloud/data/rs_lidar_16/ChannelNum.csv
- rslidar_pointcloud/data/rs_lidar_16/curves.csv.

If you have more than one RSLIDAR, you can create new sub-directories under the "**rslidar_pointcloud/data/**", and put the data files into it.Then you need rewrite the launch file to start you lidar. We have put an example launch file "two_lidar.launch" to load two lidars together for reference.

**Begin from 2018.09.01**
In the launch file, we could set the MSOP port and DIFOP port.
MSOP port is used for receive the main point cloud data, while DIFOP port is used for receive the device information data. If we set the right DIFOP port, we will get the lidar calibration parameters from the DIFOP packets not from the files, so can ignore the local lidar calibration files. About how to check the DIFOP port, please reference the Appendix G in RS-LiDARR manual.
23 changes: 14 additions & 9 deletions rslidar_pointcloud/launch/rs_lidar_16.launch
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
<launch>
<arg name="model" default="RS16" />
<arg name="device_ip" default="192.168.1.200" />
<arg name="msop_port" default="6699" />
<arg name="difop_port" default="7788" />
<arg name="lidar_param_path" default="$(find rslidar_pointcloud)/data/rs_lidar_16/"/>

<node name="rslidar_node" pkg="rslidar_driver" type="rslidar_node" output="screen" >
<param name="model" value="RS16"/>
<param name="model" value="$(arg model)"/>
<param name="device_ip" value="$(arg device_ip)" />
<param name="msop_port" value="$(arg msop_port)" />
<param name="difop_port" value="$(arg difop_port)"/>
<!--param name="pcap" value="path_to_pcap"/-->
<param name="device_ip" value="192.168.1.200"/>
<!-- Set the Lidar data port on the PC side, default is 6699 -->
<param name="msop_port" value="6699"/>
<param name="difop_port" value="7788"/>
</node>

<node name="cloud_node" pkg="rslidar_pointcloud" type="cloud_node" output="screen" >
<param name="model" value="RS16"/>
<param name="curves_path" value="$(find rslidar_pointcloud)/data/rs_lidar_16/curves.csv" />
<param name="angle_path" value="$(find rslidar_pointcloud)/data/rs_lidar_16/angle.csv" />
<param name="channel_path" value="$(find rslidar_pointcloud)/data/rs_lidar_16/ChannelNum.csv" />
<param name="model" value="$(arg model)"/>
<param name="curves_path" value="$(arg lidar_param_path)/curves.csv" />
<param name="angle_path" value="$(arg lidar_param_path)/angle.csv" />
<param name="channel_path" value="$(arg lidar_param_path)/ChannelNum.csv" />
</node>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rslidar_pointcloud)/rviz_cfg/rslidar.rviz" />
Expand Down
24 changes: 15 additions & 9 deletions rslidar_pointcloud/launch/rs_lidar_32.launch
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<launch>
<arg name="model" default="RS32" />
<arg name="device_ip" default="192.168.1.200" />
<arg name="msop_port" default="6699" />
<arg name="difop_port" default="7788" />
<arg name="lidar_param_path" default="$(find rslidar_pointcloud)/data/rs_lidar_32/"/>

<node name="rslidar_node" pkg="rslidar_driver" type="rslidar_node" output="screen" >
<param name="model" value="RS32"/>
<param name="model" value="$(arg model)"/>
<param name="device_ip" value="$(arg device_ip)" />
<param name="msop_port" value="$(arg msop_port)" />
<param name="difop_port" value="$(arg difop_port)"/>
<!--param name="pcap" value="path_to_pcap"/-->
<!--param name="device_ip" value="192.168.1.200"/-->
<!-- Set the Lidar data port on the PC side, default is 6699 -->
<param name="msop_port" value="6699"/>
</node>

<node name="cloud_node" pkg="rslidar_pointcloud" type="cloud_node" output="screen" >
<param name="model" value="RS32"/>
<param name="curves_path" value="$(find rslidar_pointcloud)/data/rs_lidar_32/curves.csv" />
<param name="angle_path" value="$(find rslidar_pointcloud)/data/rs_lidar_32/angle.csv" />
<param name="channel_path" value="$(find rslidar_pointcloud)/data/rs_lidar_32/ChannelNum.csv" />
<param name="curves_rate_path" value="$(find rslidar_pointcloud)/data/rs_lidar_32/CurveRate.csv" />
<param name="model" value="$(arg model)"/>
<param name="curves_path" value="$(arg lidar_param_path)/curves.csv" />
<param name="angle_path" value="$(arg lidar_param_path)/angle.csv" />
<param name="channel_path" value="$(arg lidar_param_path)/ChannelNum.csv" />
<param name="curves_rate_path" value="$(arg lidar_param_path)/CurveRate.csv" />
</node>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rslidar_pointcloud)/rviz_cfg/rslidar.rviz" />
Expand Down

0 comments on commit 1618d80

Please sign in to comment.