moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

MoveItPy overrides planning scene

Open christian-rauch opened this issue 5 months ago • 4 comments

Description

Instantiating MoveItPy overrides a previously published planning scene.

Your environment

  • ROS Distro: Humble with moveit 2.8 from source
  • OS Version: Ubuntu 22.04
  • Source or Binary build? both
  • If binary, which release version?
  • If source, which branch? 2.8
  • Which RMW (Fast DDS or Cyclone DDS)? Cyclone.

Steps to reproduce

  1. ros2 launch franka_moveit_config moveit.launch.py robot_ip:=dont-care use_fake_hardware:=true
  2. add a collision object in RViz under Scene Objects and Publish
  3. construct a MoveItPy with the motion_planning_python_api_tutorial.yaml from the tutorials and monitored_planning_scene_topic: "/monitored_planning_scene":
    #!/usr/bin/env python3
    from moveit.planning import MoveItPy
    from moveit_configs_utils import MoveItConfigsBuilder
    import os
    if __name__ == '__main__':
        # https://raw.githubusercontent.com/ros-planning/moveit2_tutorials/main/doc/examples/motion_planning_python_api/config/motion_planning_python_api_tutorial.yaml
        # monitored_planning_scene_topic: "/monitored_planning_scene"
        moveit_cfg_dict = MoveItConfigsBuilder(
            robot_name="panda", package_name="moveit_resources_panda_moveit_config")\
            .moveit_cpp(file_path=os.path.join(os.getcwd(), "motion_planning_python_api_tutorial.yaml"))\
            .to_moveit_configs().to_dict()
        moveit = MoveItPy(node_name="moveit_python", config_dict=moveit_cfg_dict)
    

Expected behaviour

The Python bindings should behave like the C++ API and not change the already published scene.

Actual behaviour

The Python bindings publish an empty planning scene on /monitored_planning_scene, overriding the previously defined collision objects. This does not happen with the C++ API.

christian-rauch avatar Jan 23 '24 11:01 christian-rauch

How you install the MoveItPy with ROS2 humble ?

wei1224hf avatar Jan 26 '24 14:01 wei1224hf

How you install the MoveItPy with ROS2 humble ?

Compile from source.

christian-rauch avatar Jan 26 '24 14:01 christian-rauch

Hi @christian-rauch,

Thanks for posting this issue, I'll try to find time to investigate this bug further.

peterdavidfagan avatar Feb 07 '24 09:02 peterdavidfagan

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[bot] avatar Apr 12 '24 12:04 github-actions[bot]