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

Pointcloud to laserscan launch file

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

S.Yildiz gravatar image

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

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"?>


<!--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"/-->

        #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

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

[ WARN] [1560845643.823460226]: W0618 10:14:03.000000 18489] 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:


  seq: 100
    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


Have you ever solved this problem?

avzmpy gravatar image avzmpy  ( 2020-07-30 07:33:04 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-06-06 06:59:53 -0600

qilin_gundamenjoyer gravatar image

The underlying problem istime_increment: 0.0. time_increment needs to be initialized to the correct value or else the unskewing of the cartographer won't work correctly. A good approximation could be time_increment = scan_time / ranges.size().

For more information addressing this issue, you can check the docs.

edit flag offensive delete link more

Question Tools



Asked: 2019-06-18 03:27:16 -0600

Seen: 1,291 times

Last updated: Jun 06 '22