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

how to mark a special thing in a occupy map?

asked 2015-03-23 02:34:10 -0500

Anthony Brooks gravatar image

updated 2015-03-23 02:35:24 -0500

Hello everyone:

I am making a 'DIY' robot , now I want to mark some special mark (red dot......)in the occupy map (made by SLAM) when I found some special things from the usb_cam. Could anybody give me some advise ,thanks a lot .

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-23 10:43:32 -0500

lucasw gravatar image

updated 2015-03-25 17:00:31 -0500

You could create a special 'fake' LaserScan publisher to inject obstacles into the costmap. Put the LaserScan into the same frame as the usb_cam (or possibly rotated 90 degrees if the depth convention of cameras vs. lasers is different, I forget). When you detect something in the camera, publish a synthesized laser scan.

sensor_msgs/Range would make more sense but last I looked that isn't supported by the costmap node (it would also be great to have a direct message to set a certain x,y location to lethal obstacle or clear it).

You have to set the LaserScan to generate 2 or 3 points in a tight beam even if you only really wanted one- I encountered what might be a bug where a single point LaserScan did not get processed properly. As long as the points are close to each other they should be fine. You could also generate a point cloud.

Don't generate obstacles inside the robot footprint, if I remember correctly they get automatically cleared.

There are some instructions on and I have an example in (though set negate to 1 as I eventually figured out).

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-03-23 02:34:10 -0500

Seen: 644 times

Last updated: Mar 25 '15