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

Ahaffemayer/add panda collision #242

Open
wants to merge 27 commits into
base: devel
Choose a base branch
from

Conversation

ArthurH91
Copy link

Hello, here's a PR to have the panda robot with the capsules in its collision model directly in example robot data.

In this Pr is included:

  • A new URDF with the cylinders & spheres description of the Panda Robot.
  • A subclass of RobotLoader which create a robot model from the URDF, then transform all the spheres/cylinders couple into capsules.

I decided to have the hand and the fingers described as boxes here because it's more faithful to the real representation. However, on your input, I can change and transform it into capsules.

Here's a superposed view of the visual model (with meshes) and the collision model:

Screenshot from 2024-10-29 13-06-55

@hrp2-14
Copy link

hrp2-14 commented Oct 29, 2024

Hi ! This project doesn't usually accept pull requests on the main branch.
If this wasn't intentionnal, you can change the base branch of this PR to devel
(No need to close it for that). Best, a bot.

@ArthurH91 ArthurH91 changed the base branch from master to devel October 29, 2024 12:17
@ArthurH91
Copy link
Author

Here's the modified version with hand and fingers as capsules.

image

@ArthurH91 ArthurH91 marked this pull request as ready for review October 29, 2024 18:02
@nim65s nim65s force-pushed the ahaffemayer/add-panda-collision branch from d27fab3 to 3f8fbe1 Compare November 4, 2024 12:08
Copy link
Member

@nim65s nim65s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased on devel, this might help with CI.

I made a few comments, but also you should add a test

python/example_robot_data/robots_loader.py Outdated Show resolved Hide resolved
python/example_robot_data/robots_loader.py Outdated Show resolved Hide resolved
python/example_robot_data/robots_loader.py Outdated Show resolved Hide resolved
# Iterate through geometry objects in the collision model
for geom_object in cmodel.geometryObjects:
geometry = geom_object.geometry
base_name = geom_object.name[:-1] # Remove the last character from the name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove that last character ?

Copy link
Author

@ArthurH91 ArthurH91 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from the URDF parsing.

If for an urdf link we have several collision geometry objects, they'll be listed as object_0, object_1, ... . This is especially relevant for capsules where you find "link1_0", "link1_1", "link1_2" where one is a cylinder and the two other are spheres.

Here, we only want the name to be "link1_" without the number, so we get rid of the last one.

python/example_robot_data/robots_loader.py Outdated Show resolved Hide resolved
python/example_robot_data/robots_loader.py Outdated Show resolved Hide resolved
@ArthurH91
Copy link
Author

Thank you for the review, should be good to go now.

@ArthurH91 ArthurH91 requested a review from nim65s November 4, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants