Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating PlanningScene after clearOctomap #439

Closed
simonschmeisser opened this issue Jan 31, 2017 · 2 comments
Closed

Updating PlanningScene after clearOctomap #439

simonschmeisser opened this issue Jan 31, 2017 · 2 comments

Comments

@simonschmeisser
Copy link
Contributor

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
@v4hn
Copy link
Contributor

v4hn commented Jan 31, 2017 via email

@rhaschke
Copy link
Contributor

Fixed by #3134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants