Issue with Odometry [closed]
I have attached a github link to the my actual code so my question makes more sense, if you are reading this please look at the code first so it makes sense.
Here is the link: https://github.com/DistroIII/Project/...
I am having an odometry issue in my algorithm:
When I rostopic echo /odom
to cross examine it with whats in my code:
odom=Odometry()
def callback(msg):
global odom
odom=msg
rospy.Subscriber("/odom",Odometry,callback)
It appears for some reason something isn't syncing immediately so the first values of my XO and YO are always both 0 regardless of the actual pose of the robot.
This issue was solved by me adding a rospy.sleep after Initialization of node and declaring of publishers and subscribers.