ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How can I use two velodyne(VLP16) together at the same time?

asked 2016-08-25 23:44:44 -0500

Low Frequency gravatar image

updated 2016-08-26 08:34:22 -0500

Hello, I have a question about operating two velodyne laser sensors (VLP 16).

I’m a ROS and Ubuntu beginner. So, even if my question is inexperienced, please understand me and answer as in detail as possible. Thank you in advance.

I use Ubuntu 14.04 and ROS indigo. I’m trying to operate two velodyne laser sensors – VLP 16 simultaneously in one laptop. I designate IP of each sensors as 192.168.1.201 and 192.168.1.202. I fixed my laptop Ethernet IP as 192.168.1.77 to coincide bandwidth(?); I mean the third number of IP address like 192.168.”1”.77. I made two sensors connect to my laptop using hub. I use Velodyne package and modified “VLP16_points.launch” in velodyne_pointcloud folder and “nodelet manager.launch” in velodyne_drvier folder to operate at the same time.

In nodelet_manager.launch of velodyne_driver folder, I attached <arg name=”device_ip” default=”” /> under the source code <arg name=”model” default=”VLP16” /> and <param name=”device_ip” value=”$(arg device_ip)” /> under the source code <arg name=”frame_id” default=”veldyne” />

In VLP16_points.launch of velodyne_pointcloud folder, I made the source code as two group and tried to operate independently. First group is defined <group ns = “ns1”></group> and second group is defined <group ns = “ns2”></group>. The difference of two group’s source code is the only “device_ip”. I defined <arg name = “device_ip” value = “192.168.1.201”/> in first group and <arg name = “device_ip” value = “192.168.1.202”/> in second group. I thought because I designated the IPs differently it had to be implemented independently. But it was not.

I ran VLP16_points.launch and rviz , and topic of Pointcloud2 in rviz was presented /ns1/velodyne_points, /ns2/velodyne_points. As I pick the topic: /ns1/velodyne_points, pointcloud of two VLP16s appear simultaneously with regardless of IP address. I tried changing sensors’ IP and “device_ip” of VLP16_points.launch and nodelet_manager.launch. But regardeless of these change, pointcloud in rviz was appeared at the same time in topic /ns1/velodyne_points which is the topic of first group in VLP16_points.launch. When I pick the topic as /ns2/velodyne_points, no pointcloud appears. The terminal presents “bind: Address already in use” The Notice was not showed when I run only one VLP16. I hope to use the pointcloud independently to apply tf to sensors independently.

There were also other attempts in similar ways like operating two same launches which has “different device_ip”. But it also shows same result.

Thank you for reading this long question.

Have a nice day.

edit retag flag offensive close merge delete

Comments

Hi, I'm trying to use two VLP16 at one computer. I have same problems with you. Did you solve this kind of a problem? If you do that, How did you solve it? Thank you in advance

JeongJae0815 gravatar image JeongJae0815  ( 2016-10-06 12:01:32 -0500 )edit

The Velodynes broadcast, so they are all spamming the same port unless you change it on each device.

EricD gravatar image EricD  ( 2016-12-30 12:20:23 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-08-26 17:47:24 -0500

joq gravatar image

updated 2016-12-31 11:11:22 -0500

I think the problem is running the driver twice in a single velodyne_nodelet_manager process.

We probably ought to incorporate the frame_id into the nodelet manager name name. Please open a github issue to get this resolved.

EDIT: to provide more detail, this command in velodyne_driver/launch/nodelet_manager.launch should be changed:

 <node pkg="nodelet" type="nodelet" name="driver_nodelet"
       args="load velodyne_driver/DriverNodelet velodyne_nodelet_manager" >

Instead of velodyne_nodelet_manager we should call it $(arg frame_id)_nodelet_manager, running the driver for each device in a separate process. Other nodelet loading to velodyne_nodelet_manager should similarly be changed. The node name may also need to be parameterized.

EDIT 2: there was a bug in the provided launch files, now fixed in the master source. See ros-drivers/velodyne#108 for details.

Note that you need to configure the two devices to have different tf frames, IP addresses and UDP port numbers.

edit flag offensive delete link more

Comments

1

[ https://github.com/JohnJungHwanYoo/Mu... ] As I told you before,only a few sources in nodelet_manager.launch and VLP16_points.launch are changed.In my github,VLP16_points.launch is the original launch file,my modified launch file is VLP16_points2.launch

Low Frequency gravatar image Low Frequency  ( 2016-08-29 02:31:57 -0500 )edit

Hi, I'm trying to use two VLP16 at one computer. I have same problems with you. Did you solve this kind of a problem? If you do that, How did you solve it? Thank you in advance

JeongJae0815 gravatar image JeongJae0815  ( 2016-10-06 11:57:48 -0500 )edit

Thank you for your kind answers. As I follow your directions, the sensors work independently! Setting the UDP port numbers was the critical point. I didn't try applying the coordinate problem. But I think I can proceed well. Thank you again!

Low Frequency gravatar image Low Frequency  ( 2017-02-10 03:03:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-25 23:44:44 -0500

Seen: 2,979 times

Last updated: Dec 31 '16