ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to plot the position of ethzasl_ptam in rqt_plot ?

asked 2019-09-23 13:49:45 -0500

Curiosity gravatar image

updated 2019-09-23 14:47:18 -0500

I have a ROS node (ethz-ptam) which publishes a topic /vslam/pose which is of type geometry_msgs/PoseWithCovariance message. Running:

rostopic type /vslam/pose | rosmsg show

gives the following:

std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
geometry_msgs/PoseWithCovariance pose
  geometry_msgs/Pose pose
    geometry_msgs/Point position
      float64 x
      float64 y
      float64 z
    geometry_msgs/Quaternion orientation
      float64 x
      float64 y
      float64 z
      float64 w
  float64[36] covariance

I'd like to use rqt_plot to plot a field (say Point position x). But I tried everything to "call" it in rqt_plot, but it doesn't work, the rqt_plot window shows like it should but the field is not plotted. From rostopic echo /vslam/pose I know that it is being published, so everything is working except rqt_plot. Also if I write inside the text-input-field in rqt_plot, like they say in the docs (topic-name/field:field:field): /vslam/pose/x or /vslam/pose/x:y:z nothing shows. According to the tutorials, in rqt_plot you should be able to hit the +Button next to the text-input-field, but this one is never active in my case, so it can't be pressed.

I am pretty sure that I am making some kind of mistake in referencing the message field (like x). But since I tried all variants I could think of, I'd really apprechiate some advice on how to do this and call/reference this field so that the position fields are displayed in rqt_plot.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-09-24 03:24:03 -0500

Delb gravatar image

What you have seen in the docs is wrong, can you link your doc ? In the official documentation of the rqt_plot package there is this note specifying the proper syntax.

The link says :

The input value should be the full path to the value

So in rqt_plot you need to type /topic_name/field/field...

If you want to plot the x coordinate from your topic you need to type :

/vslam/pose/pose/pose/position/x

NB : There are 3 pose because the output of rosmsg show seems to indicate that your topic /vslam/pose publish geometry_msgs/PoseWithCovarianceStamped messages instead of geometry_msgs/PoseWithCovariance as you said. That means the first pose is from the topic name, the second one is the field of type geometry_msgs/PoseWithCovariance and the last one for the geometry_msgs/Pose field.

edit flag offensive delete link more

Comments

I would link the post I found regarding the syntax, but somehow now I can't find it anymore. Really stupid since I am sure about what I saw there and posted in my question. But someone must have cleared the browser history of this lab computer. Sorry.

Curiosity gravatar image Curiosity  ( 2019-09-26 07:03:24 -0500 )edit

No problem, even in the official documentation it can be misunderstanding as it's not the same syntax when using rqt_plot in command line or with GUI.

Delb gravatar image Delb  ( 2019-09-26 07:14:14 -0500 )edit
0

answered 2019-10-01 03:54:12 -0500

Davide Faconti gravatar image

Hi,

I think you might want to try PlotJuggler, that is similar to rqt_plot but more powerful.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-09-23 13:49:45 -0500

Seen: 680 times

Last updated: Oct 01 '19