Gepetto / example-robot-data

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

Add cassie robot in example-robot-data #100

Closed proyan closed 2 years ago

proyan commented 3 years ago

This draft PR introduces the cassie_description, which is taken from https://github.com/proyan/cassie-gazebo-sim. The model introduced is sdf format. I use the cassie_v2.sdf to produce examples for pinocchio3, and which we reproduced in the paper. The python bindings for the eventual loadCassie would thus depend on the pinocchio version being installed.

I open this PR to discuss how to 1) best handle the multiple other cassie models available (https://github.com/DAIRLab/dairlib/issues/17), and what to introduce and not. 2) How to handle the API for different sdf models as well. I re-wrote cassie_v2 from the original sdf file which when parsed with pinocchio makes sure that the constraint appears on the ball joint. We should make it the default model loaded, but it isn't the standard model available from Agility. 3) Confirm Licenses when copying the files

proyan commented 3 years ago

@nim65s This PR is okay for review

cmastalli commented 3 years ago
1. best handle the multiple other cassie models available (

We could have different Cassie versions, for instance,

import example_robot_data
cassie = example_robot_data.load("cassie") # includes gearbox and planar linkage
cassie = example_robot_data.load("cassie_without_mechanism") # do not include gearbox and planar linkage

I believe these two cases might be useful for many of us. But, of course, we might create a more elaborated list of Cassie models.

proyan commented 3 years ago

I made a proposition to ease this in #101. The idea is to be more generic If we follow it, I think we don't need any pinocchio version check here.

If you merge #101 before, then the CassieLoader could be simplified as well. However, I don't see a good way to handle multiple versions of the same robot. However, It might be useful if we can take the urdf/sdf filename inside the arguments list, since that way the custom naming could be avoided. I'm not sure how it might be best handled with the existing API. I'll wait for #101 before modifying this PR

proyan commented 2 years ago

This PR is ready for review @nim65s

proyan commented 2 years ago

Please fix flake8:

./python/example_robot_data/robots_loader.py:271:1: E302 expected 2 blank lines, found 1
./unittest/test_load.py:45:1: W293 blank line contains whitespace
./unittest/test_load.py:48:1: W293 blank line contains whitespace

What version of flake8 do you use for ci? I get many more suggested fixes than the above 2

nim65s commented 2 years ago

That's from https://github.com/Gepetto/linters : you can run it with docker run --rm -v $PWD:/root/src -it gepetto/linters. It's the latest version, with the following configuration: https://github.com/Gepetto/linters/blob/master/setup.cfg#L1

nim65s commented 2 years ago

Oh, and I forgot that we need a import pinocchio as pin in the test file

proyan commented 2 years ago

Could we please merge this, and make a release?