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

How to use rviz to show multiple planning paths

asked 2015-11-12 23:04:20 -0500

aids gravatar image

updated 2021-08-07 18:07:19 -0500

lucasw gravatar image

Hello everyone, i'm doing path planing,i want to show multiple planing paths using rviz at one time,but i find <nav_msgs::path> message can only be showed one planning path on rviz.How shoud i do?My multiple planing paths is stored in a vector like vector<nav_msgs::path> finalpath.Thanks for your help!!!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-11-18 05:11:47 -0500

AFAIK, there are four easy ways for you.

i. publish each of path

If your paths isn't too much, I suggest you set name for each of path and publish that.

ii. marker array

Follow the Javier's answer.

iii. polygon array

Install jsk_rviz_plugins and then you will can be visualize polygon array type on RViz.


iv. path array

Creating new display plugin for custom path array message like nav_msgs/Path[].

edit flag offensive delete link more


thank you very much,i got it

aids293 gravatar image aids293  ( 2016-02-19 20:44:53 -0500 )edit

answered 2015-11-16 01:57:32 -0500

I am not sure if there is a better option, but most probably the solution is to convert from vector<nav_msgs::path> to a marker array using line strips or line lists.

More info here (sorry I cannot find the markerarray tutorial)

edit flag offensive delete link more

Question Tools



Asked: 2015-11-12 23:04:20 -0500

Seen: 3,610 times

Last updated: Aug 07 '21