Allow clearing all collision objects#69
Merged
AndrejOrsula merged 2 commits intoAndrejOrsula:masterfrom May 19, 2024
Merged
Conversation
AndrejOrsula
approved these changes
May 19, 2024
Owner
AndrejOrsula
left a comment
There was a problem hiding this comment.
Thank you @amalnanavati! Looks good and thanks also for updating the code for scaling the model.
I'm okay with either merging it to master or devel. Since it strictly adds functionality, perhaps it only needs to be a minor release?
Yeah, using the default branch is fine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Although users can theoretically remove all collision obejcts by removing them one-at-a-time with
remove_collision_object, that process has two downsides: (a) it is slow; and (b) collision object updates that are sent via topic publication are not always processed by MoveIt, particularly if multiple are sent in quick succession.Thus, this PR adds the ability for users to clear all collision objects in the planning scene via service call.
Testing
ros2 launch panda_moveit_config ex_fake_control.launch.pyros2 run pymoveit2 ex_collision_mesh.py --ros-args -p position:="[0.5, 0.0, 0.0]" -p quat_xyzw:="[0.0, 0.0, -0.7071, 0.7071]"ros2 run pymoveit2 ex_collision_primitive.py --ros-args -p shape:="sphere" -p position:="[0.5, 0.0, 0.5]" -p dimensions:="[0.04]"ros2 run pymoveit2 ex_clear_planning_scene.pyros2 run pymoveit2 ex_clear_planning_scene.py --ros-args -p cancel_after:=0.0. Verify that the code succesfully runs. (Note: although the function call will attempt to cancel the service, there is no guarentees that the service will actually be canceled. This is mainly beneficial in case the service is running too long or blocking.)Note
I'm okay with either merging it to
masterordevel. Since it strictly adds functionality, perhaps it only needs to be a minor release?