How to save rViz joint position in bag file

asked 2015-08-05 12:23:22 -0500

kritchie gravatar image

Hi guys,

I'm trying to calculate by hand the kinematics of a simple 3-DOF manipulator and I want to automate my kinematics testing by using rViz with a transform publisher.

Here's a screenshot of my rViz workspace

C:\fakepath\Screenshot from 2015-08-05 13:19:58.png

I just want to log the X,Y,Z position of the joint_4 (see in the left panel in the screenshot)

Is it possible ?

Thanks !

edit retag flag offensive close merge delete

Comments

Can you use rosbag and/or rqt_plot?

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-05 12:50:24 -0500 )edit

What I'm seeing now is that rViz doesn't publish the joint_4 position to a topic and doesn't offer a service to get said values. So I don't think I can use rosbag and/or rqt_plot... but if there's another way to use them I don't know it.

kritchie gravatar image kritchie  ( 2015-08-05 13:20:02 -0500 )edit

RViz does not publish anything, it is just for visualization. You should create a node that gets the position of a frame connected to joint_4 and publish from there X,Y and Z

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-05 13:36:44 -0500 )edit

How would you "connect" the frame to the joint ? Is there a way to do it using rospy or roscpp ? I also though about adding this feature into a local rViz version on my machine but recompiling the whole things seems a bit overkill for what I want to do...

kritchie gravatar image kritchie  ( 2015-08-05 15:01:11 -0500 )edit

I'm not sure about this, but you can add a fixed joint at the end of the robot and then just use the TF transform to get XYZ coordinates.

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-08-05 15:20:01 -0500 )edit