Actually i do the maze run with the turtlebot. There i created a test file to detect the change of the odometry. The problem with this file is, that when i move the robot with the keyboard, this values do not change. Can someone help me?
#! /usr/bin/env python
from nav_msgs.msg import Odometry
sub = rospy.Subscriber('/odom', Odometry, callback)
rate = rospy.Rate(1)
First the robot should escape the maze on it’s own. So you should not control the robot using the keyboard. This is should help you understand why the project involves the use of everything listed.
To see all that the nav_msgs have you should lookup/search for the nav_msgs API, and the their you would see that can use
pose.pose.position.x and pose.pose.position.y and much more their is also a youtube video put out by Ricardo Tellez regarding distance calculations however don’t use his program it’s much more then is required for this project.
I know that the robot should move by it self, but there i only want to see what happens with this value if i move the robot. This is only to see which value changes when i move the robot.
OK, that’s a smart way to check the distance moved just wanted to make sure you weren’t moving it. Also just in case the robot should move the minimum distance required to get out of the maze and stop.
But why the values from odometry did not change when i move the robot?
I can’t tell you anything without more information. Please post just the program your using for the distance moved so I can see what you have. What has changed or been added to the program you posted above.