Ask Your Question

costmap_2d python interface?

asked 2014-07-08 13:03:08 -0500

lucasw gravatar image

updated 2020-11-21 11:23:28 -0500

Does it exist? Or is there a way to have a running costmap_2d instance, but interact with it primarily through standard ros interfaces so that python could be used on the one end at least?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-07-08 15:06:08 -0500

David Lu gravatar image

Short answer: no.

Longer answer: Previous question about navigation+python

Follow up: what are you trying to do?

edit flag offensive delete link more


Follow up answer in the form of an answer, which is legitimate because it also answers my own question sort of.

lucasw gravatar image lucasw  ( 2014-07-10 22:30:08 -0500 )edit

answered 2014-07-10 22:39:01 -0500

lucasw gravatar image

I was trying to make a simple nav_goal to cmd_vel generator outside of the move_base architecture and in python but still using as much of the supporting components as possible. I ended up bringing up costmap_2d somewhat similar to and have a python node that subscribes to the nav goal and transforms it to the base_link frame, generates a cmd_vel directly from that, and calculates the cost of the costmap of the overlap of the footprint and the subscribed costmap (which has a low 160x120 resolution and low update rate, so not a lot of performance problems there) and slows down the cmd_vel when cost is increasing and too high.

A while back I was trying to get the full move_base working, and it sort of did (it never commanded linear_y even though I configured it to be holonomic) but I decided it was easier to go with something more crude until I could devote enough effort to move_base. But I might also use OMPL in python to add obstacle avoidance as another intermediate step.

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


Asked: 2014-07-08 13:03:08 -0500

Seen: 1,418 times

Last updated: Jul 10 '14