Ask Your Question
0

hector_mapping: No transform between frames /map and /base_link

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

ydlidar_question gravatar image

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

(See EDIT 1 for new information)

Hello.

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: https://archit0994.wixsite.com/archit... 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.

<launch>

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

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

</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 ...

(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

ydlidar_question gravatar image

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

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: https://answers.ros.org/question/3052...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 54 times

Last updated: Dec 17 '19