Ask Your Question

Adding trajectory to hector_geotiff output

asked 2014-03-16 22:33:52 -0500

mr.karimi gravatar image

updated 2016-10-24 09:03:28 -0500

ngrennan gravatar image

I have a Hokuyo URG-04LX and I use Hector_Slam for mapping. I use hector_geotiff for saving the map as a .tiff file but it doesn't contain trajectory. Is there any way for add trajectory to .tiff file? Or is there another package for having these options?

this is my launch file after adding the line that @Stefan Kohlbrecher said :

   <arg name="trajectory_source_frame_name" default="/map"/>
   <arg name="trajectory_update_rate" default="4"/>
   <arg name="trajectory_publish_rate" default="0.25"/>
   <arg name="map_file_path" default="$(find hector_geotiff)/maps"/>
   <arg name="map_file_base_name" default="hector_slam_map"/>

  <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
    <param name="target_frame_name" type="string" value="/map" />
    <param name="source_frame_name" type="string" value="$(arg trajectory_source_frame_name)" />
    <param name="trajectory_update_rate" type="double" value="$(arg trajectory_update_rate)" />
    <param name="trajectory_publish_rate" type="double" value="$(arg trajectory_publish_rate)" />

  <node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
    <remap from="map" to="/dynamic_map" />
    <param name="map_file_path" type="string" value="$(arg map_file_path)" />
    <param name="map_file_base_name" type="string" value="$(arg map_file_base_name)" />
    <param name="geotiff_save_period" type="double" value="1" />
    <param name="draw_background_checkerboard" type="bool" value="true" />
    <param name="draw_free_space_grid" type="bool" value="true" />
    <param name="plugins" type="string" value="hector_geotiff_plugins/TrajectoryMapWriter" />


This is my output after running this launch file : image description

the yellow arrow drew at start point and didn't move!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-03-16 23:00:04 -0500

We made a change to the internal workings of hector_geotiff (using plugins for better extendability), which lead to the path not getting drawn in the tutorial launch file. The functionality is still there, see also answer here.

I also changed the geotiff_mapper.launch file, so the trajectory writer plugin is loaded per default. This change will take a little time till it appears in .debs though:

edit flag offensive delete link more


You have to set "trajectory_source_frame_name" to a frame that is part of your robot (for example /base_link).

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2014-03-17 01:34:00 -0500 )edit

yes, after i change the "trajectory_source_frame_name" from map to base_link , it worked! Thank you very Much :)

mr.karimi gravatar image mr.karimi  ( 2014-03-17 01:42:43 -0500 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2014-03-16 22:33:52 -0500

Seen: 436 times

Last updated: Mar 17 '14