Ask Your Question
1

How to make a geometry_msgs/PoseArray and then visualise it using rviz?

asked 2019-11-08 07:40:57 -0500

Parth2851 gravatar image

updated 2019-11-08 14:33:38 -0500

jayess gravatar image

Let's say I need to run Dijkstra's algorithm to find the shortest distance between two points.

Can anyone tell me how to make a pose array and use it to store the shortest path and then visualise it?

What I've done so far

edit retag flag offensive close merge delete

Comments

If you construct a PoseArray message in your Dijkstra node and publish it, then there is a built-in Display type in rviz to visualize this data. Might I suggest you edit your question and be a bit more specific about what part of this process you are having trouble with.

jarvisschultz gravatar image jarvisschultz  ( 2019-11-08 13:12:18 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2019-11-08 08:07:57 -0500

The easiest way to do this is using the nav_msgs/path message already available on ROS

http://docs.ros.org/api/nav_msgs/html...

It consists on an array of PoseStamped with a common header..

edit flag offensive delete link more

Comments

Plus the nav_msgs/Path it has a built-in display in rviz.

jarvisschultz gravatar image jarvisschultz  ( 2019-11-08 13:07:54 -0500 )edit
0

answered 2020-06-25 05:07:59 -0500

indraneel gravatar image

For anyone that could be interested in this in the future, attaching a project of mine I did earlier which visualises Depth First Search, Breadth First Search, Djikstras and A* in rviz : https://github.com/indraneelpatil/Gra...

I am using a nav_msgs/GridCells message to visualise the occupancy grid map and visualization_msgs/MarkerArray to visualise the cost map

Explored nodes, frontier nodes and final path are highlighted in the same messages above using specific colours.

The demos are uploaded here : https://www.youtube.com/watch?v=s5UPQ... and https://www.youtube.com/watch?v=NP1Ii...

Cheers!

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

3 followers

Stats

Asked: 2019-11-08 07:40:57 -0500

Seen: 205 times

Last updated: Jun 25 '20