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

hector_mapping: No transform between frames /map and /base_link

asked 2019-12-16 09:40:26 -0500

ydlidar_question gravatar image

updated 2019-12-16 10:46:44 -0500

(See EDIT 1 for new information)


Running ROS Kinetic Ubuntu 16.04.6 LTS kernel version: Linux 4.15.0-72-generic x86_64

I have been following a tutorial for implementing SLAM without odometry using hector_slam and hector_mapping: The launch file that I am using is the same as what this tutorial states, and as a result, I haven't been making changes to the mapping_default.launch file.


 <node name="ydlidar_node" pkg="ydlidar" type="ydlidar_node" output="screen" respawn="false" >

  <param name="port" type="string" value="/dev/ydlidar"/>

  <param name="baudrate" type="int" value="128000"/>

  <param name="frame_id" type="string" value="laser_frame"/>

  <param name="low_exposure" type="bool" value="false"/>

  <param name="resolution_fixed" type="bool" value="true"/>

  <param name="auto_reconnect" type="bool" value="true"/>

  <param name="reversion" type="bool" value="false"/>

  <param name="angle_min" type="double" value="-180" />

  <param name="angle_max" type="double" value="180" />

  <param name="range_min" type="double" value="0.1" />

  <param name="range_max" type="double" value="16.0" />

  <param name="ignore_array" type="string" value="" />

  <param name="samp_rate" type="int" value="9"/>

  <param name="frequency" type="double" value="30"/>


 <node pkg ="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0.0 0.0 0.0 /map /nav 30"/>

 <node pkg ="tf" type="static_transform_publisher" name="odom_to_base_link" args="0.0 0.0 0.0 0.0 0.0 0.0 /nav /base_footprint 30"/>

 <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0.2245 0.0 0.2 0.0 0.0 0.0 /base_footprint /laser_frame 30" />

 <include file="$(find hector_mapping)/launch/mapping_default.launch" />

 <node pkg="rviz" name="rviz" type="rviz" args="-d $(find ydlidar)/launch/lidar.rviz" />

 <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch" />


The hardware that I am using matches the tutorial and is the YDLidar X4 (Firmware version: 1.0.5), a 2D lidar scanner. I have gone through all the steps in the tutorial up to this section, where hector_mapping is used to build a map of the environment.

When I run this file using:

roslaunch ydlidar all_nodes.launch

Everything starts fine in rviz, but it is unable to display the map when it is added. The error to the command line seems to be a common one on this forum:

What is it in the launch file that is causing this error that I can fix?

From roswtf I have:

roswtf Loaded plugin tf.tfwtf

No package or stack in context

Static checks summary:

No errors or warnings

Beginning tests of your ROS graph. These may take awhile... analyzing graph... ... done analyzing graph running graph rules... ... done running graph rules running tf checks, this will take a second... ... tf checks complete

Online checks summary:

Found 1 warning(s). Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:

  • /hector_mapping:

    • /syscommand

    • /tf_static

  • /rviz:

    • /tf_static
  • /hector_geotiff_node ...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-17 04:38:32 -0500

ydlidar_question gravatar image

updated 2019-12-17 08:12:04 -0500

Answer! I found another person doing quite similar work, and combining some of their launch file and the answer's launch file.. I have a new launch file that works (although it refreshes VERY slowly!)

Sourced from:

edit flag offensive delete link more

Question Tools


Asked: 2019-12-16 09:40:26 -0500

Seen: 1,520 times

Last updated: Dec 17 '19