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

Revision history [back]

You need to describe the position of the laser (RPLidar) and the map in TF.

Perhaps adding the following to tutorial.launch will do the trick.

<node pkg="tf" type="static_transform_publisher" name="link1" args="1 0 0 0 0 0 base_link laser 100" />

Or

<node pkg="tf" type="static_transform_publisher" name="link1" args="0 0 0 0 0 0 base_footprint laser 100" />

This expresses that the laser is attached to the center of the robot. To make it accurate, we need to update the 0 0 0 0 0 0 part to match the actual RPLidar attachment.

I think we need to indicate where the robot is on the map; it can be estimated by AMCL, but there are limitations.

There is a way to indicate the robot's position from Rviz.

After opening in Rviz, select "2D Pose Estimate". Click at the position where the robot is, click and hold, and drag and drop the robot in the robot's direction.

image description

OLD

You need to describe the position of the laser (RPLidar) and the map in TF.

Perhaps adding the following to tutorial.launch will do the trick.

<node pkg="tf" type="static_transform_publisher" name="link1" args="1 0 0 0 0 0 base_link laser 100" />

Or

<node pkg="tf" type="static_transform_publisher" name="link1" args="0 0 0 0 0 0 base_footprint laser 100" />

This expresses that the laser is attached to the center of the robot. To make it accurate, we need to update the 0 0 0 0 0 0 part to match the actual RPLidar attachment.