Ask Your Question
1

how to use rxplot to plot data on /tf

asked 2013-03-20 20:06:25 -0600

sai gravatar image

ubuntu 12.04 and fuerte

How to use rxplot to plot the transforms? They have the position and orientation.

Example

header: seq: 0 stamp: secs: 1311867210 nsecs: 774027961 frame_id: /world child_frame_id: /kinect transform: translation: x: 0.208460861206 y: -1.06889804077 z: 1.87455181885 rotation: x: -0.0425775370706 y: -0.0287192089576 z: 0.77849649613 w: 0.625544215773

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
3

answered 2013-03-20 23:20:40 -0600

Miquel Massot gravatar image

updated 2013-03-20 23:21:16 -0600

In my opinion, rxplot is not the best tool at plotting tf's. I would recommend you to use rviz for that.

If you want to see x, y and z positions and orientations maybe you should consider using an odometry or pose topic parsed from the node tf or something similar, in order to avoid what Adolfo Rodríguez comments.

edit flag offensive delete link more

Comments

1

There is no "best tool", as the goodness measure depends a lot on your requirements. Rviz excels at visualizing instantaneous frame configurations, but if you're interested in visualizing time series a plotting tool might be more appropriate.

Adolfo Rodriguez T gravatar imageAdolfo Rodriguez T ( 2013-04-03 21:48:36 -0600 )edit
1

...additionally the details of a specific implementation can make your life easier or harder. Plotting a /tf time series with rxplot/rqt has its difficulties, but plotting a pose_stamped topic is straightforward. YMMV...

Adolfo Rodriguez T gravatar imageAdolfo Rodriguez T ( 2013-04-03 21:53:09 -0600 )edit
2

answered 2013-03-20 22:38:00 -0600

Adolfo Rodriguez T gravatar image

The following snippet will print the x coordinate of the first transform in a tf message:

rxplot /tf/transforms[0]/transform/translation/x

Big caveat: if there are multiple publishers of the /tf topic, this won't work, as the transform vector index (the [0] above) will not always represent the same frame. Further, f you're querying a nonzero index, it might be possible that the index does not even exist in a given message.

I would recommend republishing the transform(s) of interest as a separate pose(stamped) message and plot from there. More overhead, but less surprises.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-03-20 20:06:25 -0600

Seen: 1,669 times

Last updated: Mar 20 '13