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

Remove Body #1591

Open
JonathanKuelz opened this issue Jan 20, 2022 · 2 comments
Open

Remove Body #1591

JonathanKuelz opened this issue Jan 20, 2022 · 2 comments

Comments

@JonathanKuelz
Copy link

JonathanKuelz commented Jan 20, 2022

Hey,
I am working on modular robotics with pinocchio, which means I build lots of robots composed of the same modules. It would be convenient if it was possible to add and remove bodies and joints for this purpose (as mentioned in #1451 ) instead of building every combination from scratch.

I am only working with the python wrappers, where I was able to add as many joints / bodies as I want. However, removing parts of the kinematic chain fails as I have no access to the n-{bodies, joints, frames, qs, vs} properties of a model. Is it somehow possible to decrement these read-only properties in python? I believe I have the rest of the removing procedure figured out, so this would be a workaround until removing parts from the kinematic chain will be properly supported in pinocchio.

EDIT: Theoretically, I could "remove" joints by building a reduced model and then removing the according frames etc., but this keeps model.nbdodies constant still

@jcarpent
Copy link
Contributor

Indeed, it would be a nice feature to add to Pinocchio
The only missing part is the need of rebuilding a Data struct as soon as the model has changed. Do you have in mind typical applications for that?

@JonathanKuelz
Copy link
Author

My personal application for that is the evaluation of different modular robots for a given task - like e.g. finding a good combination from a large set of possible modules to reach multiple poses in a work space. (Whiman et al. have done something like it for example, but they only expanded their robot while I would like to change it)

Or suppose you want to calculate the forward kinematics for a set of different grippers you are thinking about attaching to your robot - it would be more intuitive to have robot.removeLast(), robot.addNew(gripper) functionalities than to build a new robot for every gripper from scratch.

Whenever you have multiple alternatives for how to build your robot - be it a humanoid for which you want to find the ideal morphology or a modular industrial robot - I think being able to change the robot instance would be of benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants