my_ROS_mobile_robot icon indicating copy to clipboard operation
my_ROS_mobile_robot copied to clipboard

How to read odometry

Open jossichrist opened this issue 6 years ago • 2 comments

Dear @eborghi10 i want to control w and v using PID. but before i control it, i should get the data from odometry.

So, here is the problem. once i read "yaw" (translated to euler), the robot doesnt rotate as the odometry said.

for example, the "yaw" = 90 degree. but the robot only rotate 30 degree.

what should i do? or should I add IMU?

Regards,

jossichrist avatar Apr 01 '18 12:04 jossichrist

I tested what you said and you're right. There is some difference between /odom and the correct rotation. I don't have certainty right now about what is causing the issue but you could implement one of these two things:

  • Create a node that publishes /odom. See this link. Remeber to edit my_robot.gazebo in order to stop publishing the odometry topic automatically by the robot controller.

  • Read base_footprint yaw angle in /tf.

Let me know if one of these works in case you implement them.

eborghi10 avatar Apr 01 '18 22:04 eborghi10

Hey @jossichrist, I think I fixed the issue in this commit. Can you check that again, please?

Here are some images with the fix:

  • Gazebo simulation

default_gzclient_camera 1 -2018-05-01t20_09_23 019324

  • RViz simulator

rviz_screenshot_2018_05_01-20_08_58

eborghi10 avatar May 01 '18 23:05 eborghi10