Hi, I'm trying to get the XYZ position of the odom frame. In particular I just want the xy position, not fussed about height change (z). As you can see in the picture, only one of the values is close, the others are quite off.
The code I'm using to get the XYZ seen in the console (only relevant lines):
tf_listener = tf.TransformListener()
try:
(trans, rot) = tf_listener.lookupTransform('/imu_link', '/odom', rospy.Time(0))
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
continue
rospy.loginfo(trans)
Also RVIZ Global Fixed Frame was set to Velodyne (Using a Husky with Velodyne sensor).
I'm sure it can't be too difficult but if anyone could show me ow to exactly get the odom-position information that RVIZ is showing, that'd be great
Using Ubuntu 16.04, Kinetic.
Originally posted by JAWDAY on ROS Answers with karma: 43 on 2019-01-31
Post score: 0
Original comments
Comment by matheusns on 2019-01-31:
All right, could you, please, send us the rqt_graph screenshot of your application? This to see if what are the available transformations and "who" is providing the odom transform.
Comment by JAWDAY on 2019-01-31:
Here is the rqt_graph screenshot, and also output of rosrun tf view_frames
here.
Comment by mgruhler on 2019-02-01:
Not 100% sure, but I guess rviz
is showing the positions w.r.t. the fixed_frame
. Thus, if you want to have the same transforms, maybe try to change the fixed_frame
to imu_link
to check if the positions then match.