watonomous.github.io

  1. Electrical Division
  2. Electrical Division Home
  3. Sensor Interfacing Group
  4. Lidar Setup

[ Electrical Division : Lidar Drivers ]

Created by [ Rowan Dempster], last modified by [ Rohit Kochhar] on Mar 23, 2020

Note that before launching any drivers, the networking for the LiDAR must be setup correctly, so please read that information first.

VLP-32

What to do:

  1. `cd /home/autodrive/integration`. The integration folder in the home directory is where we keep the crystal rugged's (the car's computer) catkin workspace. If you don't know what a catkin workspace is, read some ROS tutorials!
  2. source ./devel/setup.bash. Again if you don't know what this does, ROS tutorials. 
  3. To launch, run roslaunch velodyne_pointcloud VLP-32C_points.launch device_ip:=169.254.0.103 port:=2370 frame_id:=vlp3_link ns:=vlp3

This will launch the VLP32 driver with the right networking & ROS parameters.

Again, if the namespaces are not working ensure that the parameter is exposed in the relevant launch file.

What should happen then:

  1. The LiDAR driver nodes will launch, start collecting point clouds over the network, and publishing them in ROS messages.
  2. You can view the ROS messages being sent using RViz (read some RViz tutorials), or simply by doing rostopic echo /velodyne_points. If you don't know what rostopic echo does, read some ROS tutorials!

Parameter Explanations
The required networking configuration is discussed in the LiDAR Networking page. The frame_id is important for setting up the transform tree while the namespace parameter is important for distinguishing between multiple LiDARs easily. However, we are no longer using three LiDARs, so the namespace parameter is not as important as it was before. These parameters are passed to the launch file which gives them to the underlying ROS driver. The frame ID is used to give a separate base reference (fixed) frame for the LiDAR point cloud. This will be useful for having a separate positional transform for the LiDAR to a single origin. When viewing the pointcloud in rviz, this is what you should set the Fixed Frame parameter to be in the top.

\

[ [--------------------Multiple LiDARS (ARCHIVED)-------------------]{.inline-comment-marker data-ref=”574f33f3-1e1e-4629-acba-51c83aa89bde”}]{.inline-comment-marker data-ref=”a4311a63-9ef3-47ed-b222-99925f8b05af”}

\

[The namespace parameters let each driver launch (and publish all data) entirely inside its own namespace, meaning each LiDAR's data is nicely segmented and doesn't overlap with other LiDARS. If the namespace is not used, each LiDAR driver would publish to the same topic at varying freqs with different amount of data, causing alot of problems. The following picture shows the list of active topics when all 3 LiDARs are running, and the command to launch the 2nd LiDAR.]{.inline-comment-marker data-ref=”a4311a63-9ef3-47ed-b222-99925f8b05af”}

[{.confluence-embedded-image .confluence-external-resource}]


[[Notice the list of topics, the namespaces vlp1, vlp2, vlp3 are displayed first in the topic and are used to index between multiple LiDARs. For each topic the LiDAR driver creates, we have 3 under 3 different namespaces in this example. Also notice the command at the bottom, it is the same launch file but with the networking & driver parameters tweaked to meet the requirements for the 2nd VLP16 roof LiDAR.]{.inline-comment-marker data-ref=”a4311a63-9ef3-47ed-b222-99925f8b05af”}]

\

If its not working
One important side note is that the ns parameter needed to be exposed in the launch file, meaning a code change was required. If it is not working, double check you are in the right repo (~/integration/...), and that the value is exposed in the launch file. Otherwise the launch file won't look for a ns parameter and the driver will launch without it.

\

Document generated by Confluence on Nov 28, 2021 22:40

Atlassian