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

Fix planning_scene_monitor sync when passed empty robot state #3187

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,12 @@ bool PlanningSceneMonitor::newPlanningSceneMessage(const moveit_msgs::msg::Plann

if (!scene.is_diff && parent_scene_)
{
// if the scene does not contain a robot state then use the latest value from the current_state_monitor_
// so that we are not updating the scene with stale values for the robot's state.
if (scene.robot_state.joint_state.name.empty() && current_state_monitor_->haveCompleteState())
MarqRazz marked this conversation as resolved.
Show resolved Hide resolved
{
parent_scene_->setCurrentState(*current_state_monitor_->getCurrentState());
MarqRazz marked this conversation as resolved.
Show resolved Hide resolved
}
// clear maintained (diff) scene_ and set the full new scene in parent_scene_ instead
scene_->clearDiffs();
result = parent_scene_->setPlanningSceneMsg(scene);
Expand Down
Loading