Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use two VLP16( velodyne) with just one computer at a same time #108

Closed
JeongJae0815 opened this issue Oct 7, 2016 · 38 comments
Closed
Assignees
Labels

Comments

@JeongJae0815
Copy link

JeongJae0815 commented Oct 7, 2016

Hey,

I have two VPL16 velodyne laser scanners and I connected using a switch to my computer.

I fixed first VPL 16's IP to 192.168.1.201 and second VPL's IP to 192.168.1.202 using Web GUI

and then I ran the velodyne package; roslaunch velodyne_pointcloud VLP16_points2_2.launch

here is the code of VLP16_points2_2.launch

<launch>

<group ns="ns1">

  <!-- declare arguments with default values -->

  <arg name="pcap" default="" />

  <arg name="calibration" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>

  <arg name="min_range" default="0.4" />

  <arg name="max_range" default="130.0" />

    <arg name="device_ip" default="192.168.1.201" />


  <!-- start nodelet manager and driver nodelets -->

  <include file="$(find velodyne_driver)/launch/nodelet_manager.launch">

    <arg name="model" value="VLP16"/>

    <arg name="device_ip" value="$(arg device_ip)" />

    <arg name="pcap" value="$(arg pcap)"/>

  </include>

  <!-- start cloud nodelet -->

  <include file="$(find velodyne_pointcloud)/launch/cloud_nodelet.launch">

    <arg name="calibration" value="$(arg calibration)"/>

    <arg name="min_range" value="$(arg min_range)"/>

    <arg name="max_range" value="$(arg max_range)"/>

  </include>

</group>

<group ns="ns2">

  <!-- declare arguments with default values -->

  <arg name="pcap" default="" />

  <arg name="calibration" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>

  <arg name="min_range" default="0.4" />

  <arg name="max_range" default="130.0" />

  <arg name="device_ip" default="192.168.1.202" />


  <!-- start nodelet manager and driver nodelets -->

  <include file="$(find velodyne_driver)/launch/nodelet_manager.launch">

    <arg name="model" value="VLP16"/>

    <arg name="device_ip" value="$(arg device_ip)" />

    <arg name="pcap" value="$(arg pcap)"/>

  </include>

  <!-- start cloud nodelet -->

  <include file="$(find velodyne_pointcloud)/launch/cloud_nodelet.launch">

    <arg name="calibration" value="$(arg calibration)"/>

    <arg name="min_range" value="$(arg min_range)"/>

    <arg name="max_range" value="$(arg max_range)"/>

  </include>

</group>

</launch>

However, I just can get only one topic which has combined data of two sensors Another topic is just empty Is there anything that I gotta do to get both of data?

Thank you in a advance I really appreciate your kind

@jack-oquin
Copy link
Member

I believe there is a bug in velodyne_driver/launch/nodelet_manager.launch: it unconditionally creates the nodelet manager process with the fixed name velodyne_nodelet_manager.

What it should do is create $(arg frame_id)_nodelet_manager. Then they'll have different names if they have different TF frame IDs (which they must, anyway).

@JeongJae0815
Copy link
Author

JeongJae0815 commented Oct 9, 2016

I really appreciate your kind.
I saw the codes that you changed :)
I modified my source as you saying
please refer to VLP16_points_multi.launch
Is there nothing what I gotta do to use two velodynes?
Actually I'm in ROSCON, so I couldn't check that the code works.
Thank you in advance

@JeongJae0815
Copy link
Author

JeongJae0815 commented Oct 9, 2016

By the way, should I change <arg name="model" default="64E /> to <arg name="model" default="VLP16" /> in velodyne_driver/launch/nodelet_manager.launch
As you know, I'm using VLP16
Actually I did, but I just wanna know whether it is right or not.

@jack-oquin
Copy link
Member

jack-oquin commented Oct 9, 2016

Yes, you need to use the correct model parameter. You can use the VLP16_points.launch script, which sets it for you..

This new test script is an example of what you can do (ignore the <test> stanzas). Although that test passes, it does not prove that the correct data get sent to the correct topic. I think it probably works, and it does prove that something tests sent to the correct topics.

It uses two different device models to get more test coverage, but two or more VLP-16 devices would work similarly.

Have fun at ROSCon! Wish I could be there.

@jack-oquin
Copy link
Member

Please post a comment here when you get a chance to test this fix, whatever the results.

@JeongJae0815
Copy link
Author

JeongJae0815 commented Oct 9, 2016

Of course, I'll let you know the reaults. Maybe 8 hours later
Let's keep in touch!

@JeongJae0815
Copy link
Author

JeongJae0815 commented Oct 10, 2016

okay, Let me tell you something.
First, I excuted "rostest velodyne_pointcloud two_nodelet_manager.test", but the result is just 'failure'
Second, I made two new lauch files which are VLP16_points1.launch, VLP16_points2.launch
when I excute each of them separately, It gives me correct data each of them. I mean I can get not combined data with another
However, when I excute both of files at a same, the result just gives me only one data which started executing before another VLP16, and I can see "bind: Address already in use"
I really don't know What should I do.

I really appreciate your kind :)

@jack-oquin
Copy link
Member

First, I excuted "rostest velodyne_pointcloud two_nodelet_manager.test", but the result is just 'failure'

The test name as an "s" before the dot. This works for me:

$ rostest velodyne_pointcloud two_nodelet_managers.test
... logging to /home/joq/.ros/log/rostest-iron-19022.log
[ROSUNIT] Outputting test results to /home/joq/.ros/test_results/velodyne_pointcloud/rostest-tests_two_nodelet_managers.xml
testmulti_nodelet_32e_test ... ok
testmulti_nodelet_vlp16_test ... ok

[ROSTEST]-----------------------------------------------------------------------

[velodyne_pointcloud.rosunit-multi_nodelet_32e_test/test_hz][passed]
[velodyne_pointcloud.rosunit-multi_nodelet_vlp16_test/test_hz][passed]

SUMMARY
 * RESULT: SUCCESS
 * TESTS: 2
 * ERRORS: 0
 * FAILURES: 0

rostest log file is in /home/joq/.ros/log/rostest-iron-19022.log

I can also launch it with roslaunch and observe the two output topics.

However, those unit tests depend on having previously run make tests to download the required PCAP files. Maybe that's your problem.

@jack-oquin
Copy link
Member

Second, I made two new lauch files which are VLP16_points1.launch, VLP16_points2.launch
when I excute each of them separately, It gives me correct data each of them. I mean I can get not combined data with another
However, when I excute both of files at a same, the result just gives me only one data which started executing before another VLP16, and I can see "bind: Address already in use"

I wonder if we need to specify a different port number for the second device?

I lack access to the hardware needed for trying that myself.

@trainman419
Copy link

When I've worked with multiple VLP-16s in the past, I've needed to specify a separate port number for each sensor. If both sensors use the the same port, a process listening on that port will receive all packets from both sensors.

@jack-oquin
Copy link
Member

Thanks @trainman419, that's what I suspected!

@jack-oquin
Copy link
Member

This is complicated enough to need a tutorial explaining how to do it.

@JeongJae0815
Copy link
Author

JeongJae0815 commented Oct 19, 2016

I changed my code as you said,so I could see that it works.
I changed port of each velodynes using web, and then changed port number on VLP16.launch file
I Really Thank @jack-oquin, @trainman419 for your kind!

@jack-oquin
Copy link
Member

Glad it's working now. I am sure others will benefit from your efforts.

@jack-oquin
Copy link
Member

The fix for this issue fails when the frame_id contains a slash, as may happen when using tf_prefix.

@jack-oquin jack-oquin reopened this Nov 3, 2016
@alexwhittemore
Copy link

This has been super helpful, thank you all for taking the time! (Aside: my biggest problem was that both LIDARs were using the same UDP port, which is an issue despite that both are on different physical interfaces and different subnets.)

But now I've got a related but not identical issue: after following in your footsteps, I've got two VLP-16s publishing pointclouds on the topic /velodyne_pointcloud in two separate frames. But I believe for my application (cartographer_ros) that I need them publishing in two separate topics. It's unclear to me that there's anywhere not hardcoded in source to configure this per nodelet manager? Has anyone else run into and satisfied this requirement?

amc-nu added a commit to CPFL/velodyne that referenced this issue Feb 15, 2018
commit 38e313e
Merge: b311237 d66c729
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Fri Jan 26 00:05:03 2018 -0600

    Merge pull request ros-drivers#136 from stsundermann/patch-1

    Use std::abs instead of abs

commit b311237
Author: Kyle Rector <krector@autonomoustuff.com>
Date:   Fri Jan 5 11:20:09 2018 -0600

    Adding missing 32C configuration file.

commit e306deb
Merge: 67fbaa5 bf8f4d7
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Fri Jan 5 08:57:36 2018 -0600

    Merge pull request ros-drivers#139 from ASDeveloper00/vlp32

    Adding support for VLP-32C.

commit bf8f4d7
Author: Autonomoustuff Developer <developer@autonomoustuff.com>
Date:   Thu Jan 4 17:58:14 2018 -0500

    removed config file

commit 2966518
Author: AutonomouStuff Developer <developer@autonomoustuff.com>
Date:   Thu Jan 4 16:17:48 2018 -0500

    change readme

commit 6281d25
Author: kennouni <ennounikamal@gmail.com>
Date:   Thu Jan 4 08:30:31 2018 -0500

    initial commit

commit 67fbaa5
Merge: f8c6e82 fe3add7
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Wed Jan 3 00:17:18 2018 -0600

    Merge pull request ros-drivers#138 from volkandre/cut_at_specified_angle_feature

    Cut at specified angle feature

commit fe3add7
Author: Andre Volk <avolk@gmx.com>
Date:   Fri Dec 29 11:08:18 2017 -0500

    Updated default cut_angle parameters in launch files after switching from deg to rad.

commit 4323df4
Author: Andre Volk <avolk@gmx.com>
Date:   Fri Dec 29 10:52:51 2017 -0500

    cut_angle parameter is now in rad according to REP 103

commit d66c729
Author: Stephan Sundermann <stephansundermann@gmail.com>
Date:   Tue Dec 12 12:03:08 2017 +0100

    Use std::abs instead of abs

    abs is the c version which returns an integer. This is probably not intended here, so use the templated std::abs function.

commit f2f168c
Author: Andre Volk <avolk@gmx.com>
Date:   Mon Dec 4 18:09:16 2017 -0500

    Fixed timestamp related bug found by @cfneuhaus, which was described here: ros-drivers#126 (comment)

commit bb8401b
Merge: 4800414 7fde5de
Author: Andre Volk <avolk@gmx.com>
Date:   Mon Dec 4 15:57:38 2017 -0500

    Merge branch 'cut_at_specified_angle_feature' of https://github.com/volkandre/velodyne into cut_at_specified_angle_feature

commit 4800414
Merge: cb8898d f8c6e82
Author: Andre Volk <avolk@gmx.com>
Date:   Mon Dec 4 15:51:59 2017 -0500

    Updated branch from ros-drivers/master and resolved conflicts.

commit 7fde5de
Merge: cb8898d f8c6e82
Author: Andre Volk <avolk@gmx.com>
Date:   Mon Dec 4 15:51:59 2017 -0500

    Updated branch from ros-drivers master and resolved conflicts.

commit f8c6e82
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Fri Nov 10 15:10:12 2017 -0600

    Bumping version.

commit d17e252
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Fri Nov 10 15:05:09 2017 -0600

    Testing removing single quotes in changelog.

commit 722b849
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Fri Nov 10 14:58:13 2017 -0600

    Updating change logs for release.

commit 8e999eb
Merge: 78ee547 f40555d
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Mon Nov 6 17:22:39 2017 -0600

    Merge pull request ros-drivers#110 from kmhallen/master

    Added velodyne_laserscan package

commit f40555d
Merge: 269e83c 78ee547
Author: Micho Radovnikovich <mradov@gmail.com>
Date:   Mon Nov 6 15:38:20 2017 -0500

    Merge remote-tracking branch 'ros-drivers/master'

commit 78ee547
Merge: 76be2be cccc138
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Mon Nov 6 10:33:44 2017 -0600

    Merge pull request ros-drivers#129 from kmhallen/pluginlib_macro

    Modern pluginlib macro

commit cccc138
Author: Kevin Hallenbeck <khallenbeck@dataspeedinc.com>
Date:   Wed Nov 1 18:12:23 2017 -0400

    Update to use non deprecated pluginlib macro

commit 76be2be
Merge: 3747e93 462c809
Author: Joshua Whitley <jwhitley@autonomoustuff.com>
Date:   Wed Oct 18 13:40:37 2017 -0500

    Merge pull request ros-drivers#127 from swri-robotics/add_vlp16_hires_support

    Add VLP16 Puck Hi-Res config file

commit 269e83c
Author: Kevin Hallenbeck <khallenbeck@dataspeedinc.com>
Date:   Wed Oct 11 22:50:09 2017 -0400

    Added tests for velodyne_laserscan

commit 345820e
Author: Kevin Hallenbeck <khallenbeck@dataspeedinc.com>
Date:   Wed Oct 11 21:44:58 2017 -0400

    Fixed validating PointCloud2 field types

commit d6fce8b
Author: Kevin Hallenbeck <khallenbeck@dataspeedinc.com>
Date:   Wed Oct 11 21:39:24 2017 -0400

    Package.xml format version 2

commit 7b7be3c
Merge: d678c87 00f407e
Author: kmhallen <khallenbeck@dataspeedinc.com>
Date:   Sat Sep 30 19:11:30 2017 -0400

    Merge pull request #1 from volkandre/master

    Fixed bug. Laserscans now cover full 360 degrees.

commit 462c809
Author: Kris Kozak <kkozak@swri.org>
Date:   Thu Sep 28 18:24:41 2017 -0500

    Add VLP16 Puck Hi-Res support

commit cb8898d
Merge: 6c0f6b0 3747e93
Author: Andre Volk <avolk@gmx.com>
Date:   Thu Sep 28 11:22:35 2017 -0400

    Updated cut_at_specified_angle_feature with latest master version.

commit 00f407e
Author: volkandre <volk.andre@gmail.com>
Date:   Thu Sep 28 09:55:03 2017 -0400

    Fixed bug. Laserscans now cover full 360 degrees.

commit 3747e93
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed Apr 19 11:02:14 2017 -0500

    velodyne_pointcloud: remove incorrect catkin_package() DEPENDS option (ros-drivers#93)

    This eliminates a CMake warning when building on Xenial.

commit e263b80
Merge: ed6e94b e6560cc
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Dec 20 09:41:35 2016 -0600

    Merge pull request ros-drivers#111 from OrebroUniversity/master

    Added an interface to set up raw data processing offline

commit e6560cc
Author: Todor Stoyanov <todor.stoyanov@oru.se>
Date:   Tue Dec 20 15:38:16 2016 +0100

    Added an interface to set up raw data processing from a locally defined calibration file. This method is useful when processing data offline from a bag file, without starting any ros master

commit d678c87
Author: Kevin Hallenbeck <khallenbeck@dataspeedinc.com>
Date:   Wed Dec 7 19:01:21 2016 -0500

    Added velodyne_laserscan package and inserted into existing launch files

commit ed6e94b
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sun Oct 9 11:14:20 2016 -0500

    test multiple nodelet manager support (ros-drivers#108)

commit 4d0d71f
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sat Oct 8 15:02:07 2016 -0500

    add launch args to support multiple devices (ros-drivers#108)

commit 611df63
Merge: d8b0c2f 2495c8f
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Thu Oct 6 14:25:24 2016 -0500

    Merge pull request ros-drivers#101 from teosnare/master

    velodyne_driver/src/lib/input.cc : fix for device_ip filter

commit d8b0c2f
Merge: 34d1dad e3d7e74
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Sep 20 17:29:31 2016 -0500

    Merge pull request ros-drivers#105 from fudger/patch-1

    Remove unused constants.

commit 34d1dad
Merge: 109a51f 0b03832
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Fri Aug 26 17:39:39 2016 -0500

    Merge pull request ros-drivers#104 from altrouge/launch_options

    Add more options in launch files.

commit 0b03832
Author: Daniel Jartoux <daniel.jartoux@navya-technology.com>
Date:   Tue Aug 16 15:56:50 2016 +0200

    Rearranged alphabetically.

commit e3d7e74
Author: Alexander Schaefer <fudger@users.noreply.github.com>
Date:   Tue Aug 16 08:47:19 2016 +0200

    Remove unused constants.

    DISTANCE_MAX and DISTANCE_MAX_UNITS are not used anywhere in the code.

    Furthermore, using them would lead to errors as both VLP-64 manuals state that returns above 120 m should not be used. The VLP-32 manual allows 70 m as the maximum valid sensor range.

commit 109a51f
Merge: 374e19d 3a19dcc
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Mon Aug 15 09:29:51 2016 -0500

    Merge pull request ros-drivers#103 from fudger/patch-1

    Fix misleading typecasts.

commit 26c24ef
Author: Daniel Jartoux <daniel.jartoux@navya-technology.com>
Date:   Thu Aug 11 17:35:21 2016 +0200

    Add more options in launch files.

    - rpm, device_ip, port, read_once, read_fast, repeat_delay

commit 3a19dcc
Author: Alexander Schaefer <fudger@users.noreply.github.com>
Date:   Thu Aug 11 16:03:42 2016 +0200

    Fix misleading typecasts.

    intensity and VPoint::intensity are both of type float.

commit 2495c8f
Author: Matteo Murtas <m.murtas.radionav@gmail.com>
Date:   Tue Aug 9 17:40:12 2016 +0200

    velodyne_driver/src/lib/input.cc : fix for device_ip filter

    Fix for device_ip filter in InputSocket: initialization of devip_ for correct ip filtering in InputSocket::getPacket.

commit 374e19d
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Jul 5 09:09:35 2016 -0500

    velodyne_driver: credit @priyankadey for VLP-16 bug fix (ros-drivers#96)

commit 2095ee3
Merge: f85ab35 58040a0
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sun Jul 3 11:45:09 2016 -0500

    Merge pull request ros-drivers#96 from priyankadey/master

    updated VLP-16 packet rate from user manual.

commit 58040a0
Author: Priyanka Dey <priyanka@aurobots.com>
Date:   Thu Jun 30 19:59:53 2016 -0800

    updated VLP-16 packet rate from user manual.
    Also verified with sensor. It reduced overlap in the pointcloud

commit f85ab35
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed Jun 29 21:43:48 2016 -0500

    update change history

commit 78fa227
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Fri Jun 17 17:35:32 2016 -0500

    update README for Kinetic (ros-drivers#93)

commit 618a73a
Merge: 2887506 075cb76
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed Jun 15 21:17:48 2016 -0500

    Merge pull request ros-drivers#94 from ros-drivers/pcap_port

    velodyne_driver: use port number for PCAP data (ros-drivers#46, ros-drivers#66)

commit 075cb76
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed Jun 15 20:56:28 2016 -0500

    fix g++ 5.3.1 compile errors (ros-drivers#94)

commit f2bfe50
Merge: f3b19fd 2887506
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed Jun 15 19:48:00 2016 -0500

    merge current master (ros-drivers#94)

commit 2887506
Merge: b8e8faa 252615c
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Thu Jun 2 20:58:20 2016 -0500

    Merge pull request ros-drivers#92 from adasta/master

    GCC Build Warnings

commit 252615c
Author: Adam Stambler <stambler@nearearthautonomy.com>
Date:   Thu Jun 2 16:58:10 2016 -0400

    Modified velodyne_point_cloud/src/lib/rawdata.cc to address warning
    that last_azimuth_diff variable may be used uninitialized.  Variable
    is now initialized to 0 at creation.

    velodyne/velodyne_pointcloud/src/lib/rawdata.cc:328:57: error: ‘last_azimuth_diff’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
               azimuth_corrected_f = azimuth + (azimuth_diff * ((dsr*VLP16_DSR_TOFFSET) + (firing*VLP16_FIRING_TOFFSET)) / VLP16_BLOCK_TDURATION);

commit 00db43d
Author: Adam Stambler <stambler@nearearthautonomy.com>
Date:   Thu Jun 2 16:56:51 2016 -0400

    Modified  velodyne_pointcloud/src/conversion/colors.cc to remove
    address build warning for strict-aliasing.

    velodyne/velodyne_pointcloud/src/conversions/colors.cc:84:58:
     error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
             p.rgb = *reinterpret_cast<float*>(&rainbow[color]);
                                                              ^

commit b8e8faa
Merge: bd05bf4 8ca4f47
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed May 25 18:40:29 2016 -0500

    Merge pull request ros-drivers#91 from chukcha2/master

    update velodyne_driver package description to include all models

commit 8ca4f47
Author: Ilya <ilya@example.com>
Date:   Wed May 25 18:50:07 2016 -0400

    update velodyne_driver package description to include all models

commit bd05bf4
Merge: 893bdcb ed051a8
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed May 25 16:49:30 2016 -0500

    Merge pull request ros-drivers#89 from Tones29/feat_dynrec_driver

    Add dynamic latency configuration to velodyne_driver

commit ed051a8
Author: Andreas Wachaja <wachaja@informatik.uni-freiburg.de>
Date:   Fri Apr 22 13:54:20 2016 +0200

    velodyne_driver: Add dynamic_reconfigure and time_offset correction

    The value of time_offset is added to the calculated time stamp in live mode for each packet.

commit 094db69
Author: Andreas Wachaja <wachaja@informatik.uni-freiburg.de>
Date:   Fri Apr 22 13:51:11 2016 +0200

    velodyne_driver: Make input destructors virtual

commit 5e4a52e
Author: Andreas Wachaja <wachaja@informatik.uni-freiburg.de>
Date:   Wed Apr 20 11:31:21 2016 +0200

    velodyne_pointcloud: Fix compile warning "Wrong initialization order"

commit 893bdcb
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Apr 12 16:24:34 2016 -0500

    velodyne_pointcloud: add dynamic reconfig update to change log (ros-drivers#78)

commit c434f43
Merge: 14d0241 76e5f85
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Apr 12 16:18:17 2016 -0500

    Merge branch 'fudger-reconfigure_transform_node'

commit 76e5f85
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Apr 12 16:14:36 2016 -0500

    velodyne_pointcloud: use recommended add_dependencies() CMake variable ros-drivers#78

commit 196f273
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Apr 12 15:44:26 2016 -0500

    velodyne_pointcloud: fix transform unit tests

    Use tf2_ros static_transform_publisher for more consistent timing (#2)

commit b344cf0
Merge: 14d0241 f7d0ce4
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Apr 12 13:59:41 2016 -0500

    Merge branch 'reconfigure_transform_node' of https://github.com/fudger/velodyne

commit 14d0241
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Fri Mar 25 11:28:33 2016 -0500

    prepare change history for coming Indigo release (ros-drivers#59)

commit 8e58199
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Mar 22 11:49:23 2016 -0500

    calibration: unit test case improvements (ros-drivers#84)

commit 9a5d583
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Mon Mar 21 15:38:34 2016 -0500

    calibration: read all intensities as float, then convert (ros-drivers#84)

commit c3e5178
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Mon Mar 21 11:00:27 2016 -0500

    calibration: add gtest for ros-drivers#84

    This currently fails on 64e_s2.1-sztaki.yaml and on issue_84_float_intensities.yaml.

commit fbe603a
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sun Mar 20 18:42:49 2016 -0500

    calibration: make max_intensity and min_intensity optional (ros-drivers#84)

    This fixes a regression in the 32e and VLP-16 calibrations which do not contain
    intensity values. There is still a problem with the 64e_s2.1 calibration.

commit 71d6ec2
Merge: 3fc2d20 3df0861
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Fri Mar 18 21:39:13 2016 -0500

    Merge pull request ros-drivers#76 from pomerlef/master

    Sign inversion in some equations

commit 3fc2d20
Merge: f896e22 594d0be
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sat Mar 12 11:00:50 2016 -0600

    Merge pull request ros-drivers#82 from ros-drivers/fix_pr_80

    Fix pr 80; adding travis CI tests.

commit 594d0be
Author: William Woodall <william@osrfoundation.org>
Date:   Fri Mar 11 19:48:17 2016 -0800

    fix test_results call

commit f3f1fde
Author: William Woodall <william@osrfoundation.org>
Date:   Fri Mar 11 19:35:03 2016 -0800

    try to fixup travis-ci

commit 0b82b20
Author: William Woodall <william@osrfoundation.org>
Date:   Fri Mar 11 18:51:18 2016 -0800

    fix the yaml-cpp 0.5 code paths

commit 5b1eced
Author: William Woodall <william@osrfoundation.org>
Date:   Fri Mar 11 19:14:38 2016 -0800

    make a build failure stop the next steps

commit bf1592c
Author: William Woodall <william@osrfoundation.org>
Date:   Fri Mar 11 19:04:39 2016 -0800

    add travis pr testing

commit f896e22
Merge: 79c8d82 ccb9a0b
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Fri Mar 11 19:35:30 2016 -0600

    Merge pull request ros-drivers#80 from ros-drivers/fix_yaml_import

    allow floats in min/max_intensity and make horiz_offset_correction optional

commit ccb9a0b
Author: William Woodall <william@osrfoundation.org>
Date:   Tue Mar 8 19:18:21 2016 -0800

    allow horiz_offset_correction to be optional with 0 as default

commit 47df691
Author: William Woodall <william@osrfoundation.org>
Date:   Tue Mar 8 19:17:46 2016 -0800

    allow floats instead of ints in min/max_intensity

commit f7d0ce4
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Mon Feb 22 10:20:55 2016 +0100

    Resolve frame ID name using tf prefix.

commit 95b4691
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Mon Feb 22 09:30:37 2016 +0100

    Improve coding style.

commit 26fface
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Fri Feb 19 19:07:41 2016 +0100

    Set up dynamic reconfiguration for transform_node.

    Previously, transform_node has neither read parameters other than frame_id from the command line nor has it exposed these parameters via dynamic reconfigure. As parameters like max_range and view_width have been initialized to zero, the inconfigurable transform_node has returned an empty point cloud.

    Now, transform_node launches an reconfigure server just as cloud_node. In contrast to cloud_node, transform node exposes another parameter for dynamic reconfiguration: frame_id, i.e. the frame of reference the incoming Velodyne points are transformed to.

commit 80a1494
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Fri Feb 19 18:21:11 2016 +0100

    Add docs to gitignore.

    Documentation tools create this folder that shall not be uploaded to git.

commit 79c8d82
Merge: fd36398 2856180
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Thu Feb 18 15:40:51 2016 -0600

    Merge pull request ros-drivers#77 from fudger/pretty_print

    Fix output of calibration data onto console

commit 2856180
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Thu Feb 18 17:25:34 2016 +0100

    Add a missing space.

commit acce5e1
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Thu Feb 18 12:09:06 2016 +0100

    Fix line that always indicates use of model VLP-16.

commit 796d139
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Wed Feb 17 11:59:40 2016 +0100

    Align console output of calibration data.

commit 03db2fd
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Wed Feb 17 11:58:36 2016 +0100

    Add *.user files to gitignore.

commit 3df0861
Merge: 3f6924e fd36398
Author: pomerlef <f.pomerleau@gmail.com>
Date:   Thu Feb 11 18:11:49 2016 -0500

    Merge branch 'master' of https://github.com/ros-drivers/velodyne

commit 3f6924e
Author: pomerlef <f.pomerleau@gmail.com>
Date:   Thu Feb 11 18:11:21 2016 -0500

    resolve sign error

commit fd36398
Merge: 455721b 597aa91
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Tue Feb 9 09:37:26 2016 -0600

    Merge pull request ros-drivers#73 from fudger/master

    Correct important data type error for VLP-16

commit 597aa91
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Tue Feb 9 16:04:11 2016 +0100

    Fix data type error that distorts the point cloud.

commit 0c235c1
Author: Alexander Schaefer <aschaef@cs.uni-freiburg.de>
Date:   Mon Feb 8 10:55:41 2016 +0100

    Fix and add a few comments.

commit 455721b
Merge: 70a8fae f75228e
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sun Nov 29 10:24:21 2015 -0600

    Merge pull request ros-drivers#68 from jlblancoc/patch-1

    Remove unused variable

commit f75228e
Author: Jose Luis Blanco-Claraco <joseluisblancoc@gmail.com>
Date:   Sun Nov 29 14:47:31 2015 +0100

    Remove unused variable

    I think that `dsr` was unused. See line 317:

    for (int dsr=0; ...

commit f3b19fd
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Fri Nov 20 20:30:07 2015 -0600

    velodyne_driver: use port number for PCAP data (ros-drivers#66)

commit 70a8fae
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Sun Nov 1 13:54:08 2015 -0600

    VLP-16: skip badly formatted data packets (ros-drivers#62, ros-drivers#63)

commit 6c0f6b0
Merge: c05f00e 185e78d
Author: Jack O'Quin <jack.oquin@gmail.com>
Date:   Wed Aug 19 09:56:38 2015 -0500

    Merge branch 'cut_at_specified_angle_feature' of https://github.com/ddillenberger/velodyne

commit 185e78d
Author: Denis Dillenberger <dillenberger@uni-koblenz.de>
Date:   Mon Oct 13 17:01:28 2014 +0200

    cut at specific angle feature
@raskolnikov-reborn
Copy link

remap the topics velodyne_points and velodyne_packets in the cloud_nodelet.launch and nodelet_manager.launch and to $(arg frame_id)_points and $(arg frame_id)_packets. Make sure that you pass along the frame id argument to the respective launch files from velodyne_pointcloud.launch

@alexwhittemore
Copy link

Thanks for coming back with that! I should have updated this with a sample config after I finally sorted it all out. Unfortunately I don't have it on hand anymore :(

@zhang261007
Copy link

thacks a lot !!!

@NTUTian
Copy link

NTUTian commented Jul 24, 2018

I use @JeongJae0815 code and change the port number but when I open it the status still display error.
What did I miss?
Sorry,my English isn't very good.
Thank you in a advance

@JWhitleyWork
Copy link
Contributor

@NTUTian - I am sorry but the maintainers of this repository can not support another repository (like the one from @JeongJae0815). However, the official Velodyne repository should support many Velodynes (my company has tested up to 4 simultaneously). To do this, you must log in to the web interface on each Velodyne and change the IP address and port to something different. If you are using them all on the same switch, they must all be in the same subnet as each other and as the computer which will be connecting to them. I also recommend changing the broadcast IP on each Velodyne to the IP address of the computer that will be connecting to them. So, in summary, for each Velodyne:

  • Change the Velodyne's IP address to something other than the default, but all in the same subnet.
  • Change the Velodyne's port to something other than the default, but different for each Velodyne.
  • Change the Velodyne's Broadcast IP to the IP of the PC.
  • Create separate launch files on the PC with IP addresses and ports that match the Velodyne's IP addresses and ports.

@NTUTian
Copy link

NTUTian commented Jul 25, 2018

Thanks for coming back with that!
I will try it.I will inform you if have any news

@JeongJae0815
Copy link
Author

JeongJae0815 commented Jul 25, 2018

I'm sorry for replying late. I don't know why this mail is cosidered as spam, so I couldn't check this email quickly. Like @JWhitleyAStuff said, the official velodyne repository support many velodynes. For this, You have to access in to the web interface(maybe default setting is 192.168.1.21) and change each of them differently.

@NTUTian
Copy link

NTUTian commented Jul 25, 2018

I changed IP to 192.168.1.201 ,the other is 192.168.1.201 and the data port changed 2364 and 2372 in web .I also changed IP and port in VLP16_points_multi.launch.When I run the source the status is OK but show nothing.
By the way,the Broadcast IP is mean Host IP?
Thanks for all taking time to answer me.

@JeongJae0815
Copy link
Author

you must change ur IP differently like one is 192.16.1.201 the other is 192.168.1.202 and also data port, telemetry port differently.

@NTUTian
Copy link

NTUTian commented Jul 25, 2018

Sorry, I made a typo. I use IP 192.168.1.201 and 192.168.1.202 and port alos, but still show nothing.
Thank for coming back

@JeongJae0815
Copy link
Author

Did you change telementry port? you must change this telementry port.
Can you check the VLP16_points_multi.launch file?
You must reflect the change on this file too.

@NTUTian
Copy link

NTUTian commented Jul 25, 2018

I changed data port and telementry port like this code.
I also changed in web

  <!-- declare arguments with default values -->
  <arg name="calibration" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>
  <arg name="device_ip" default="192.168.1.201" />
  <arg name="frame_id" default="velodyne_first" />
  <arg name="manager" default="$(arg frame_id)_nodelet_manager" />
  <arg name="max_range" default="130.0" />
  <arg name="min_range" default="0.4" />
  <arg name="pcap" default="" />
  <arg name="port" default="2372" />
  <arg name="read_fast" default="false" />
  <arg name="read_once" default="false" />
  <arg name="repeat_delay" default="0.0" />
  <arg name="rpm" default="600.0" />

  <!-- start nodelet manager and driver nodelets -->
  <include file="$(find velodyne_driver)/launch/nodelet_manager.launch">
    <arg name="device_ip" value="$(arg device_ip)"/>
    <arg name="frame_id" value="$(arg frame_id)"/>
    <arg name="manager" value="$(arg manager)" />
    <arg name="model" value="VLP16"/>
    <arg name="pcap" value="$(arg pcap)"/>
    <arg name="port" value="$(arg port)"/>
    <arg name="read_fast" value="$(arg read_fast)"/>
    <arg name="read_once" value="$(arg read_once)"/>
    <arg name="repeat_delay" value="$(arg repeat_delay)"/>
    <arg name="rpm" value="$(arg rpm)"/>
  </include>

  <!-- start cloud nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/cloud_nodelet.launch">
    <arg name="calibration" value="$(arg calibration)"/>
    <arg name="manager" value="$(arg manager)" />
    <arg name="max_range" value="$(arg max_range)"/>
    <arg name="min_range" value="$(arg min_range)"/>
  </include>
</group>

<!-- For Second velodyne -->

<group ns="ns2">
  <!-- declare arguments with default values -->
  <arg name="calibration" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>
  <arg name="device_ip" default="192.168.1.202" />
  <arg name="frame_id" default="velodyne_second" />
  <arg name="manager" default="$(arg frame_id)_nodelet_manager" />
  <arg name="max_range" default="130.0" />
  <arg name="min_range" default="0.4" />
  <arg name="pcap" default="" />
  <arg name="port" default="2364" />
  <arg name="read_fast" default="false" />
  <arg name="read_once" default="false" />
  <arg name="repeat_delay" default="0.0" />
  <arg name="rpm" default="600.0" />

  <!-- start nodelet manager and driver nodelets -->
  <include file="$(find velodyne_driver)/launch/nodelet_manager.launch">
    <arg name="device_ip" value="$(arg device_ip)"/>
    <arg name="frame_id" value="$(arg frame_id)"/>
    <arg name="manager" value="$(arg manager)" />
    <arg name="model" value="VLP16"/>
    <arg name="pcap" value="$(arg pcap)"/>
    <arg name="port" value="$(arg port)"/>
    <arg name="read_fast" value="$(arg read_fast)"/>
    <arg name="read_once" value="$(arg read_once)"/>
    <arg name="repeat_delay" value="$(arg repeat_delay)"/>
    <arg name="rpm" value="$(arg rpm)"/>
  </include>

  <!-- start cloud nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/cloud_nodelet.launch">
    <arg name="calibration" value="$(arg calibration)"/>
    <arg name="manager" value="$(arg manager)" />
    <arg name="max_range" value="$(arg max_range)"/>
    <arg name="min_range" value="$(arg min_range)"/>
  </include>
</group>


</launch>```

@NTUTian
Copy link

NTUTian commented Jul 25, 2018

I can not enter the website I think I lost my address ip .What can I do to find my ip or how to reset it?

@alexwhittemore
Copy link

It's a pain - it's mentioned on page 24 of the web server manual for the VLP-16: http://velodynelidar.com/docs/manuals/63-9266%20REV%20A%20WEBSERVER%20USER%20GUIDE,HDL-32E%20&%20VLP-16.pdf

If you don't know the IP of the sensor, you have to plug it in and start WireShark on the interface. The sensor broadcasts messages whether you want to or not, so the packet capture will show a flood of sensor data on the interface. The IP it's coming from is the one you need to log in to.

@NTUTian
Copy link

NTUTian commented Jul 26, 2018

Thank a lot I get my IP now,

@pavankumarbn
Copy link

Hi, Anybody tried to restrict the laser beam emission time interval in Velodyne puck lite?

@hgrw
Copy link

hgrw commented May 6, 2019

Following the recommendation from @JWhitleyAStuff, I'm including the velodyne_pointcloud launch files in my launch file but am still not able to set up ros topics for two VLP16 running concurrently. One of my ros topics is always empty, corresponding to the last velodyne plugged in. Similarly, I can only log on to one sensor at a time. The error (warning) I'm getting is Velodyne poll() timeout, which suggests a network issue. My settings are:

Sensor 1:
Network Address 192.168.1.201
Network Mask 24
Network Gateway 192.168.1.1
Host Address 192.168.1.100
Data Port 2368
Telemetry Port 8308

Ethernet connection 1 (enp6s0):
Address 192.168.1.100
Mask 24
Gateway 0.0.0.0

Sensor 2:
Network Address 192.168.1.202
Network Mask 24
Network Gateway 192.168.1.2
Host Address 192.168.1.200
Data Port 2268
Telemetry Port 8208

Ethernet connection 2 (enp7s0):
Address 192.168.1.200
Mask 24
Gateway 0.0.0.0

Routes have been added from ethernet interfaces to the host addresses on the sensors and my launch file is below. Note that the commands I used for adding routes, as indicated in the VLP16 setup guide, were:

sudo ifconfig enp6s0 192.168.3.100
sudo route add 192.168.105.5
sudo ifconfig enp6s0 192.168.3.200
sudo route add 192.168.104.14

for my particular MAC addresses. Side note, I am not sure why the guide says to assign a second address to my interfaces (i.e. 3.100 & 3.200).

<launch>

  <!-- calibration file path -->
  <arg name="velodyne_calib" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>

<group ns="vlp_1">

    <!-- VLP-16 front -->
    <include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
      <arg name="calibration" value="$(arg velodyne_calib)"/>
      <arg name="device_ip" value="192.168.1.201"/>
      <arg name="frame_id" value="vlp201"/>
      <arg name="port" value="2368"/>
    </include>
</group>

<group ns="vlp_2">
    <!-- VLP-16 rear -->
    <include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
      <arg name="calibration" value="$(arg velodyne_calib)"/>
      <arg name="device_ip" value="192.168.1.202"/>
      <arg name="frame_id" value="vlp202"/>
      <arg name="port" value="2268"/>
    </include>
</group>

</launch>

@hgrw
Copy link

hgrw commented May 7, 2019

Update. Problem is solved. Correct configuration below.

Sensor 1:
Network Address 192.168.1.201
Network Mask 24
Network Gateway 0.0.0.0
Host Address 192.168.1.100
Data Port 2368
Telemetry Port 8308

Ethernet connection 1 (enp6s0):
Address 192.168.1.100
Mask 24
Gateway 0.0.0.0

Sensor 2:
Network Address 192.168.2.201
Network Mask 24
Network Gateway 0.0.0.0
Host Address 192.168.2.100
Data Port 2268
Telemetry Port 8208

Ethernet connection 2 (enp7s0):
Address 192.168.2.100
Mask 24
Gateway 0.0.0.0

<launch>

  <!-- calibration file path -->
  <arg name="velodyne_calib" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>

<group ns="vlp_1">

    <!-- VLP-16 front -->
    <include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
      <arg name="calibration" value="$(arg velodyne_calib)"/>
      <arg name="device_ip" value="192.168.1.201"/>
      <arg name="frame_id" value="vlp201"/>
      <arg name="port" value="2368"/>
    </include>
</group>

<group ns="vlp_2">
    <!-- VLP-16 rear -->
    <include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
      <arg name="calibration" value="$(arg velodyne_calib)"/>
      <arg name="device_ip" value="192.168.2.201"/>
      <arg name="frame_id" value="vlp202"/>
      <arg name="port" value="2268"/>
    </include>
</group>

</launch>

@dkhanna511
Copy link

dkhanna511 commented Nov 29, 2021

@hroachewilson How did you connect the Lidars to the different ethernet ports (enp6s0 and enp7s0) as stated above? Did you use two systems? I am currently using an ethernet switch hub and am unable to access various ethernet ports.

Any help is much appreciated.

@himhan34
Copy link

hello. first thank you for the nice code sharing. i am also doing the same thing as you do with two vlp 16 lidar

image

after following the thing that you guys done, there was no error, but i cant see mixed point clouds,
is there any ways to see them?

image

my code is exactly like you..

<!-- VLP-16 front -->
<include file="$(find velodyne_pointcloud)/launch/VLP16_points.launch">
  <arg name="calibration" value="$(arg velodyne_calib)"/>
  <arg name="device_ip" value="192.168.1.201"/>
  <arg name="frame_id" value="vlp201"/>
  <arg name="port" value="2368"/>
</include>

can you help me?

@JWhitleyWork
Copy link
Contributor

@himhan34 Please do not bump dead threads like this. Create a new question and mention this issue if you want to reference it.

@himhan34
Copy link

himhan34 commented Oct 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests