ubunturosrqt

ROS: How to use rqt_plot to display a field of /geometry_msgs/PoseWithCovarianceMessage?


I have a ROS node 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.

So basically I'd like to know how to get one of the position fields into rqt_plot. And how correctly refer to these message fields.

Thanks!


Solution

  • Have a look at this. It states, that you need the full path to your field. In your case that would be:

    /vslam/pose/pose/pose/position/x:y:z