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

Revision history [back]

That should not happen. It should return "true" only if an occupied cell was hit, and that in the right direction. Can you post more code that produces this behavior, what type is PointOutT and "tree"? Which version of octomap / the octomap_mapping stack are you using? What does your map look like, from your last sentence I assume that you are raycasting into space where there are no occupied voxels?

That should not happen. It should return "true" only if an occupied cell was hit, and that in the right direction. Can you post more code that produces this behavior, what type is PointOutT and "tree"? Which version of octomap / the octomap_mapping stack are you using? What does your map look like, from your last sentence I assume that you are raycasting into space where there are no occupied voxels?


After some more testing (you are indeed using the latest version), it looks like an overflow / wrap around effect. You don't specify a maximum range to raycast and at some point hit the boundary of the octree. Instead of returning with an error, the ray continues on the other side. This will be fixed in the next release. Until then, just specify a sensible maxRange for the raycast. This will also speed up the computation because you won't run until the end of the coordinate system if there is nothing to hit! Another option would be to set ignoreUnknown to false.

That should not happen. It should return "true" only if an occupied cell was hit, and that in the right direction. Can you post more code that produces this behavior, what type is PointOutT and "tree"? Which version of octomap / the octomap_mapping stack are you using? What does your map look like, from your last sentence I assume that you are raycasting into space where there are no occupied voxels?


After some more testing (you are indeed using the latest version), it looks like an overflow / wrap around effect. You don't specify a maximum range to raycast and at some point hit the boundary of the octree. Instead of returning with an error, the ray continues on the other side. This will be fixed in the next release. Until then, just specify a sensible maxRange for the raycast. This will also speed up the computation because you won't run until the end of the coordinate system if there is nothing to hit! Another option would be to set ignoreUnknown to false.


Update: OctoMap was patched to fix this undesired behavior (version 1.2.1). The octomap package in the trunk at alufr-ros-pkg was already updated, a fixed 0.3.4 release will be available soon.