-
Notifications
You must be signed in to change notification settings - Fork 61
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
Allow users to (dis)allow collisions with an object #50
Allow users to (dis)allow collisions with an object #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this contribution!
It looks good to me, and this is indeed very useful! Just two minor comments.
PS: Sorry for taking a long time to look at this.
Note that although (dis)allowing collisions is asynchronous, within the call it synchronously waits for the planning scene. This should be improved in the future to make it a fully asynchronous call (maybe pymoveit2 subscribes to the MoveGroup's published planning scene topic so it constantly maintains an upt-to-date planning scene?).
I do not know much about the practicalities of the planning scene, but I think the current approach is fine and should be sufficient in most cases. Thank you!
* Added functions to enable/disable collisions with an object vis the allowed collision matrix * Clarified function name, reduced replicated code * Made toggling collisions async * Fix type annotations for consistency * formatting * Added tests * Spelling * Update docstring * Fix unnecessary change
* Added functions to enable/disable collisions with an object vis the allowed collision matrix * Clarified function name, reduced replicated code * Made toggling collisions async * Fix type annotations for consistency * formatting * Added tests * Spelling * Update docstring * Fix unnecessary change
Description
This PR extendes
pymoveit2
to allow users to (dis)allow collisions between one object and all other objects. In practice, this is useful because a robot typically consists of many objects/links, so instead of specifying every object ID for a robot part that we want to (dis)allow collisions with, it is easier to just (dis)allow collisions with all objects, which includes the whole robot.Testing
ros2 launch panda_moveit_config ex_fake_control.launch.py
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_allow_collisions.py --ros-args -p id:="sphere" -p allow:=true
ros2 run pymoveit2 ex_allow_collisions.py --ros-args -p id:="sphere" -p allow:=false
Notes / Future Work
pymoveit2
subscribes to the MoveGroup's published planning scene topic so it constantly maintains an upt-to-date planning scene?).