Skip to content

publish_scene_from_text does not work without --scene #2104

@christian-rauch

Description

@christian-rauch

Description

The tool moveit_publish_scene_from_text does not work without providing --scene and hence cannot publish on topic /planning_scene_world.

Origin of the Problem

The --scene flag changes the topic of where the scene is published on. This is controlled by full_scene in the code:
https://github.com/ros-planning/moveit2/blob/c686bb8dc312029430d6c353799ef462d05bb3e7/moveit_ros/planning/planning_components_tools/src/publish_scene_from_text.cpp#L62-L67
and then sets the topic:
https://github.com/ros-planning/moveit2/blob/c686bb8dc312029430d6c353799ef462d05bb3e7/moveit_ros/planning/planning_components_tools/src/publish_scene_from_text.cpp#L77-L86

The topic is either /planning_scene (with --scene) or /planning_scene_world (without --scene).

However, when the node waits here:
https://github.com/ros-planning/moveit2/blob/c686bb8dc312029430d6c353799ef462d05bb3e7/moveit_ros/planning/planning_components_tools/src/publish_scene_from_text.cpp#L103-L105
it only considers the option for the pub_scene topic which is only defined when --scene is set.

Removing the last "waiting" part fixes the issue and successfully publishes the "world" on /planning_scene_world.

Steps to reproduce

Terminal 1 (publish scene):

ros2 run moveit_ros_planning moveit_publish_scene_from_text ${scene_file} --ros-args -p robot_description:="${urdf}" -p robot_description_semantic:="${srdf}"

Terminal 2 (monitor scene):

ros2 topic echo /planning_scene_world

Expected behaviour

The scene message should be published on topic /planning_scene_world.

Actual behaviour

No messages arrive.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpersistentAllows issues to remain open without automatic stalling and closing.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions