Mixed messages in different scan topics using two velodynes

asked 2020-05-29 02:09:49 -0600

yasgalmon gravatar image

I'm trying to receive messages from two velodynes and then merge the scans for using the data with AMCL package. I've modified the launcher so the velodyne's scan topic is ${arg frame_id}_scan instead of just scan and I've realized that I'm receiving in each velodyne's topic mixed messages from both velodynes instead of the ones corresponding to the velodyne of the topic. Does anyone had this problem and can tell me how to solve it? Thank you in advance.

I'm using ROS Melodic in Ubuntu 18.04 and the last source version of the velodyne driver. I'll let here the configuration of my VLP16_points.launch and the script I use to launch them.

-- VLP16_points.launch --

<!-- run velodyne_pointcloud/CloudNodelet in a nodelet manager for a VLP-16 -->

<launch>

  <!-- declare arguments with default values -->
  <arg name="calibration" default="$(find velodyne_pointcloud)/params/VLP16db.yaml"/>
  <arg name="device_ip" default="" />
  <arg name="frame_id" default="velodyne" />
  <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="2368" />
  <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="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="organize_cloud" default="false" />
  <!--
     0    degrees >>>>      0.0 rad     >>>> FRONTAL
    180  degrees >>>> 3.14159265359 rad >>>> REAR
  -->
  <arg name="view_direction" default="0.0" /><!--[0-2*pi]center of view angle in radians in the device frame of reference.-->
  <!--
    240 degrees >>>> 4.18879000000 rad
    220 degrees >>>> 3.83972000000 rad
    200 degrees >>>> 3.49066000000 rad
    180 degrees >>>> 3.14159265359 rad
    160 degrees >>>> 2.79252680319 rad 
    140 degrees >>>> 2.44346095279 rad
    120 degrees >>>> 2.09439510239 rad
  -->
  <arg name="view_width" default="3.83972000000" /><!--[0-2*pi]Width of view angle in radians in the XY plane of the device frame of reference-->


  <!-- 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)"/>
    <arg name="gps_time" value="$(arg gps_time)"/>
    <arg name="cut_angle" value="$(arg cut_angle)"/>
    <arg name="timestamp_first_packet" value="$(arg timestamp_first_packet)"/>
  </include>

  <!-- start cloud nodelet -->
  <include file="$(find velodyne_pointcloud)/launch/cloud_nodelet.launch">
    <arg name="model" value="VLP16"/>
    <arg name ...
(more)
edit retag flag offensive close merge delete