Pointcloud to laserscan launch file

asked 2019-06-18 03:27:16 -0500

S.Yildiz gravatar image

updated 2019-06-18 04:45:55 -0500

I have a rgb-d camera and I want to convert the pointcloud to laserscan, in order to create a 2d map with google cartographer. When I launch cartographer with the pointcloud_to_laser I get warnings and it is not working. My launch file looks like this:

<?xml version="1.0"?>

<launch>


<!--param name="/use_sim_time" value="true" /-->


    <!-- run pointcloud_to_laserscan node -->
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">

    <remap from="cloud_in" to="/royale_camera_driver/point_cloud"/>
    <!--remap from="scan" to="/camera/scan"/-->

    <rosparam>
        #target_frame: royale_camera 
        transform_tolerance: 0.01
        min_height: 0.0
        max_height: 1.0

        angle_min: -3.14 # -M_PI
        angle_max: 3.14 # M_PI
        angle_increment: 0.0087 # M_PI/360.0
        scan_time: 0.3333
        range_min: 0.45
        range_max: 10.0
        use_inf: true

        # Concurrency level, affects number of pointclouds queued for processing and number of threads used
        # 0 : Detect number of cores
        # 1 : Single threaded
        # 2->inf : Parallelism level
        concurrency_level: 1
    </rosparam>
</node>
</launch>

I get a warning from cartographer, when I launch it with the pc_to_laser:

[ WARN] [1560845643.823460226]: W0618 10:14:03.000000 18489 sensor_bridge.cc:200] Ignored subdivision of a LaserScan message from sensor scan because previous subdivision time 636964424437691470 is not before current subdivision time 636964424437691470

My header timestamp of /scan looks like this:

header:

  seq: 100
  stamp: 
    secs: 1560845618
    nsecs: 155853000
  frame_id: "royale_camera_optical_frame"
angle_min: -3.1400001049
angle_max: 3.1400001049
angle_increment: 0.00870000012219
time_increment: 0.0
scan_time: 0.333299994469
range_min: 0.449999988079
range_max: 10.0
ranges: [inf, inf, inf, 0.45439407229423523, 0.45167145133018494, inf, inf,

Is there something wrong with my launch file? When I use sim_time I get no more warnings, but there are also no messages published.

edit retag flag offensive close merge delete