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

ROS Stage and Rviz for Navigation

asked 2013-04-22 11:33:54 -0500

Andre Setiawan gravatar image

Hi all,

I have some queries about running navigation stack in Stage and RViz :

1) For my project I'm using base_link as my robot base frame and laser_frame as my laser base frame. However, after running Stage and RViz I found out that base_footprint frame and base_laser_link frame has been added to my TF, although I'm not using it at all. Initially I thought it is because of the default frame name in Stage and RViz node, so I remap the variables in my Stage & RViz launch file like this :

remap from="base_laser_link" to="laser_frame"

remap from="base_footprint" to="base_link"

But it doesn't do the work at all (I still have those unused frames in my TF).

2) My robot position doesn't seem to be synchronized in RViz and Stage. The initial position of my robot is different in RViz and Stage. And when I tried to set 2D Pose in RViz, the initial robot position in stage does not change at all.

3) When initializing RViz and Stage, the map itself is also not synchronized. The origin of my map in RViz is at the corner of the map while the origin of my map in Stage is at the center of the map.

I hope to know how to handle this issues. Your feedbacks are appreciated.

edit retag flag offensive close merge delete


Hi,how did you solve your 2nd and 3rd problems?

ali ekber celik gravatar image ali ekber celik  ( 2013-11-30 03:22:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-22 17:08:07 -0500

I have something similar to item 2 in this question. The initial pose in robot (/odom topic) is '0' although in stage world is another (defined in .world file).

For item 3 you must set both in .world file for stage and in mapserver the reference for the map origin. (Are you using mapserver?)

For item 1 those tf are published because the stageros node was made for doing so. You can ignore those that are not useful to you. Or if you like, you can make a custom simulator based on rosstage (I'm now trying to doing this to solve my issue).

edit flag offensive delete link more


Yes, I'm using map_server. For item 1, I tried to change the variable in launch file of Stage, but it doesn't work as I mentioned earlier. The best way I can think of is to change my TF tree to use base_footprint frame and base_laser_link frame in accordance to what Stage node use.

Andre Setiawan gravatar image Andre Setiawan  ( 2013-04-23 14:12:33 -0500 )edit

Another way is to change the frame names from Stage source code directly. Is there a command line to directly replace "base_footprint" in Stage source code to "base_link" and "base_laser_link" to "laser_frame"?

Andre Setiawan gravatar image Andre Setiawan  ( 2013-04-23 14:14:07 -0500 )edit

As I said you before, tf names as topics names are defined in stageros.cpp. If you want to change them I think you should edit source file and re-build or make your custom 'stageros'.What happens with item 3? can you solve your issue?

gustavo.velascoh gravatar image gustavo.velascoh  ( 2013-04-23 18:29:20 -0500 )edit

I can solve the issue for item number 3 my adjusting the origin value of map.yaml and file. Now the only problem is for item number 2.

Andre Setiawan gravatar image Andre Setiawan  ( 2013-04-23 23:41:00 -0500 )edit

Question Tools


Asked: 2013-04-22 11:33:54 -0500

Seen: 1,347 times

Last updated: Apr 22 '13