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

Saving geotiff map in Hector_slam

asked 2015-05-22 04:26:08 -0600

Raman gravatar image

updated 2015-05-22 05:13:25 -0600

Hello,

I am new to ROS. I have been trying to save my lidar data as a geotiff map using Hector _Slam . The tutorial says to run :

rostopic pub syscommand std_msgs/String "savegeotiff"

Running this command does not show any error. The tutorial says that it will then automatically save the map to the 'hector_slam/hector_geotiff/maps' folder . However I find no hector_geotiff folder within the Hector_SLAM folder. I was wondering if I need to create some listener node for this purpose. Please guide as I am a beginner in ROS.

edit retag flag offensive close merge delete

Comments

Please check logs of hector_geotiff node. Also, could you please share your output for rostopic list.

ajain gravatar image ajain  ( 2015-05-28 10:38:21 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2015-09-14 18:26:58 -0600

samer.hanoun gravatar image

You will need to run this command to save the map either while the mapping process is ongoing (then you will get a partial map) or once you are satisfied by the produced map as shown by RVIZ (then you will get a full map).

Note that hector_slam should be active for hector_map_server to be able to export the generated map.

Please refer to this tutorial: http://wiki.ros.org/hector_slam/Tutor... for detailed steps.

hector_slam package has hector_geotiff with a folder called "maps".

Download hector_slam full version from: https://github.com/tu-darmstadt-ros-p... . catkin_make it and run:

roslaunch hector_slam_launch tutorial.launch

with

rosbag play Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag  --clock

as described in the mentioned tutorial, then save the map using:

rostopic pub syscommand std_msgs/String "savegeotiff"
edit flag offensive delete link more
2

answered 2018-07-18 14:04:57 -0600

rebecatourinho gravatar image

I've installed hector_slam via apt-get, so the package is on /opt/ros/DISTRO/share path (mine was indigo). In this case, I've had to recursively change hector_geotiff's folder owner because savegeotiff command had no permission to generate *.tif and *.tfw files. Another issue was referred maps folder missing on my installation, so I've had to manually create it.

So if you:

sudo apt-get install ros-DISTRO-hector-slam

then:

sudo chown -R USER:GROUP /opt/ros/DISTRO/share/hector_geotiff

If maps folder is missing:

mkdir /opt/ros/DISTRO/share/hector_geotiff/maps

Run again (while hector_slam launch and bag are running too):

rostopic pub syscommand std_msgs/String "savegeotiff"
edit flag offensive delete link more

Comments

Hi I am unable to execute the second command. Error is invalid user: "USER:GROUP". How can I solve this?

rui gravatar image rui  ( 2018-11-07 01:04:09 -0600 )edit

You need to replace USER by your username and GROUP by a group you belong to. Generally, are the same, like username:username.

rebecatourinho gravatar image rebecatourinho  ( 2018-11-12 12:37:12 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-22 04:26:08 -0600

Seen: 5,885 times

Last updated: Sep 14 '15