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

hector slam not disaplying map in rviz

asked 2015-08-18 05:01:34 -0500

mruniverse gravatar image

updated 2015-08-18 11:29:57 -0500

hi i am following these steps below to run my hector slam in rviz :

* README.txt*

  Postprocessing Logfile example ==

Download this file: http://code.google.com/p/tu-darmstadt...

   Open a new terminal window, type:
       rosmake hector_slam

 Launch the tutorial launch file provided in the hector_slam_launch package:
     roslaunch hector_slam_launch tutorial.launch

    Open another terminal, enter the directory of the .bag file and type:
  rosbag play Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag --clock

Before this i installed ros using this command sudo apt-get install ros-indigo-hector-slam

But when I am running my second command which is the Ros launch its showing a warning sign:

[ INFO] [1439891300.286474566]: HectorSM p_map_update_angle_threshold_: 0.060000
  [ INFO] [1439891300.286495451]: HectorSM p_laser_z_min_value_: -1.000000
 [ INFO] [1439891300.286515964]: HectorSM p_laser_z_max_value_: 1.000000
 [ INFO] [1439891300.329699919]: Successfully initialized hector_geotiff MapWriter plugin TrajectoryMapWriter.
 [ INFO] [1439891300.329809825]: Geotiff node started
 [ WARN] [1439891320.241781835]: No transform between frames /map and scanmatcher_frame available after
  20.002011 seconds of waiting. This warning only prints once.

In the rviz display panel its also showing a warning sign

Global Status: Warn   
  Fixed Frame
 No tf data. Actual error: Fixed Frame [map] does not exist

The rosabag file is running but no map /visualization is being displayed in rviz

edit retag flag offensive close merge delete

Comments

Hi, what do you get when you run rosrun rqt_tf_tree rqt_tf_tree? I don't need you have the /map frame. You need that to produce the map.

psprox96 gravatar image psprox96  ( 2015-08-18 12:06:51 -0500 )edit
1

Put this line in your .launch file:

<node pkg="tf" type="static_transform_publisher" name="map_baselink_broadcaster" args="0 0 0 0 0 0 map base_link 100"/>

or

<node pkg="tf" type="static_transform_publisher" name="map_baselink_broadcaster" args="0 0 0 0 0 0 map scanmatcher_frame 100"/>

psprox96 gravatar image psprox96  ( 2015-08-18 12:14:03 -0500 )edit
1

when and where shud i run this command rosrun rqt_tf_tree rqt_tf_tree and in which line i mean where i shud put that code of yours node pkg

mruniverse gravatar image mruniverse  ( 2015-08-18 13:10:06 -0500 )edit

I'm having the same issue! I edited tutorial.launch in the hector_slam_launch/launch folder, adding:

<node pkg="tf" type="static_transform_publisher" name="map_baselink_broadcaster" args="0 0 0 0 0 0 map base_link 100"/>

as psprox96 suggests.

This got rid of the warnings but still no map...

atech1380 gravatar image atech1380  ( 2015-08-18 13:34:23 -0500 )edit

Nevermind, it is making the map, I just didn't have the right topics watched in RVIZ, doh!

atech1380 gravatar image atech1380  ( 2015-08-18 19:34:09 -0500 )edit

You run that command in the terminal, like how you rosmake the packages. Do you know where is your .launch file? The one you need to run to get the INFO.

psprox96 gravatar image psprox96  ( 2015-08-18 19:35:14 -0500 )edit

Yup, and make sure you set your Global Frame in Rviz to /map and LaserScan to /scan.

psprox96 gravatar image psprox96  ( 2015-08-18 19:38:24 -0500 )edit

I just directly type the rosmake command and the follow up code in the terminal and then open an another terminal then go to the directly that contains the bag file and then execute it. I don't go to any directory that contains the .launch file.I just type it when i open my terminal

mruniverse gravatar image mruniverse  ( 2015-08-18 23:52:06 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-08-19 01:34:56 -0500

It appears the rviz config does not get loaded correctly (at least on Indigo) and for this reason the rviz Displays are not properly set up. You'll have to manually add the "Map" display to see the map. See also the rviz Map Display wiki page.

edit flag offensive delete link more

Comments

Hi i just added the map icon in the display ans /map to it and it wrked.Thanks stefan And by the way the waring is still there but i can see the map so thats ok right? And also I didint use rosmake just directly roslaunch as mentioned in the tutorial

mruniverse gravatar image mruniverse  ( 2015-08-19 05:17:16 -0500 )edit
0

answered 2020-04-16 05:15:36 -0500

tp_ink gravatar image

Map is building on launch, adding additional node to tutorial.launch changes process to shorter length and inconsistent map result.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-08-18 05:01:34 -0500

Seen: 2,884 times

Last updated: Aug 19 '15