wilselby / ROS_quadrotor_simulator

Quadrotor simulator using ROS, Gazebo, and RVIZ
270 stars 125 forks source link

Octomap does not clear obstacles that were removed #39

Open atzzy opened 5 years ago

atzzy commented 5 years ago

I am running Ubuntu 16.04 LTS, ROS Kinetic and Gazebo 8.6 When I place an obstacle in gazebo, Moveit is able to detect the object and voxels are seen on RVIZ. However when I remove the object or shift the object, the voxels at where the object previously was does not clear or disappear. How can I get Octomap to update the map without having the clear the map everytime?

Object placed at Position A: screenshot from 2018-09-02 14-52-45

Object moved to Position B but RVIZ still shows object at Position A: screenshot from 2018-09-02 14-53-03

wilselby commented 5 years ago

Maybe there is an octomap setting that clears obstacles? I know the navigation package has parameters for that.

sdfryc-uts commented 5 years ago

Related information: https://answers.ros.org/question/287390/

Unfortunately I was unable to find a simple solution to this. For my application I was able to pre-process the point cloud data before sending it to Moveit by converting all NaN values to be equal to the 'octomap_max_range' value. This should clear cells that are no longer occupied, however this increases the amount of ray-tracing required which can be computationally expensive.

kvnptl commented 3 years ago

I am running Ubuntu 16.04 LTS, ROS Kinetic and Gazebo 8.6 When I place an obstacle in gazebo, Moveit is able to detect the object and voxels are seen on RVIZ. However when I remove the object or shift the object, the voxels at where the object previously was does not clear or disappear. How can I get Octomap to update the map without having the clear the map everytime?

Object placed at Position A: screenshot from 2018-09-02 14-52-45

Object moved to Position B but RVIZ still shows object at Position A: screenshot from 2018-09-02 14-53-03

I am facing exactly the same issue. Right now, rosservice call /clear_octomap is the only workaround for me.

Is there any better way of doing this?

Configuration: ROS melodic and Ubuntu 18.04