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

Revision history [back]

click to hide/show revision 1
initial version

Obstacles get cleared between the camera and a measurement point. Every measurement point with a "normal" value (includes 0 and everything except infinity and NaN) is an obstacle. So what you did is basically say there is an obstacle at each point in front of the robot and its value (which can mean e.g. color) is 0.

Depending on what kind of "camera" you will be using later, set the points and their values as following:

  • Depth camera which also can return measurements like out of range, too close, invalid etc: The best thing is to put the values as described in REP 117 (http://www.ros.org/reps/rep-0117.html#specification). In case of out of range detections put the infinity value at the point of the measurement ray where the ray leaves the measurement range. This way everything from the camera position to the end of measurement range will be cleared. (code: https://github.com/ros-planning/navigation/blob/hydro-devel/costmap_2d/plugins/obstacle_layer.cpp#L428)

  • "Visual camera" (stereo camera?) which _always_ outputs valid measurement points: Just input your point cloud with the points you get from the camera. The space between the camera position and the points in the pointcloud get cleared.

In both cases check if the settings of the obstacle cloud are set to clearing (It can be clearing and markign at the same time, http://wiki.ros.org/costmap_2d/hydro/obstacles)!

Obstacles get cleared between the camera and a measurement point. Every measurement point with a "normal" value (includes 0 and everything except infinity and NaN) is an obstacle. So what you did is basically say there is an obstacle at each point in front of the robot and its value (which can mean e.g. color) is 0.

Depending on what kind of "camera" you will be using later, set the points and their values as following:

  • Depth camera which also can return measurements like out of range, too close, invalid etc: The best thing is to put the values as described in REP 117 (http://www.ros.org/reps/rep-0117.html#specification). In case of out of range detections put the infinity value at the point of the measurement ray where the ray leaves the measurement range. This way everything from the camera position to the end of measurement range will be cleared. (code: https://github.com/ros-planning/navigation/blob/hydro-devel/costmap_2d/plugins/obstacle_layer.cpp#L428)

  • "Visual camera" (stereo camera?) which _always_ outputs valid measurement points: Just input your point cloud with the points you get from the camera. The space between the camera position and the points in the pointcloud get cleared.

In both cases check if the settings of the obstacle cloud are set to clearing (It can be clearing and markign at the same time, http://wiki.ros.org/costmap_2d/hydro/obstacles)!

http://wiki.ros.org/costmap_2d/hydro/obstacles)