orsoromeo / jet-leg

This is an open-source python package that shows how to compute the Feasible Region, i.e. the extension of the well known support region to include joint-torque limits constraints. The details are explained in this preprint:
https://arxiv.org/abs/1903.07999#
GNU Lesser General Public License v3.0
18 stars 4 forks source link

Unittest and examples fail #1

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi, Running the unittest fails for a number reasons: a) inverse_kin() takes exactly 3 arguments (7 given) b) LP_projection() takes at most 6 arguments (10 given) c) getInequalities() takes at most 3 arguments (10 given)

The example I am interested in is the actuation_region_main.py and actuation_region_example.py as I was planning to use these as the starting point to understand how I can integrate the code for my use case.

Running actuation_region_example.py result in the following error:

AttributeError: IterativeProjectionParameters instance has no attribute 'getCoMPos' The class instead has getCoMPosWF and getCoMPosBF

Running actuation_region_main.py result in the following error:

iterative_projection_bretl() takes at most 3 arguments (7 given)

Could these two examples and necessary functions be updated? Alternatively, which example is more updated that I should use?

orsoromeo commented 4 years ago

If you need to compute the feasible region (i.e., the region that consider both friction and torque limits) it will be sufficient to follow the examples/single_iterative_projection_example.py example.

Alternatively, you can also check the following two scripts that have been used to generate the plots of the manuscript (figures 6 and 8):

Please do pull origin master as first thing before you run the scripts. Thanks for your feedback about unit tests and examples. I am currently working to fix them and I have updated the Readme file to provide the same suggestions that I just wrote you above.

orsoromeo commented 4 years ago

@weicwc I am in the process of adding the possibility of parsing URDF in order to solve the inverse kinematics problem and to get the legs' jacobian (which is needed for the computation of the force polytopes). If you're interested in it please checkout the pinocchio_ik branch.

I also added the possibility of only testing whether the given robot state is stable or not (without computing the all feasible region). If you wanna see how to use this please check the following example:

This should represent a step forward for you in the case that you want to compute the feasible region for your own robot. You will just have to add the urdf of the robot and the IK will be computed automatically using pinocchio.

Please note that the current code has been tested only for the HyQ and Anymal robots, therefore the code presents these 2 main limitations at the moment:

Both points should be fairly easy to implement. Please let me know if you are interested in helping me develop these features.