Ask Your Question

Why base_pose_ground_truth isn't publishing the real position in stageros?

asked 2012-02-26 09:20:36 -0500

lucascoelho gravatar image


I'm using the stage simulator to make an multi robot experiment. I need a global and perfect position to make it, so the topic base_pose_ground_truth would be perfect for it.

But the problem is that base_pose_ground_truth is not showing the position of the robot as appears in the screen of stage simulator. It's strange because the odometry seems ok, and description page of Stage stack says that base_pose_ground_truth will always publish perfect position.

In most of cases, the x published position is the real y position, and the y published position is the negative of real x position.

I've tested with some .world files of stage stack and navigation_stage package and I got the same problem.

There is an image of an simulation with stageros and the information published in /base_pose_ground_truth (left) and /odom (right). The initial position of the robot was [0 0 0 0].

image description

What should I do to make base_pose_ground_truth show the real position?

edit retag flag offensive close merge delete


same problem here.

Procópio gravatar image Procópio  ( 2012-08-17 05:17:26 -0500 )edit

4 Answers

Sort by » oldest newest most voted

answered 2012-09-18 15:59:04 -0500

lucascoelho gravatar image

updated 2012-09-18 15:59:53 -0500

Hello guys,

I modified the stageros code in order to fix this problem. The code can be accesed here. Not all problems were solved, I think that /base_link still wrong. But at least /base_pose_ground_truth topic is working fine. The stageros code is very clear and pretty easy to modify.

Another way to solve this problem is using an localization system, like amcl. But note that amcl has a significant computational cost and it publishes geometry_msgs/PoseWithCovarianceStamped messages, not nav_msgs/Odometry.

edit flag offensive delete link more


If you made a useful patch to the code, please open a ticket containing a patch file in the stage's bug tracker so that other people also profit from your contribution.

Lorenz gravatar image Lorenz  ( 2012-09-18 22:56:53 -0500 )edit

answered 2012-02-26 21:26:58 -0500

Lorenz gravatar image

Not completely sure, but is fake_localization maybe the node you are looking for? It should publish the correct global position and the corresponding TF transform.

edit flag offensive delete link more



I tried to use fake_localization, but didn't work because fake_localization subscribes to base_pose_ground_truth.

lucascoelho gravatar image lucascoelho  ( 2012-02-27 03:50:25 -0500 )edit

answered 2012-08-13 05:31:33 -0500

osuairt gravatar image

Hi, I am having the same problem. I will go ahead and use /odom for now, but it is really counter-intuitive!

edit flag offensive delete link more



Please only create an answer if you are really answering something. Use the comment functionality for discussions. This is not a forum.

Lorenz gravatar image Lorenz  ( 2012-08-18 03:16:20 -0500 )edit

I'm using the odom topic instead of the base_pose_ground_truth because that actually seems to give the base_pose_ground_truth. Do you not want me to say this? Would this not be helpful to someone else? Do you want me to contribute to the community at all? Is copy/pasting replies a contribution?

osuairt gravatar image osuairt  ( 2012-09-05 02:09:21 -0500 )edit

yes, it would be helpfull and I think everybody wants you to say that, but as a comment. you are adding more info on the problem, not answering the original question. cheers

Procópio gravatar image Procópio  ( 2012-09-05 02:43:44 -0500 )edit

I didn't want to be offensive so let me try to explain again. This site is not like a normal forum where you have chronologically ordered post. Rather, you have a question and a bunch of answers and the best one is on top because it got most upvotes.

Lorenz gravatar image Lorenz  ( 2012-09-05 03:40:35 -0500 )edit

Now if you have a problem that hasn't been solved so far, open a new question. Otherwise people who might be able to answer don't find your question. If you want to provide more information on your question, either update it by editing or comment on it.

Lorenz gravatar image Lorenz  ( 2012-09-05 03:41:25 -0500 )edit

answered 2012-08-17 05:00:44 -0500

Clefairy gravatar image

I am having the exact same problem as well. The orientation is wrong as well. Does no one know why? Is it a bug in Electric?

edit flag offensive delete link more



Please only create an answer if you are really answering something. Use the comment functionality for discussions. This is not a forum.

Lorenz gravatar image Lorenz  ( 2012-08-18 03:15:52 -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: 2012-02-26 09:20:36 -0500

Seen: 1,620 times

Last updated: Sep 18 '12