Orienting the robot properly.
I'm trying to position my robot in a particular way after it reaches a particular checkpoint.
locations['A'] = Pose(Point(6.72, 5.91, 0.000), Quaternion(0.000, 0.000, 0.223, 0.975))
locations['B'] = Pose(Point(0.0646, -3, 0.000), Quaternion(0.000, 0.000, -0.670, 0.743))
locations['C'] = Pose(Point(6.11, -4.95, 0.000), Quaternion(0.000, 0.000, 0.733, 0.680))
Here in the above code I use the quaternion values to set the pose (orientiation).
I want to know how I can check the quaternions in real time when the robot is moving.
I can rostopic echo /odom
and see the x,y,z as well as x,y,z,w (which i guess are the quaterinion values).
Is there any other way to fetching quaternion values ?
Secondly,
if I rotate the robot to a position, check the quaternion (x,y,z,w) values, move it around and later come to the same position , the quaternion values are chaning every time. I'm not sure if this is a valid behaviour because as I know, if quaternion is a representation of rotation (or pose), then if the robot is in the same pose after moving around, it shouldn't change isn't it?
My goal is to use the locations part of code attached above to orient the robot according to my requirement. Can this be done in any othe approach or is there any way I can get proper quaternion valuies?
Thanks.