my_ROS_mobile_robot
my_ROS_mobile_robot copied to clipboard
How to read odometry
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,
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 editmy_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.
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
- RViz simulator