Gepetto / example-robot-data

Set of robot URDFs for benchmarking and developed examples.
BSD 3-Clause "New" or "Revised" License
144 stars 51 forks source link

python: allow loading of multiple robots #56

Closed nim65s closed 3 years ago

nim65s commented 3 years ago

Hi,

The first commit is because I saw in our code base that people are using helpers to load our robots, but then need urdf / srdf paths for something else, and have to recompute that by themselves.

The second commit was a request from @thomasfla

nim65s commented 3 years ago

If we try to do this with a simple user-facing API, I think we only end up with a RobotWrapperWrapper, which proxy RobotWrapper plus add q0 and 3 paths. Is this what we want ?

nim65s commented 3 years ago

Another option would be to expose those things directly in pinocchio's RobotWrapper. For me, the main issue is that q0 collides with something already defined differently in pinocchio:

https://github.com/stack-of-tasks/pinocchio/blob/17c479e2fe91905122713643f489feb8ddf135a3/bindings/python/pinocchio/robot_wrapper.py#L33

proyan commented 3 years ago

Could we merge this? Who has write access on this repo?

cmastalli commented 3 years ago

Could we merge this? Who has write access on this repo?

The current solution appends the path into the robotwrapper class. It would be ideal to do not do it, it also requires the user to learn that we pass a modified version of the robotwrapper.

What I propose is to create a dedicated function to retrieve the paths, and eventually another one to get the default state.

nim65s commented 3 years ago

@cmastalli : We can't have a "simple" function, can we ? Could you outline the prototype of the function you are thinking about ?

cmastalli commented 3 years ago

@cmastalli : We can't have a "simple" function, can we ? Could you outline the prototype of the function you are thinking about ?

What about

(or something like that)