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

I can't run two lidar at the same time #532

Open
Yue-Lun-Li opened this issue Sep 27, 2023 · 3 comments
Open

I can't run two lidar at the same time #532

Yue-Lun-Li opened this issue Sep 27, 2023 · 3 comments
Labels

Comments

@Yue-Lun-Li
Copy link

Yue-Lun-Li commented Sep 27, 2023

Please complete the following information:

  • OS and Version: [e.g. Ubuntu 18.04]
  • ROS Version: [melodic]
  • Built from Source or Downloaded from Official Repository:

I got different IP different RJ45
lidar1 IP:172.20.102.31 port:2368 destination:172.20.102.102
lidar2 IP:172.20.2.32 port:2368 destination:172.20.2.101
I can run run lidar each other, but can't at the same time.
it awlays output
[ WARN] [1695786609.867868744]: Velodyne poll() timeout
[ERROR] [1695786609.867924776]: DriverNodelet::devicePoll - Failed to poll device.

what's problem ?
this is my rosnode list
/rosout
/velodyne_1/velodyne_1_nodelet_manager
/velodyne_1/velodyne_1_nodelet_manager_driver
/velodyne_1/velodyne_1_nodelet_manager_laserscan
/velodyne_1/velodyne_1_nodelet_manager_transform
/velodyne_2/velodyne_2_nodelet_manager
/velodyne_2/velodyne_2_nodelet_manager_driver
/velodyne_2/velodyne_2_nodelet_manager_laserscan
/velodyne_2/velodyne_2_nodelet_manager_transform

this my launch file

  <!-- declare arguments with default values -->
  <arg name="64e_1_calibration" default="$(find velodyne_pointcloud)/params/64e_s3-xiesc.yaml"/>
  <arg name="64e_1_device_ip" default="172.20.102.31" />
  <arg name="64e_1_frame_id" default="velodyne_1" />
  <arg name="64e_1_manager" default="$(arg 64e_1_frame_id)_nodelet_manager" />
  <arg name="64e_1_port" default="2368" />
  <arg name="64e_2_calibration" default="$(find velodyne_pointcloud)/params/64e_s3-xiesc.yaml"/>
  <arg name="64e_2_device_ip" default="172.20.2.32" />
  <arg name="64e_2_frame_id" default="velodyne_2" />
  <arg name="64e_2_manager" default="$(arg 64e_2_frame_id)_nodelet_manager" />
  <arg name="64e_2_port" default="2368" />

  <arg name="max_range" default="130.0" />
  <arg name="min_range" default="0.4" />
  <arg name="pcap" default="" />
  <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" />
  <arg name="gps_time" default="false" />
  <arg name="pcap_time" default="false" />
  <arg name="cut_angle" default="-0.01" />
  <arg name="timestamp_first_packet" default="false" />
  <arg name="laserscan_ring" default="-1" />
  <arg name="laserscan_resolution" default="0.007" />
  <arg name="model" value="64E_S3"/>

  <!-- start nodelet manager and driver nodelets -->
 <group ns = "$(arg 64e_1_frame_id)">
  <include file="$(find velodyne_driver)/launch/nodelet_manager.launch">
    <arg name="device_ip" value="$(arg 64e_1_device_ip)"/>
    <arg name="frame_id" value="$(arg 64e_1_frame_id)"/>
    <arg name="manager" value="$(arg 64e_1_manager)" />
    <arg name="port" value="$(arg 64e_1_port)"/>
    <arg name="model" value="$(arg model)"/>
    <arg name="pcap" value="$(arg pcap)"/>
    <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)"/>
    <arg name="gps_time" value="$(arg gps_time)"/>
    <arg name="pcap_time" value="$(arg pcap_time)"/>
    <arg name="cut_angle" value="$(arg cut_angle)"/>
    <arg name="timestamp_first_packet" value="$(arg timestamp_first_packet)"/>
  </include>

  <!-- start transform nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/transform_nodelet.launch">
    <arg name="model" value="$(arg model)"/>
    <arg name="calibration" value="$(arg 64e_1_calibration)"/>
    <arg name="manager" value="$(arg 64e_1_manager)" />
    <arg name="fixed_frame" value="" />
    <arg name="target_frame" value="" />
    <arg name="max_range" value="$(arg max_range)"/>
    <arg name="min_range" value="$(arg min_range)"/>
  </include>

  <!-- start laserscan nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/laserscan_nodelet.launch">
    <arg name="manager" value="$(arg 64e_1_manager)" />
    <arg name="ring" value="$(arg laserscan_ring)"/>
    <arg name="resolution" value="$(arg laserscan_resolution)"/>
  </include>
 </group>

 <group ns = "$(arg 64e_2_frame_id)">
  <include file="$(find velodyne_driver)/launch/nodelet_manager.launch">
    <arg name="device_ip" value="$(arg 64e_2_device_ip)"/>
    <arg name="frame_id" value="$(arg 64e_2_frame_id)"/>
    <arg name="manager" value="$(arg 64e_2_manager)" />
    <arg name="port" value="$(arg 64e_2_port)"/>
    <arg name="model" value="$(arg model)"/>
    <arg name="pcap" value="$(arg pcap)"/>
    <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)"/>
    <arg name="gps_time" value="$(arg gps_time)"/>
    <arg name="pcap_time" value="$(arg pcap_time)"/>
    <arg name="cut_angle" value="$(arg cut_angle)"/>
    <arg name="timestamp_first_packet" value="$(arg timestamp_first_packet)"/>
  </include>

  <!-- start transform nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/transform_nodelet.launch">
    <arg name="model" value="$(arg model)"/>
    <arg name="calibration" value="$(arg 64e_2_calibration)"/>
    <arg name="manager" value="$(arg 64e_2_manager)" />
    <arg name="fixed_frame" value="" />
    <arg name="target_frame" value="" />
    <arg name="max_range" value="$(arg max_range)"/>
    <arg name="min_range" value="$(arg min_range)"/>
  </include>

  <!-- start laserscan nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/laserscan_nodelet.launch">
    <arg name="manager" value="$(arg 64e_2_manager)" />
    <arg name="ring" value="$(arg laserscan_ring)"/>
    <arg name="resolution" value="$(arg laserscan_resolution)"/>
  </include>
 </group>
@Yue-Lun-Li Yue-Lun-Li added the bug label Sep 27, 2023
@JWhitleyWork
Copy link
Contributor

If both lidar are on the same network, you must use the web interface to configure different IP address and ports for each lidar.

@Yue-Lun-Li
Copy link
Author

If both lidar are on the same network, you must use the web interface to configure different IP address and ports for each lidar.

I got different IP
lidar1 IP:172.20.102.31 port:2368
lidar2 IP:172.20.2.32 port:2368

my lidar is hdl64e so it can't use web interface and only can change IP not for port

@JWhitleyWork
Copy link
Contributor

Even if the devices have different IP addresses, if they are both broadcasting to the same port, you will receive the data from both lidars on that one port. You must either separate them into different physical networks or change the port. On HDL-64Es, I believe this must be done using the serial (RS232) interface.

However, I don't believe this is the cause of your problem. Try running two separate launch files instead of one launch file and see if you get the same error.

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

2 participants