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

How to get x,y coordinates of turtlebot

asked 2019-03-03 12:50:22 -0500

GroggyROS gravatar image

Hello, I'm trying to get the x and y coordinates of a turtlebot in the simulated world. Currently I have subscribed to the odom topic and have been able to get pose.pose.position.x and pose.pose.position.y. However when I get these values they are not x=0 and y=0 as I expect as the turtlebot has not yet moved. Is there something wrong with my assumption and/or am I not using the right rostopic to get desired x and y values?

Thanks.

edit retag flag offensive close merge delete

Comments

Why did you delete and close this question?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-03 13:42:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-03 13:14:35 -0500

gvdhoorn gravatar image

updated 2019-03-03 13:22:16 -0500

So what are the values you see, instead of 0, 0? Keep in mind that a simulator typically uses numerical approximations that may result in drift even though the model should be at rest/idle.

edit flag offensive delete link more

Comments

When I run "roslaunch turtlebot_gazebo turtlebot_world.launch "

x: -1.05240047001e-06 y: 8.27266784267e-07

GroggyROS gravatar image GroggyROS  ( 2019-03-03 13:36:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-03 12:50:22 -0500

Seen: 545 times

Last updated: Mar 03 '19