why is the coordinate in stage different with the coordinate in Rviz
Hi, all ,I am learning multi-robot collision avoidance and successfully run collvoid as the instruction on collvoid's page. I did it with 1.7.2 stageros in Ubuntu 12.04 with Hydro ROS. Of course, I did some modifications as the instruction. However, When I launch a simcreated.launch, the movement of robots are chaos. I found that the coordinate in stage is different with the coordinate of 2D map in Rviz.
Please see follow two pictures. The purple arrow in the rviz is the origin of the 2D map which is same to the origin in Stage.
In the Stage (the first picture), the two robot's positions correspond to topics /robot0(1)/baseposegroundtruth which are consistent with the cartesian coordinate system.
In the Rviz (the second picture), the two arrows( red and blue ones) also correspond to topics /robot0(1)/baseposegroundtruth, but the displayed positions of these two arrows are different with the two circles(robots) in Stage.
By comparing the value of their positions, it seem that the x-axis in Stage corresponds to y-axis in Rviz, and the y-axis in Stage corresponds to x-axis in Rviz.
You can see that the Robot1 in Stage corresponds to the blue arrows in the second picture. And the localcostmap of the two robots( White square which is different with the grey background in the Rviz) are shown in the center of the Rviz. Theses local_costmap do not correspond to the static map.
What a chaos!! I can't understand why! Please give me some guidance on this. Thank you!
Asked by scopus on 2014-09-03 05:21:55 UTC
Comments
I think you may should use the /robot_0/odom topic instead of the /robot_0/base_pose_ground_truth to get the odometry of the robot. Read http://wiki.ros.org/stage published topics there is the difference explained. Hope it works then
Asked by pkohout on 2014-09-03 06:01:56 UTC
Thank you for you attention. Please note that comparing with the cartesian coordinate displayed in the first picture( Stage), the coordinate of Rviz is rotated by 90°. That is why he Robot_1 shown in Stage corresponds to the blue arrows in Rviz. So I think the incorrect coordinate is the key point.
Asked by scopus on 2014-09-03 07:21:36 UTC
I am new to use Stage. If you mean that I should /odom topic. But both the initial value of /robot_0/odom and the value of /robot_1/odom are (0,0,0), that is in the origin of the Stage and Rviz. What should I do to use /odom topic in the project ? Thank you!
Asked by scopus on 2014-09-03 07:50:23 UTC
try using the odom topic, if it does work,great. If not, please upload a picture where you show the /odom in rviz please.
Asked by pkohout on 2014-09-04 06:16:19 UTC
hello friend can i plz have your code i am also trying to do the same thing in Stage ros and rviz but i fail can you please help me by sending your code if possible i need to do a research study on stage ros and rviz for which i need it
Asked by naqi.nick on 2016-01-17 12:39:03 UTC
Hey I am also trying to do a similar thing and facing the same issue. Thats why my move_base isint working propelry. But when I am using it individuallly it works fine. But using it in with two or multiple robots is causing the issue. Please share the solution if you have found any.
Asked by Souvik Basak on 2021-12-22 13:55:03 UTC
Same problem here. Any idea what causes this?
Asked by beluga on 2022-03-17 03:26:07 UTC