Ask Your Question
0

Draw on a map with mouse

asked 2016-06-24 12:49:18 -0500

petermitrano gravatar image

updated 2016-06-24 12:49:47 -0500

I'm looking for a user to demonstrate trajectories on a map. I'm using RViz for everything, so an RViz would be excellent but other options are ok too. The map is coming from map_server as nav_msgs::OccupancyGrid I want the user to click and drag to draw on the map, and I want to be able to produce a standard nav_msgs::Path from it. Any ideas how to do this?

Do I have to make my own application from the ground up for this? Or can rviz be hacked to do this?

edit retag flag offensive close merge delete

Comments

+1 Here ! , I also want to draw things (like polygons) on the map , to define prohibited area easily without image editors and save it as a new file for global costmap. Any suggestions?

C3MX gravatar imageC3MX ( 2016-10-07 01:14:13 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-06-24 14:01:29 -0500

130s gravatar image

updated 2016-06-24 14:50:06 -0500

May not be what you need though, use Publish Point tool on RViz (surprisingly I don't find it described anywhere on ROS wiki). It's usually on the top bar of RViz. See this video that shows placing multiple Publish Points in a closed loop draws polygon.

I want the user to click and drag to draw on the map, and I want to be able to produce a standard nav_msgs::Path from it. Any ideas how to do this?

Not entirely sure, but with frontier_exploration package you can specify a region for the robot to explore, and the software computes a path to that location. In the same link I mentioned above is a bit more about the package.

edit flag offensive delete link more
0

answered 2016-06-24 13:13:13 -0500

William gravatar image

You can either write an rviz plugin (I'm not aware of an existing one that does this) or you can try to do it with interactive markers:

http://wiki.ros.org/interactive_markers

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

1 follower

Stats

Asked: 2016-06-24 12:49:18 -0500

Seen: 635 times

Last updated: Jun 24 '16