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

moveit_servo provides duplicate /get_planning_scene service server to move_group #2731

Closed
mrjogo opened this issue Mar 8, 2024 · 4 comments
Assignees
Labels
bug Something isn't working stale Inactive issues and PRs are marked as stale and may be closed automatically.

Comments

@mrjogo
Copy link

mrjogo commented Mar 8, 2024

Description

I was running into issues where objects I'd added to the planning scene (using PlanningSceneInterface) were disappearing, and discovered that running ros2 service call /get_planning_scene moveit_msgs/srv/GetPlanningScene would sometimes return a response with the objects and sometimes without. I narrowed the problem down to only happening when I launched moveit_servo, and by running ros2 node info /servo_node_private_94365815282960 discovered that it was providing a /get_planning_scene service server in addition to the move_group. I'm assuming the issue is that there's two servers/planning scenes running, and any calls will arbitrarily hit one or the other of them.

I could namespace the servo_node, but it seems like the default behavior shouldn't cause problems.

Your environment

  • ROS Distro: Humble
  • OS Version: Ubuntu 22.04
  • Source or Binary build? Binary
  • If binary, which release version? 2.5.5-1jammy.20240126.074529
  • If source, which branch? N/A
  • Which RMW (Fast DDS or Cyclone DDS)? Default for Humble

Steps to reproduce

The MoveIt launchfile I'm using is based on https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/humble/ur_moveit_config/launch/ur_moveit.launch.py, and the relevant node that causes problems is:

servo_yaml = load_yaml("ur_moveit_config", "config/ur_servo.yaml")
servo_params = {"moveit_servo": servo_yaml}
servo_node = Node(
    package="moveit_servo",
    executable="servo_node_main",
    parameters=[
        servo_params,
    ],
    output="screen",
)

Expected behaviour

The servo node shouldn't clobber the move_group's planning scene

Actual behaviour

Two dueling planning scenes

Backtrace or Console output

N/A

@mrjogo mrjogo added the bug Something isn't working label Mar 8, 2024
@mrjogo
Copy link
Author

mrjogo commented Mar 8, 2024

This is possibly root cause of #1775

@sea-bass
Copy link
Contributor

Thanks for reporting this!

Does the issue stand if you set the paremeter is_primary_planning_scene_monitor: false -- for example, here:
https://github.com/ros-planning/moveit2/blob/main/moveit_ros/moveit_servo/config/panda_simulated_config.yaml#L37

@sea-bass sea-bass self-assigned this Mar 10, 2024
Copy link

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

@github-actions github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Apr 25, 2024
@mrjogo
Copy link
Author

mrjogo commented May 11, 2024

Can confirm adding is_primary_planning_scene_monitor: false fixes the problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Inactive issues and PRs are marked as stale and may be closed automatically.
Projects
None yet
Development

No branches or pull requests

2 participants