-
Notifications
You must be signed in to change notification settings - Fork 984
Closed
Description
Description
We use the following code to clear the Octomap:
m_planningSceneMonitor->clearOctomap();
// TODO: octomap is not updated visually with planningSceneMonitor->clearOctomap().
// This workaround fixes the problem, but often causes a crash
planning_scene_monitor::LockedPlanningSceneRW ps(m_planningSceneMonitor);
m_planningSceneMonitor->triggerSceneUpdateEvent(planning_scene_monitor::PlanningSceneMonitor::UPDATE_SCENE);
but shouldn't this update be triggered internally here?
https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp#L498
void planning_scene_monitor::PlanningSceneMonitor::clearOctomap()
{
octomap_monitor_->getOcTreePtr()->lockWrite();
octomap_monitor_->getOcTreePtr()->clear();
octomap_monitor_->getOcTreePtr()->unlockWrite();
}
Also I'm not sure about the locking necessary
I will provide a PR once I have the time and some feedback here
Your environment
- ROS Distro: Kinetic
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels