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

Humanoid planning planners #12

Merged
merged 100 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
9ad4e15
Initial drafting of humanoid walking on flat ground
S-Dafarra Aug 2, 2023
cb6466f
Moved humanoid_walking_flat_ground planner to dedicated folder
S-Dafarra Aug 7, 2023
dce6b51
Added all dynamics in flat ground planner
S-Dafarra Aug 7, 2023
119945a
Added planar complementarity to flat ground planner
S-Dafarra Aug 7, 2023
5a76166
Added dcc complementarity to flat ground planner
S-Dafarra Aug 8, 2023
ce4dd26
Added friction expression to planner and fixed the use of dcc express…
S-Dafarra Aug 8, 2023
daabe04
Added bounds on contact point control inputs
S-Dafarra Aug 8, 2023
269e891
Added constraints related to kinematics
S-Dafarra Aug 8, 2023
d084d84
Added names to expressions
S-Dafarra Aug 8, 2023
f42c9ad
Added additional constraints
S-Dafarra Aug 8, 2023
1dd062d
Added additional constraint for the maximum feet relative height
S-Dafarra Aug 8, 2023
8ba6715
Added bounds on joint positions and velocities
S-Dafarra Aug 9, 2023
08b67fb
Added contacts centroid cost
S-Dafarra Aug 9, 2023
5c1a520
Separate the inputs needed to the centroidal dynamics
S-Dafarra Aug 9, 2023
e462c05
Refactoring of planner splitting the init into methods
S-Dafarra Aug 9, 2023
c1eaf6a
Added frame regularization costs
S-Dafarra Aug 9, 2023
5ce1ef1
Fixed used of initial conditions in planner
S-Dafarra Aug 9, 2023
c0044f0
Added base quaternion velocity and joints regularization
S-Dafarra Aug 9, 2023
209fb6b
Added cost on force regularization
S-Dafarra Aug 10, 2023
2ab9b2c
Moved references to dedicated structure
S-Dafarra Aug 10, 2023
cccff87
Fixed base quaternion cost
S-Dafarra Aug 10, 2023
3c92fed
Moved feet references to custom class and implemented yaw regularizat…
S-Dafarra Aug 10, 2023
4efcf17
Added contact point regularization
S-Dafarra Aug 11, 2023
57f5f06
Implemented method to get/set the initial guess and set the references
S-Dafarra Aug 11, 2023
6aee68f
Added possibility to set casadi options to opti in planner
S-Dafarra Aug 11, 2023
069d020
Added dt to the settings
S-Dafarra Aug 11, 2023
1129ec7
Refactor variables to extract initial states
S-Dafarra Aug 11, 2023
f605e30
Moved initial state to dedicated dataclass
S-Dafarra Aug 16, 2023
bfd5729
Improved definition of composite types
S-Dafarra Aug 16, 2023
dbc98c6
Specified that references are time varying
S-Dafarra Aug 16, 2023
9d99a2e
Some bugfixes (not all) on planner.py
S-Dafarra Aug 16, 2023
89e598f
Fixed used of casadi transpose and horzcat
S-Dafarra Aug 17, 2023
b23356e
Fixed setting of feet references
S-Dafarra Aug 17, 2023
687b16a
Bugfix on planner
S-Dafarra Aug 17, 2023
27ae02c
Exploiting the OverridableVariable mechanism and added HumanoidState
S-Dafarra Sep 12, 2023
3448e7e
Fixed regularization of contact forces
S-Dafarra Oct 4, 2023
4eb9623
First draft of HumanoidPoseFinder
S-Dafarra Oct 4, 2023
f47010e
Added regularization of com position in pose finder
S-Dafarra Oct 4, 2023
e72b86a
Setting the references in the pose finder
S-Dafarra Oct 10, 2023
d1a3173
The humanoid pose finder outputs something
S-Dafarra Oct 10, 2023
83228c4
Added initial version of HumanStateVisualizer
S-Dafarra Oct 13, 2023
17afde8
Added gitignore for stl and urdf files in humanoid_pose_finder
S-Dafarra Oct 13, 2023
d1338f0
Fixed setting of contact points in foot frame
S-Dafarra Oct 14, 2023
7c23e55
Added visualization of the HumanoidState
S-Dafarra Oct 14, 2023
7ae184f
Adding rotation error in pose finder
S-Dafarra Oct 15, 2023
1efd7c3
Using the trace in the rotation error.
S-Dafarra Oct 16, 2023
1e3dd5f
Adding visualization of two states
S-Dafarra Oct 16, 2023
363b32a
Renamed HumanoidWalkingFlatGround to Planner
S-Dafarra Oct 16, 2023
3bf5a63
The reference for the pose finder contains HumanoidState instead of i…
S-Dafarra Oct 16, 2023
cff53eb
Fixed type hinting in pose finder
S-Dafarra Oct 16, 2023
99fa7df
Fixed typo in message in PoseFinder
S-Dafarra Oct 16, 2023
427e188
Setting the initial condition of the flat ground planner from the pos…
S-Dafarra Oct 16, 2023
02f6c77
Reformat of flat ground planner to ease the conversion of the output …
S-Dafarra Oct 16, 2023
d7d12ae
Added draft to set the flat ground planner references.
S-Dafarra Oct 16, 2023
4752d87
Fixed conversion from ExtendedHumanoid to HumanoidState
S-Dafarra Oct 17, 2023
29563f2
Fixed bug in feet lateral position
S-Dafarra Oct 17, 2023
76b8f9f
First standing result
S-Dafarra Oct 17, 2023
416db20
Check that gravity is 6 dimensional in the pose finder
S-Dafarra Oct 17, 2023
3b855bd
Fixed setting of references and guesses in flat ground planner
S-Dafarra Oct 17, 2023
c694940
Using the mass regularized version of the dynamics in the planar grou…
S-Dafarra Oct 17, 2023
daea2fd
First imprecise walking
S-Dafarra Oct 17, 2023
f2193db
Fixed setting of force derivative bounds.
S-Dafarra Oct 18, 2023
c563d88
Multiplied the forces times the mass before returning the output solu…
S-Dafarra Oct 30, 2023
759a3c0
Added visualization of complementarity.
S-Dafarra Oct 31, 2023
e95a44d
Added possibility to force close the complementarity plots
S-Dafarra Oct 31, 2023
4048820
Added visualization of forces in flat ground planner
S-Dafarra Nov 2, 2023
fa98209
Multiply by the mass in the max centroidal momentum and force derivat…
S-Dafarra Nov 3, 2023
5d7e69f
Tuning for walking forward
S-Dafarra Nov 3, 2023
910258b
Renamed humanoid_walking_flat_ground to humanoid_kinodynamic
S-Dafarra Nov 3, 2023
ff6ab60
Renamed main to main_single_step_flat_ground.py
S-Dafarra Nov 3, 2023
47ac899
Added possibility to visualize multiple states at once
S-Dafarra Nov 4, 2023
070f307
Improved conversion of ExtendedHumanoid to HumanoidState
S-Dafarra Nov 24, 2023
bbcbf15
Removed centroidal momentum from the HumanoidState
S-Dafarra Nov 24, 2023
ddd89da
Added file to perform periodic motions with the kinodynamic planner
S-Dafarra Nov 24, 2023
cee4718
Moved kinodynamic planner settings to a different file
S-Dafarra Nov 27, 2023
e73ec1e
Moved kinodynamic planner variables to a different file
S-Dafarra Nov 27, 2023
524e581
Added possibility to add periodicity constraint on the control inputs
S-Dafarra Nov 27, 2023
9bbf011
Removed force plotters in the periodic step file
S-Dafarra Nov 27, 2023
9e26e2c
Added possibility to move from HumanoidState to ExtendedhumanoidState
S-Dafarra Nov 27, 2023
e15397c
Added __init__.py in humanoid pose finder
S-Dafarra Nov 28, 2023
5e76808
Specified private functions in pose finder
S-Dafarra Nov 28, 2023
c735383
Specified private functions in kinodynamic planner
S-Dafarra Nov 28, 2023
9ad32ad
Separated application of mass regularization in kinodynamic planner
S-Dafarra Nov 28, 2023
a9cb730
Using a single function to compute initial and final state
S-Dafarra Nov 28, 2023
f042851
Improved the check on the existence of centroidal_momentum when apply…
S-Dafarra Nov 29, 2023
838921e
The function to convert from HumanoidState to ExtendedHumanoid is now…
S-Dafarra Nov 29, 2023
76d73a6
Specifying a full guess in the periodic step
S-Dafarra Nov 29, 2023
09f7390
Specify the step length in the periodic step main
S-Dafarra Nov 29, 2023
9e1e001
Specified the reference joint trajectory
S-Dafarra Dec 6, 2023
74e6a99
Fixed small typo in main_periodic_step.py
S-Dafarra Jan 4, 2024
6600e31
Added first version of file for walking on two steps stairs
S-Dafarra Jan 5, 2024
41bf0da
Intermediate acceptable results of walking on stairs
S-Dafarra Jan 5, 2024
7cc1cbf
Some further improvements on the step over stairs
S-Dafarra Jan 5, 2024
9b831d6
Allow using the opti callback in the kinodynamic planner
S-Dafarra Jan 9, 2024
698f0aa
Use the opti callback in the walking over steps. Increase the constra…
S-Dafarra Jan 9, 2024
761cfa1
Fine tuning on the walking over steps
S-Dafarra Jan 11, 2024
fb574bc
Using resolve-robotics-uri-py instead of a parser
S-Dafarra Jan 26, 2024
1bc1256
Updated README.md
S-Dafarra Jan 26, 2024
3e70dd0
Updated black version
S-Dafarra Jan 26, 2024
a37a6a2
Fixed setting of initial desired CoM position in the periodic step
S-Dafarra Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Dependencies
shell: bash -l {0}
run: |
mamba install python=${{ matrix.python }} casadi pytest liecasadi adam-robotics idyntree meshcat-python ffmpeg-python matplotlib
mamba install python=${{ matrix.python }} casadi pytest liecasadi adam-robotics idyntree meshcat-python ffmpeg-python matplotlib resolve-robotics-uri-py
mamba list

- name: Install
Expand Down
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,36 @@ hippopt is an open-source framework for generating whole-body trajectories for l

## Features

- [ ] Direct transcription of optimal control problems with multiple-shooting methods
- [ ] Support for floating-base robots, including humanoids and quadrupeds
- [ ] Integration with CasADi library for efficient numerical optimization
- [ ] Generation of optimized trajectories that include both kinematic and dynamic quantities
- [ ] Extensive documentation and examples to help you get started
- [X] Direct transcription of optimal control problems with multiple-shooting methods
- [X] Support for floating-base robots, including humanoids ...
- [ ] ... and quadrupeds
- [X] Integration with CasADi library for efficient numerical optimization
- [X] Generation of optimized trajectories that include both kinematic and dynamic quantities
- [ ] Extensive documentation
- [X] examples to help you get started

## Installation
It is suggested to use [``conda``](https://docs.conda.io/en/latest/).
It is suggested to use [``mamba``](https://github.com/conda-forge/miniforge).
```bash
conda install -c conda-forge casadi pytest
conda install -c conda-forge -c robotology python=3.11 casadi pytest liecasadi adam-robotics idyntree meshcat-python ffmpeg-python matplotlib resolve-robotics-uri-py
pip install --no-deps -e .[all]
```

## Examples
### Turnkey planners
The folder [``turnkey_planners``](src/hippopt/turnkey_planners) contains examples of whole-body trajectory optimization for legged robots.
In this folder it is possible to find the following examples:
- [``humanoid_pose_finder/main.py``](src/hippopt/turnkey_planners/humanoid_pose_finder/main.py): generates a static pose for the humanoid robot ``ergoCub`` given desired foot and center of mass positions.
- [``humanoid_kinodynamic/main_single_step_flat_ground.py``](src/hippopt/turnkey_planners/humanoid_kinodynamic/main_single_step_flat_ground.py): generates a kinodynamic trajectory for the humanoid robot ``ergoCub`` to perform a single step motion with no a-priori guess or terminal constraint.
- [``humanoid_kinodynamic/main_periodic_step.py``](src/hippopt/turnkey_planners/humanoid_kinodynamic/main_periodic_step.py): generates a kinodynamic trajectory for the humanoid robot ``ergoCub`` to perform a periodic walking motion.
- [``humanoid_kinodynamic/main_walking_on_stairs.py``](src/hippopt/turnkey_planners/humanoid_kinodynamic/main_walking_on_stairs.py): generates a kinodynamic trajectory for the humanoid robot ``ergoCub`` to perform a walking motion on stairs.

> [!IMPORTANT]
> For the tests to run, it is necessary to clone [``ergocub-software``](https://github.com/icub-tech-iit/ergocub-software) and extend the ``GAZEBO_MODEL_PATH`` environment variable to include the ``ergocub-software/urdf/ergoCub/robots`` and ``ergocub-software/urdf`` folders.

> [!NOTE]
> It is necessary to launch the examples from a folder with write permissions, as the examples will generate several files (ground meshes, output videos, ...).

## Citing this work

If you find the work useful, please consider citing:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ robot_planning=
adam-robotics
turnkey_planners=
idyntree
resolve-robotics-uri-py
visualization=
ffmpeg-python
idyntree
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions src/hippopt/turnkey_planners/humanoid_kinodynamic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.stl
*.urdf
frames/*
*.png
*.mp4
Empty file.
Loading
Loading