ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to keep Pose Markers in RViz?

asked 2015-07-15 11:09:03 -0600

takahashi gravatar image

I publish a PoseStamped topic "pose" and display the pose in RViz using the display type "Pose" (with shape axes). However, I would like to keep the old poses in order to see the whole trajectory of rather than only the latest pose.

I know it is also possible to use visualization markers instead (is there a "axes" visualization marker type?) according to and use marker.action = visualization_msgs::Marker::ADD;.

But if this is possible directly in the RViz GUI, I would prefer this solution instead of implementing the markers.

edit retag flag offensive close merge delete



There was recently a pull request that was merged which may offer what you're looking for in the PoseArray display plugin:

William gravatar image William  ( 2015-07-16 19:00:17 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2016-04-13 04:23:10 -0600

swethmandava gravatar image

You can use a Pose Array

def talker():
    obj = get_poses()
    pub = rospy.Publisher('topic', PoseArray, queue_size=len(obj))
    rate = rospy.Rate(60) # 10hz
    while not rospy.is_shutdown():
        Poses = PoseArray()
        Poses.header.frame_id = "/surface"
        Poses.header.stamp =
        for i in range(len(obj)):
edit flag offensive delete link more


In this solution the full pose array is published everytime. This seems to generate a lot of overhead for large arrays (by repeatedly sending the full array) and I think it is much more efficient to have a pose visual that has an internal buffer, where the previous poses are stored.

takahashi gravatar image takahashi  ( 2016-04-13 09:32:14 -0600 )edit

answered 2015-07-15 14:20:37 -0600

You can set the buffer in RViz for that specific display. It will keep the last n elements. However, if you want a big buffer I would use the MarkerArray.

edit flag offensive delete link more


Thanks for the reply. But where can I set the buffer for a specific display? In the RViz GUI I only have the options "Topic", Shape", "Axes Length" and "Axes Radius" for a Pose.

takahashi gravatar image takahashi  ( 2015-07-16 01:59:56 -0600 )edit

Oops, yes, you are right. I confused the display with odometry display. You can build a bridge node to convert from pose to odometry message type and then use this feature.

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-07-16 02:19:36 -0600 )edit

No problem. But since I explicitly would like to have axes rather than a single arrow, I suppose I have to write a custom display type according to this tutorial.

takahashi gravatar image takahashi  ( 2015-07-16 02:39:10 -0600 )edit

This is not my best day! I thought that odometry allowed to display as axes hehe. But no, it is pose. Whatever, I would use MarkerArray :)

Javier V. Gómez gravatar image Javier V. Gómez  ( 2015-07-16 03:05:30 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2015-07-15 11:09:03 -0600

Seen: 2,206 times

Last updated: Apr 13 '16