Robotics StackExchange | Archived questions

Make Trajectory from Positions

I am using a camera for visual odometry using viso2ros monoodometer. I have these the positions in following formats:

geometry_msgs/PoseStamped
geometry_msgs/Pose
nav_msgs/Odometry
geometry_msgs/PoseWithCovariance

The positions are 3D. I want to have a line to show the trajectory with out any map or background. What is the best way to make a trajectory out of the positions that I have? I have tried Rvis, by adding an odometry, I get number of arrays showing the current position. but it is not what I want.

Asked by Mary on 2017-05-18 09:04:50 UTC

Comments

Answers

If you have a number of points, you can iterate through them to create markers. The markers can be spheres (ie points in space) or lines if you want to visualize it as a trajectory (see the line strip section for the marker documentation). But the location and frame of these markers would come from the existing Poses you have collected.

RViz supports displaying marker arrays from a topic. So you would publish the markers as a single marker array message to a topic of your choosing, then subscribe to that topic in RViz using the MarkerArray Display plugin.

Asked by maxsvetlik on 2017-05-26 16:15:00 UTC

Comments