placo 0.5.9__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of placo might be problematic. Click here for more details.
- placo-0.6.1/PKG-INFO +56 -0
- placo-0.6.1/README.md +34 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-dynamics.cpp +23 -1
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-kinematics.cpp +1 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-problem.cpp +5 -1
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-robot-wrapper.cpp +2 -0
- {placo-0.5.9 → placo-0.6.1}/placo.pyi +214 -8
- {placo-0.5.9 → placo-0.6.1}/pyproject.toml +1 -1
- {placo-0.5.9 → placo-0.6.1}/python/placo_utils/visualization.py +18 -1
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +3 -11
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/contacts.cpp +94 -5
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/contacts.h +49 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/dynamics_solver.cpp +14 -19
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/dynamics_solver.h +14 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/joints_task.cpp +10 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/joints_task.h +7 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/joints_task.cpp +10 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/joints_task.h +7 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/model/robot_wrapper.cpp +10 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/model/robot_wrapper.h +10 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/expression.cpp +34 -5
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/expression.h +8 -1
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/problem.cpp +1 -3
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/problem.h +5 -0
- placo-0.5.9/PKG-INFO +0 -25
- placo-0.5.9/README.md +0 -3
- {placo-0.5.9 → placo-0.6.1}/.clang-format +0 -0
- {placo-0.5.9 → placo-0.6.1}/.gitattributes +0 -0
- {placo-0.5.9 → placo-0.6.1}/.gitignore +0 -0
- {placo-0.5.9 → placo-0.6.1}/.readthedocs.yaml +0 -0
- {placo-0.5.9 → placo-0.6.1}/CMakeLists.txt +0 -0
- {placo-0.5.9 → placo-0.6.1}/Doxyfile +0 -0
- {placo-0.5.9 → placo-0.6.1}/LICENSE +0 -0
- {placo-0.5.9 → placo-0.6.1}/Makefile +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-eigen.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-footsteps.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-parameters.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-tools.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-utils.hpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/expose-walk-pattern-generator.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/module.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/module.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/registry.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/bindings/registry.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/doxygen_parse.py +0 -0
- {placo-0.5.9 → placo-0.6.1}/python/.vscode/settings.json +0 -0
- {placo-0.5.9 → placo-0.6.1}/python/Makefile +0 -0
- {placo-0.5.9 → placo-0.6.1}/python/placo_utils/__init__.py +0 -0
- {placo-0.5.9 → placo-0.6.1}/python/placo_utils/tf.py +0 -0
- {placo-0.5.9 → placo-0.6.1}/python/placo_utils/view.py +0 -0
- {placo-0.5.9 → placo-0.6.1}/python/run_tests.sh +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/footsteps_planner.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/humanoid_parameters.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/humanoid_robot.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/humanoid_robot.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/kick.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/lipm.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/walk_pattern_generator.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/walk_pattern_generator.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/walk_tasks.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/humanoid/walk_tasks.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/kinematics_solver.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/integrator.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/qp_error.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/sparsity.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/variable.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/problem/variable.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/cubic_spline.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/prioritized.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/utils.cpp +0 -0
- {placo-0.5.9 → placo-0.6.1}/src/placo/tools/utils.h +0 -0
- {placo-0.5.9 → placo-0.6.1}/stubs.py +0 -0
- {placo-0.5.9 → placo-0.6.1}/tweak_sdist.sh +0 -0
- {placo-0.5.9 → placo-0.6.1}/wks.yml +0 -0
placo-0.6.1/PKG-INFO
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: placo
|
|
3
|
+
Version: 0.6.1
|
|
4
|
+
Summary: PlaCo: Rhoban Planning and Control
|
|
5
|
+
Requires-Python: >= 3.8
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Author-email: Rhoban team <team@rhoban.com>
|
|
8
|
+
Project-URL: Changelog, https://github.com/rhoban/placo/blob/main/CHANGELOG.md
|
|
9
|
+
Home-page: https://placo.readthedocs.io/en/latest/
|
|
10
|
+
Project-URL: Repository, https://github.com/rhoban/placo.git
|
|
11
|
+
Requires-Dist: cmeel
|
|
12
|
+
Requires-Dist: eiquadprog >= 1.2.6, < 2
|
|
13
|
+
Requires-Dist: pin >= 2.6.18, < 3
|
|
14
|
+
Requires-Dist: rhoban-cmeel-jsoncpp
|
|
15
|
+
Requires-Dist: meshcat
|
|
16
|
+
Requires-Dist: numpy<2
|
|
17
|
+
Requires-Dist: ischedule
|
|
18
|
+
Provides-Extra: build
|
|
19
|
+
Requires-Dist: pin[build] >= 2.6.18, < 3 ; extra == "build"
|
|
20
|
+
Requires-Dist: cmeel-urdfdom[build] ; extra == "build"
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# PlaCo
|
|
24
|
+
|
|
25
|
+
PlaCo is Rhoban's planning and control library.
|
|
26
|
+
Its main features are:
|
|
27
|
+
|
|
28
|
+
* Task-space Inverse Kinematics with constraints,
|
|
29
|
+
* Task-space Inverse Dynamics with constraints,
|
|
30
|
+
* QP problem formulation,
|
|
31
|
+
* Built on the top of [pinocchio](https://github.com/stack-of-tasks/pinocchio)
|
|
32
|
+
* Written in C++ with Python bindings
|
|
33
|
+
|
|
34
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/kinematics/videos/quadruped_targets.mp4?raw=true)
|
|
35
|
+
|
|
36
|
+
*Inverse Kinematics Example: a quadruped robot hitting targets with a leg while keeping its three legs on the ground*
|
|
37
|
+
|
|
38
|
+
[source code (quadruped_targets.py)](https://github.com/Rhoban/placo-examples/blob/master/kinematics/quadruped_targets.py) / [more kinematics examples](https://placo.readthedocs.io/en/latest/kinematics/examples_gallery.html)
|
|
39
|
+
|
|
40
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/dynamics/videos/megabot.mp4?raw=true)
|
|
41
|
+
|
|
42
|
+
*Inverse Dynamics Example: a quadruped with many loop closure joints*
|
|
43
|
+
|
|
44
|
+
[source code (megabot.py)](https://github.com/Rhoban/placo-examples/blob/master/dynamics/megabot.py) / [more dynamics examples](https://placo.readthedocs.io/en/latest/dynamics/examples_gallery.html)
|
|
45
|
+
|
|
46
|
+
## Installing
|
|
47
|
+
|
|
48
|
+
PlaCo is available from [pip](https://placo.readthedocs.io/en/latest/basics/installation_pip.html),
|
|
49
|
+
or can be [built from sources](https://placo.readthedocs.io/en/latest/basics/installation_source.html).
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
Here is the [official documentation](https://placo.readthedocs.io/en/latest/)
|
|
54
|
+
|
|
55
|
+
You can also find many examples in the [placo-examples](https://github.com/rhoban/placo-examples)
|
|
56
|
+
repository.
|
placo-0.6.1/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# PlaCo
|
|
2
|
+
|
|
3
|
+
PlaCo is Rhoban's planning and control library.
|
|
4
|
+
Its main features are:
|
|
5
|
+
|
|
6
|
+
* Task-space Inverse Kinematics with constraints,
|
|
7
|
+
* Task-space Inverse Dynamics with constraints,
|
|
8
|
+
* QP problem formulation,
|
|
9
|
+
* Built on the top of [pinocchio](https://github.com/stack-of-tasks/pinocchio)
|
|
10
|
+
* Written in C++ with Python bindings
|
|
11
|
+
|
|
12
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/kinematics/videos/quadruped_targets.mp4?raw=true)
|
|
13
|
+
|
|
14
|
+
*Inverse Kinematics Example: a quadruped robot hitting targets with a leg while keeping its three legs on the ground*
|
|
15
|
+
|
|
16
|
+
[source code (quadruped_targets.py)](https://github.com/Rhoban/placo-examples/blob/master/kinematics/quadruped_targets.py) / [more kinematics examples](https://placo.readthedocs.io/en/latest/kinematics/examples_gallery.html)
|
|
17
|
+
|
|
18
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/dynamics/videos/megabot.mp4?raw=true)
|
|
19
|
+
|
|
20
|
+
*Inverse Dynamics Example: a quadruped with many loop closure joints*
|
|
21
|
+
|
|
22
|
+
[source code (megabot.py)](https://github.com/Rhoban/placo-examples/blob/master/dynamics/megabot.py) / [more dynamics examples](https://placo.readthedocs.io/en/latest/dynamics/examples_gallery.html)
|
|
23
|
+
|
|
24
|
+
## Installing
|
|
25
|
+
|
|
26
|
+
PlaCo is available from [pip](https://placo.readthedocs.io/en/latest/basics/installation_pip.html),
|
|
27
|
+
or can be [built from sources](https://placo.readthedocs.io/en/latest/basics/installation_source.html).
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
Here is the [official documentation](https://placo.readthedocs.io/en/latest/)
|
|
32
|
+
|
|
33
|
+
You can also find many examples in the [placo-examples](https://github.com/rhoban/placo-examples)
|
|
34
|
+
repository.
|
|
@@ -13,6 +13,7 @@ using namespace placo::dynamics;
|
|
|
13
13
|
using namespace placo::model;
|
|
14
14
|
|
|
15
15
|
// Overloads
|
|
16
|
+
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(frame_configure_overloads, configure, 2, 4);
|
|
16
17
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(solve_overloads, solve, 0, 1);
|
|
17
18
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_torque_overloads, set_torque, 2, 4);
|
|
18
19
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_joint_overloads, set_joint, 2, 4);
|
|
@@ -43,6 +44,7 @@ void exposeDynamics()
|
|
|
43
44
|
.def_readwrite("active", &Contact::active)
|
|
44
45
|
.def_readwrite("mu", &Contact::mu)
|
|
45
46
|
.def_readwrite("weight_forces", &Contact::weight_forces)
|
|
47
|
+
.def_readwrite("weight_tangentials", &Contact::weight_tangentials)
|
|
46
48
|
.def_readwrite("weight_moments", &Contact::weight_moments)
|
|
47
49
|
.add_property(
|
|
48
50
|
"wrench", +[](Contact& contact) { return contact.wrench; });
|
|
@@ -68,6 +70,20 @@ void exposeDynamics()
|
|
|
68
70
|
.def_readwrite("width", &Contact6D::width)
|
|
69
71
|
.def("zmp", &Contact6D::zmp);
|
|
70
72
|
|
|
73
|
+
class__<LineContact, bases<Contact>>("LineContact", init<FrameTask&, bool>())
|
|
74
|
+
.def(
|
|
75
|
+
"position_task", +[](LineContact& contact) -> PositionTask& { return *contact.position_task; },
|
|
76
|
+
return_internal_reference<>())
|
|
77
|
+
.def(
|
|
78
|
+
"orientation_task", +[](LineContact& contact) -> OrientationTask& { return *contact.orientation_task; },
|
|
79
|
+
return_internal_reference<>())
|
|
80
|
+
.def_readwrite("unilateral", &LineContact::unilateral)
|
|
81
|
+
.def_readwrite("length", &LineContact::length)
|
|
82
|
+
.def("zmp", &LineContact::zmp)
|
|
83
|
+
.add_property(
|
|
84
|
+
"R_world_surface", +[](PointContact& contact) { return contact.R_world_surface; },
|
|
85
|
+
+[](PointContact& contact, Eigen::Matrix3d R) { contact.R_world_surface = R; });
|
|
86
|
+
|
|
71
87
|
class__<ExternalWrenchContact, bases<Contact>>("ExternalWrenchContact", init<RobotWrapper::FrameIndex>())
|
|
72
88
|
.add_property("frame_index", &ExternalWrenchContact::frame_index)
|
|
73
89
|
.add_property(
|
|
@@ -85,11 +101,16 @@ void exposeDynamics()
|
|
|
85
101
|
.def("set_torque_limit", &DynamicsSolver::set_torque_limit)
|
|
86
102
|
.def_readwrite("gravity_only", &DynamicsSolver::gravity_only)
|
|
87
103
|
.def_readwrite("torque_cost", &DynamicsSolver::torque_cost)
|
|
104
|
+
.add_property(
|
|
105
|
+
"extra_force", +[](DynamicsSolver& solver) { return solver.extra_force; },
|
|
106
|
+
+[](DynamicsSolver& solver, Eigen::VectorXd force) { solver.extra_force = force; })
|
|
88
107
|
.def("mask_fbase", &DynamicsSolver::mask_fbase)
|
|
89
108
|
.def("add_point_contact", &DynamicsSolver::add_point_contact, return_internal_reference<>())
|
|
90
109
|
.def("add_unilateral_point_contact", &DynamicsSolver::add_unilateral_point_contact, return_internal_reference<>())
|
|
91
110
|
.def("add_planar_contact", &DynamicsSolver::add_planar_contact, return_internal_reference<>())
|
|
92
111
|
.def("add_fixed_contact", &DynamicsSolver::add_fixed_contact, return_internal_reference<>())
|
|
112
|
+
.def("add_line_contact", &DynamicsSolver::add_line_contact, return_internal_reference<>())
|
|
113
|
+
.def("add_unilateral_line_contact", &DynamicsSolver::add_unilateral_line_contact, return_internal_reference<>())
|
|
93
114
|
.def<ExternalWrenchContact& (DynamicsSolver::*)(std::string, std::string)>(
|
|
94
115
|
"add_external_wrench_contact", &DynamicsSolver::add_external_wrench_contact, return_internal_reference<>())
|
|
95
116
|
.def("add_puppet_contact", &DynamicsSolver::add_puppet_contact, return_internal_reference<>())
|
|
@@ -212,7 +233,7 @@ void exposeDynamics()
|
|
|
212
233
|
.def(
|
|
213
234
|
"orientation", +[](const FrameTask& task) -> OrientationTask& { return *task.orientation; },
|
|
214
235
|
return_internal_reference<>())
|
|
215
|
-
.def("configure", &FrameTask::configure)
|
|
236
|
+
.def("configure", &FrameTask::configure, frame_configure_overloads())
|
|
216
237
|
.add_property("T_world_frame", &FrameTask::get_T_world_frame, &FrameTask::set_T_world_frame);
|
|
217
238
|
|
|
218
239
|
class__<RelativeFrameTask>("DynamicsRelativeFrameTask", init<>())
|
|
@@ -228,6 +249,7 @@ void exposeDynamics()
|
|
|
228
249
|
|
|
229
250
|
class__<JointsTask, bases<Task>>("DynamicsJointsTask", init<>())
|
|
230
251
|
.def("set_joint", &JointsTask::set_joint, set_joint_overloads())
|
|
252
|
+
.def("get_joint", &JointsTask::get_joint)
|
|
231
253
|
.def(
|
|
232
254
|
"set_joints", +[](JointsTask& task,
|
|
233
255
|
boost::python::dict& py_dict) { update_map<std::string, double>(task.joints, py_dict); })
|
|
@@ -192,6 +192,7 @@ void exposeKinematics()
|
|
|
192
192
|
|
|
193
193
|
class__<JointsTask, bases<Task>>("JointsTask", init<>())
|
|
194
194
|
.def("set_joint", &JointsTask::set_joint)
|
|
195
|
+
.def("get_joint", &JointsTask::get_joint)
|
|
195
196
|
.def(
|
|
196
197
|
"set_joints", +[](JointsTask& task, boost::python::dict& py_dict) {
|
|
197
198
|
update_map<std::string, double>(task.joints, py_dict);
|
|
@@ -109,6 +109,7 @@ void exposeProblem()
|
|
|
109
109
|
.def("clear_variables", &Problem::clear_variables)
|
|
110
110
|
.def("clear_constraints", &Problem::clear_constraints)
|
|
111
111
|
.def("dump_status", &Problem::dump_status)
|
|
112
|
+
.add_property("x", &Problem::x)
|
|
112
113
|
.add_property("n_variables", &Problem::n_variables, &Problem::n_variables)
|
|
113
114
|
.add_property("n_inequalities", &Problem::n_inequalities, &Problem::n_inequalities)
|
|
114
115
|
.add_property("n_equalities", &Problem::n_equalities, &Problem::n_equalities)
|
|
@@ -117,6 +118,7 @@ void exposeProblem()
|
|
|
117
118
|
.add_property("slack_variables", &Problem::slack_variables, &Problem::slack_variables)
|
|
118
119
|
.add_property("use_sparsity", &Problem::use_sparsity, &Problem::use_sparsity)
|
|
119
120
|
.add_property("rewrite_equalities", &Problem::rewrite_equalities, &Problem::rewrite_equalities)
|
|
121
|
+
.add_property("regularization", &Problem::regularization, &Problem::regularization)
|
|
120
122
|
.add_property(
|
|
121
123
|
"slacks", +[](const Problem& problem) { return problem.slacks; });
|
|
122
124
|
|
|
@@ -133,6 +135,7 @@ void exposeProblem()
|
|
|
133
135
|
"b", +[](Expression& e) { return e.b; })
|
|
134
136
|
.def("__len__", &Expression::rows)
|
|
135
137
|
.def("is_scalar", &Expression::is_scalar)
|
|
138
|
+
.def("is_constant", &Expression::is_constant)
|
|
136
139
|
.def("slice", &Expression::slice)
|
|
137
140
|
.def("rows", &Expression::rows)
|
|
138
141
|
.def("cols", &Expression::cols)
|
|
@@ -149,6 +152,7 @@ void exposeProblem()
|
|
|
149
152
|
.def(self - self)
|
|
150
153
|
.def(self * float())
|
|
151
154
|
.def(float() * self)
|
|
155
|
+
.def(self * self)
|
|
152
156
|
.def(self + other<Eigen::VectorXd>())
|
|
153
157
|
.def(other<Eigen::VectorXd>() + self)
|
|
154
158
|
.def(self - other<Eigen::VectorXd>())
|
|
@@ -158,7 +162,7 @@ void exposeProblem()
|
|
|
158
162
|
.def(self - float())
|
|
159
163
|
.def(float() - self)
|
|
160
164
|
.def(other<Eigen::MatrixXd>() * self)
|
|
161
|
-
.def("
|
|
165
|
+
.def("left_multiply", &Expression::left_multiply)
|
|
162
166
|
// Compare to build constraints
|
|
163
167
|
.def(self >= self)
|
|
164
168
|
.def(self <= self)
|
|
@@ -61,6 +61,8 @@ void exposeRobotType(class_<RobotType, W1>& type)
|
|
|
61
61
|
.def("com_jacobian_time_variation", &RobotType::com_jacobian_time_variation)
|
|
62
62
|
.def("generalized_gravity", &RobotType::generalized_gravity)
|
|
63
63
|
.def("non_linear_effects", &RobotType::non_linear_effects)
|
|
64
|
+
.def("set_rotor_inertia", &RobotType::set_rotor_inertia)
|
|
65
|
+
.def("set_gear_ratio", &RobotType::set_gear_ratio)
|
|
64
66
|
.def("mass_matrix", &RobotType::mass_matrix)
|
|
65
67
|
.def("set_gravity", &RobotType::set_gravity)
|
|
66
68
|
.def("total_mass", &RobotType::total_mass)
|
|
@@ -51,6 +51,7 @@ KinematicsSolver = typing.NewType("KinematicsSolver", None)
|
|
|
51
51
|
KineticEnergyRegularizationTask = typing.NewType("KineticEnergyRegularizationTask", None)
|
|
52
52
|
LIPM = typing.NewType("LIPM", None)
|
|
53
53
|
LIPMTrajectory = typing.NewType("LIPMTrajectory", None)
|
|
54
|
+
LineContact = typing.NewType("LineContact", None)
|
|
54
55
|
ManipulabilityTask = typing.NewType("ManipulabilityTask", None)
|
|
55
56
|
OrientationTask = typing.NewType("OrientationTask", None)
|
|
56
57
|
PointContact = typing.NewType("PointContact", None)
|
|
@@ -635,6 +636,10 @@ class Contact:
|
|
|
635
636
|
"""Weight of moments for optimization (if relevant)
|
|
636
637
|
"""
|
|
637
638
|
|
|
639
|
+
weight_tangentials: float # double
|
|
640
|
+
"""Extra cost for tangential forces.
|
|
641
|
+
"""
|
|
642
|
+
|
|
638
643
|
wrench: numpy.ndarray # Eigen::VectorXd
|
|
639
644
|
"""Wrench populated after the DynamicsSolver::solve call.
|
|
640
645
|
"""
|
|
@@ -688,6 +693,10 @@ class Contact6D:
|
|
|
688
693
|
"""Weight of moments for optimization (if relevant)
|
|
689
694
|
"""
|
|
690
695
|
|
|
696
|
+
weight_tangentials: float # double
|
|
697
|
+
"""Extra cost for tangential forces.
|
|
698
|
+
"""
|
|
699
|
+
|
|
691
700
|
width: float # double
|
|
692
701
|
"""Rectangular contact width along local y-axis.
|
|
693
702
|
"""
|
|
@@ -1271,6 +1280,19 @@ class DynamicsJointsTask:
|
|
|
1271
1280
|
"""Current error vector.
|
|
1272
1281
|
"""
|
|
1273
1282
|
|
|
1283
|
+
def get_joint(
|
|
1284
|
+
self: DynamicsJointsTask,
|
|
1285
|
+
joint: str, # std::string
|
|
1286
|
+
|
|
1287
|
+
) -> float:
|
|
1288
|
+
"""Returns the current target position of a joint.
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
:param joint: joint name
|
|
1292
|
+
|
|
1293
|
+
:return: current target position"""
|
|
1294
|
+
...
|
|
1295
|
+
|
|
1274
1296
|
kd: float # double
|
|
1275
1297
|
"""D gain for position control (if negative, will be critically damped)
|
|
1276
1298
|
"""
|
|
@@ -1781,6 +1803,19 @@ class DynamicsSolver:
|
|
|
1781
1803
|
:return: joints task"""
|
|
1782
1804
|
...
|
|
1783
1805
|
|
|
1806
|
+
def add_line_contact(
|
|
1807
|
+
self: DynamicsSolver,
|
|
1808
|
+
frame_task: DynamicsFrameTask, # placo::dynamics::FrameTask
|
|
1809
|
+
|
|
1810
|
+
) -> LineContact:
|
|
1811
|
+
"""Adds a fixed line contact.
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
:param frame_task: associated frame task
|
|
1815
|
+
|
|
1816
|
+
:return: line contact"""
|
|
1817
|
+
...
|
|
1818
|
+
|
|
1784
1819
|
def add_orientation_task(
|
|
1785
1820
|
self: DynamicsSolver,
|
|
1786
1821
|
frame_name: str, # std::string
|
|
@@ -1942,6 +1977,19 @@ class DynamicsSolver:
|
|
|
1942
1977
|
:return: torque task"""
|
|
1943
1978
|
...
|
|
1944
1979
|
|
|
1980
|
+
def add_unilateral_line_contact(
|
|
1981
|
+
self: DynamicsSolver,
|
|
1982
|
+
frame_task: DynamicsFrameTask, # placo::dynamics::FrameTask
|
|
1983
|
+
|
|
1984
|
+
) -> LineContact:
|
|
1985
|
+
"""Adds a unilateral line contact, which is unilateral in the sense of the local body z-axis.
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
:param frame_task: associated frame task
|
|
1989
|
+
|
|
1990
|
+
:return: unilateral line contact"""
|
|
1991
|
+
...
|
|
1992
|
+
|
|
1945
1993
|
def add_unilateral_point_contact(
|
|
1946
1994
|
self: DynamicsSolver,
|
|
1947
1995
|
position_task: DynamicsPositionTask, # placo::dynamics::PositionTask
|
|
@@ -2015,6 +2063,10 @@ class DynamicsSolver:
|
|
|
2015
2063
|
"""Enables the velocity vs torque inequalities."""
|
|
2016
2064
|
...
|
|
2017
2065
|
|
|
2066
|
+
extra_force: numpy.ndarray # Eigen::VectorXd
|
|
2067
|
+
"""Extra force to be added to the system (similar to non-linear terms)
|
|
2068
|
+
"""
|
|
2069
|
+
|
|
2018
2070
|
def get_contact(
|
|
2019
2071
|
arg1: DynamicsSolver,
|
|
2020
2072
|
arg2: int,
|
|
@@ -2367,6 +2419,16 @@ class Expression:
|
|
|
2367
2419
|
:return: expression"""
|
|
2368
2420
|
...
|
|
2369
2421
|
|
|
2422
|
+
def is_constant(
|
|
2423
|
+
self: Expression,
|
|
2424
|
+
|
|
2425
|
+
) -> bool:
|
|
2426
|
+
"""checks if the expression is constant (doesn't depend on decision variables)
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
:return: true if the expression is constant"""
|
|
2430
|
+
...
|
|
2431
|
+
|
|
2370
2432
|
def is_scalar(
|
|
2371
2433
|
self: Expression,
|
|
2372
2434
|
|
|
@@ -2377,26 +2439,26 @@ class Expression:
|
|
|
2377
2439
|
:return: true if the expression is a scalar"""
|
|
2378
2440
|
...
|
|
2379
2441
|
|
|
2380
|
-
def
|
|
2442
|
+
def left_multiply(
|
|
2381
2443
|
self: Expression,
|
|
2444
|
+
M: numpy.ndarray, # const Eigen::MatrixXd
|
|
2382
2445
|
|
|
2383
2446
|
) -> Expression:
|
|
2384
|
-
"""
|
|
2447
|
+
"""Multiply an expression on the left by a given matrix M.
|
|
2385
2448
|
|
|
2386
2449
|
|
|
2450
|
+
:param M: matrix
|
|
2451
|
+
|
|
2387
2452
|
:return: expression"""
|
|
2388
2453
|
...
|
|
2389
2454
|
|
|
2390
|
-
def
|
|
2455
|
+
def mean(
|
|
2391
2456
|
self: Expression,
|
|
2392
|
-
M: numpy.ndarray, # const Eigen::MatrixXd
|
|
2393
2457
|
|
|
2394
2458
|
) -> Expression:
|
|
2395
|
-
"""
|
|
2459
|
+
"""Reduces a multi-rows expression to the mean of its items.
|
|
2396
2460
|
|
|
2397
2461
|
|
|
2398
|
-
:param M: matrix
|
|
2399
|
-
|
|
2400
2462
|
:return: expression"""
|
|
2401
2463
|
...
|
|
2402
2464
|
|
|
@@ -2493,6 +2555,10 @@ class ExternalWrenchContact:
|
|
|
2493
2555
|
"""Weight of moments for optimization (if relevant)
|
|
2494
2556
|
"""
|
|
2495
2557
|
|
|
2558
|
+
weight_tangentials: float # double
|
|
2559
|
+
"""Extra cost for tangential forces.
|
|
2560
|
+
"""
|
|
2561
|
+
|
|
2496
2562
|
wrench: numpy.ndarray # Eigen::VectorXd
|
|
2497
2563
|
"""Wrench populated after the DynamicsSolver::solve call.
|
|
2498
2564
|
"""
|
|
@@ -3622,6 +3688,15 @@ class HumanoidRobot:
|
|
|
3622
3688
|
:param T_world_frameTarget: transformation matrix"""
|
|
3623
3689
|
...
|
|
3624
3690
|
|
|
3691
|
+
def set_gear_ratio(
|
|
3692
|
+
self: HumanoidRobot,
|
|
3693
|
+
joint_name: str, # const std::string &
|
|
3694
|
+
rotor_gear_ratio: float, # double
|
|
3695
|
+
|
|
3696
|
+
) -> None:
|
|
3697
|
+
"""Updates the rotor gear ratio (used for apparent inertia computation in the dynamics)"""
|
|
3698
|
+
...
|
|
3699
|
+
|
|
3625
3700
|
def set_gravity(
|
|
3626
3701
|
self: HumanoidRobot,
|
|
3627
3702
|
gravity: numpy.ndarray, # Eigen::Vector3d
|
|
@@ -3689,6 +3764,15 @@ class HumanoidRobot:
|
|
|
3689
3764
|
:param value: joint velocity"""
|
|
3690
3765
|
...
|
|
3691
3766
|
|
|
3767
|
+
def set_rotor_inertia(
|
|
3768
|
+
self: HumanoidRobot,
|
|
3769
|
+
joint_name: str, # const std::string &
|
|
3770
|
+
rotor_inertia: float, # double
|
|
3771
|
+
|
|
3772
|
+
) -> None:
|
|
3773
|
+
"""Updates the rotor inertia (used for apparent inertia computation in the dynamics)"""
|
|
3774
|
+
...
|
|
3775
|
+
|
|
3692
3776
|
def set_torque_limit(
|
|
3693
3777
|
self: HumanoidRobot,
|
|
3694
3778
|
name: str, # const std::string &
|
|
@@ -4075,6 +4159,19 @@ class JointsTask:
|
|
|
4075
4159
|
:return: task error norm"""
|
|
4076
4160
|
...
|
|
4077
4161
|
|
|
4162
|
+
def get_joint(
|
|
4163
|
+
self: JointsTask,
|
|
4164
|
+
joint: str, # std::string
|
|
4165
|
+
|
|
4166
|
+
) -> float:
|
|
4167
|
+
"""Returns the target value of a joint.
|
|
4168
|
+
|
|
4169
|
+
|
|
4170
|
+
:param joint: joint
|
|
4171
|
+
|
|
4172
|
+
:return: target value"""
|
|
4173
|
+
...
|
|
4174
|
+
|
|
4078
4175
|
name: str # std::string
|
|
4079
4176
|
"""Object name.
|
|
4080
4177
|
"""
|
|
@@ -4803,6 +4900,77 @@ class LIPMTrajectory:
|
|
|
4803
4900
|
...
|
|
4804
4901
|
|
|
4805
4902
|
|
|
4903
|
+
class LineContact:
|
|
4904
|
+
R_world_surface: numpy.ndarray # Eigen::Matrix3d
|
|
4905
|
+
"""rotation matrix expressing the surface frame in the world frame (for unilateral contact)
|
|
4906
|
+
"""
|
|
4907
|
+
|
|
4908
|
+
def __init__(
|
|
4909
|
+
self: LineContact,
|
|
4910
|
+
frame_task: DynamicsFrameTask, # placo::dynamics::FrameTask
|
|
4911
|
+
unilateral: bool, # bool
|
|
4912
|
+
|
|
4913
|
+
) -> any:
|
|
4914
|
+
"""see DynamicsSolver::add_fixed_planar_contact and DynamicsSolver::add_unilateral_planar_contact"""
|
|
4915
|
+
...
|
|
4916
|
+
|
|
4917
|
+
active: bool # bool
|
|
4918
|
+
"""true if the contact is active (ignored by the solver else, this allow to enable/disable a contact without removing it from the solver)
|
|
4919
|
+
"""
|
|
4920
|
+
|
|
4921
|
+
length: float # double
|
|
4922
|
+
"""Rectangular contact length along local x-axis.
|
|
4923
|
+
"""
|
|
4924
|
+
|
|
4925
|
+
mu: float # double
|
|
4926
|
+
"""Coefficient of friction (if relevant)
|
|
4927
|
+
"""
|
|
4928
|
+
|
|
4929
|
+
def orientation_task(
|
|
4930
|
+
self: LineContact,
|
|
4931
|
+
|
|
4932
|
+
) -> DynamicsOrientationTask:
|
|
4933
|
+
"""Associated orientation task."""
|
|
4934
|
+
...
|
|
4935
|
+
|
|
4936
|
+
def position_task(
|
|
4937
|
+
self: LineContact,
|
|
4938
|
+
|
|
4939
|
+
) -> DynamicsPositionTask:
|
|
4940
|
+
"""Associated position task."""
|
|
4941
|
+
...
|
|
4942
|
+
|
|
4943
|
+
unilateral: bool # bool
|
|
4944
|
+
"""true for unilateral contact with the ground
|
|
4945
|
+
"""
|
|
4946
|
+
|
|
4947
|
+
weight_forces: float # double
|
|
4948
|
+
"""Weight of forces for the optimization (if relevant)
|
|
4949
|
+
"""
|
|
4950
|
+
|
|
4951
|
+
weight_moments: float # double
|
|
4952
|
+
"""Weight of moments for optimization (if relevant)
|
|
4953
|
+
"""
|
|
4954
|
+
|
|
4955
|
+
weight_tangentials: float # double
|
|
4956
|
+
"""Extra cost for tangential forces.
|
|
4957
|
+
"""
|
|
4958
|
+
|
|
4959
|
+
wrench: numpy.ndarray # Eigen::VectorXd
|
|
4960
|
+
"""Wrench populated after the DynamicsSolver::solve call.
|
|
4961
|
+
"""
|
|
4962
|
+
|
|
4963
|
+
def zmp(
|
|
4964
|
+
self: LineContact,
|
|
4965
|
+
|
|
4966
|
+
) -> numpy.ndarray:
|
|
4967
|
+
"""Returns the contact ZMP in the local frame.
|
|
4968
|
+
|
|
4969
|
+
|
|
4970
|
+
:return: zmp"""
|
|
4971
|
+
...
|
|
4972
|
+
|
|
4973
|
+
|
|
4806
4974
|
class ManipulabilityTask:
|
|
4807
4975
|
A: numpy.ndarray # Eigen::MatrixXd
|
|
4808
4976
|
"""Matrix A in the task Ax = b, where x are the joint delta positions.
|
|
@@ -5008,6 +5176,10 @@ class PointContact:
|
|
|
5008
5176
|
"""Weight of moments for optimization (if relevant)
|
|
5009
5177
|
"""
|
|
5010
5178
|
|
|
5179
|
+
weight_tangentials: float # double
|
|
5180
|
+
"""Extra cost for tangential forces.
|
|
5181
|
+
"""
|
|
5182
|
+
|
|
5011
5183
|
wrench: numpy.ndarray # Eigen::VectorXd
|
|
5012
5184
|
"""Wrench populated after the DynamicsSolver::solve call.
|
|
5013
5185
|
"""
|
|
@@ -5252,6 +5424,10 @@ class Problem:
|
|
|
5252
5424
|
"""Number of problem variables that need to be solved.
|
|
5253
5425
|
"""
|
|
5254
5426
|
|
|
5427
|
+
regularization: float # double
|
|
5428
|
+
"""Default internal regularization.
|
|
5429
|
+
"""
|
|
5430
|
+
|
|
5255
5431
|
rewrite_equalities: bool # bool
|
|
5256
5432
|
"""If set to true, a QR factorization will be performed on the equality constraints, and the QP will be called with free variables only.
|
|
5257
5433
|
"""
|
|
@@ -5275,6 +5451,10 @@ class Problem:
|
|
|
5275
5451
|
"""If set to true, some sparsity optimizations will be performed when building the problem Hessian. This optimization is generally not useful for small problems.
|
|
5276
5452
|
"""
|
|
5277
5453
|
|
|
5454
|
+
x: numpy.ndarray # Eigen::VectorXd
|
|
5455
|
+
"""Computed result.
|
|
5456
|
+
"""
|
|
5457
|
+
|
|
5278
5458
|
|
|
5279
5459
|
class ProblemConstraint:
|
|
5280
5460
|
"""Represents a constraint to be enforced by a Problem.
|
|
@@ -5340,6 +5520,10 @@ class PuppetContact:
|
|
|
5340
5520
|
"""Weight of moments for optimization (if relevant)
|
|
5341
5521
|
"""
|
|
5342
5522
|
|
|
5523
|
+
weight_tangentials: float # double
|
|
5524
|
+
"""Extra cost for tangential forces.
|
|
5525
|
+
"""
|
|
5526
|
+
|
|
5343
5527
|
wrench: numpy.ndarray # Eigen::VectorXd
|
|
5344
5528
|
"""Wrench populated after the DynamicsSolver::solve call.
|
|
5345
5529
|
"""
|
|
@@ -6032,6 +6216,15 @@ class RobotWrapper:
|
|
|
6032
6216
|
:param T_world_frameTarget: transformation matrix"""
|
|
6033
6217
|
...
|
|
6034
6218
|
|
|
6219
|
+
def set_gear_ratio(
|
|
6220
|
+
self: RobotWrapper,
|
|
6221
|
+
joint_name: str, # const std::string &
|
|
6222
|
+
rotor_gear_ratio: float, # double
|
|
6223
|
+
|
|
6224
|
+
) -> None:
|
|
6225
|
+
"""Updates the rotor gear ratio (used for apparent inertia computation in the dynamics)"""
|
|
6226
|
+
...
|
|
6227
|
+
|
|
6035
6228
|
def set_gravity(
|
|
6036
6229
|
self: RobotWrapper,
|
|
6037
6230
|
gravity: numpy.ndarray, # Eigen::Vector3d
|
|
@@ -6099,6 +6292,15 @@ class RobotWrapper:
|
|
|
6099
6292
|
:param value: joint velocity"""
|
|
6100
6293
|
...
|
|
6101
6294
|
|
|
6295
|
+
def set_rotor_inertia(
|
|
6296
|
+
self: RobotWrapper,
|
|
6297
|
+
joint_name: str, # const std::string &
|
|
6298
|
+
rotor_inertia: float, # double
|
|
6299
|
+
|
|
6300
|
+
) -> None:
|
|
6301
|
+
"""Updates the rotor inertia (used for apparent inertia computation in the dynamics)"""
|
|
6302
|
+
...
|
|
6303
|
+
|
|
6102
6304
|
def set_torque_limit(
|
|
6103
6305
|
self: RobotWrapper,
|
|
6104
6306
|
name: str, # const std::string &
|
|
@@ -6623,6 +6825,10 @@ class TaskContact:
|
|
|
6623
6825
|
"""Weight of moments for optimization (if relevant)
|
|
6624
6826
|
"""
|
|
6625
6827
|
|
|
6828
|
+
weight_tangentials: float # double
|
|
6829
|
+
"""Extra cost for tangential forces.
|
|
6830
|
+
"""
|
|
6831
|
+
|
|
6626
6832
|
wrench: numpy.ndarray # Eigen::VectorXd
|
|
6627
6833
|
"""Wrench populated after the DynamicsSolver::solve call.
|
|
6628
6834
|
"""
|
|
@@ -7332,4 +7538,4 @@ def wrap_angle(
|
|
|
7332
7538
|
...
|
|
7333
7539
|
|
|
7334
7540
|
|
|
7335
|
-
__groups__ = {'placo::dynamics': ['AvoidSelfCollisionsDynamicsConstraint', 'Contact', 'Contact6D', 'DynamicsCoMTask', 'DynamicsConstraint', 'DynamicsFrameTask', 'DynamicsGearTask', 'DynamicsJointsTask', 'DynamicsOrientationTask', 'DynamicsPositionTask', 'DynamicsRelativeFrameTask', 'DynamicsRelativeOrientationTask', 'DynamicsRelativePositionTask', 'DynamicsSolver', 'DynamicsSolverResult', 'DynamicsTask', 'DynamicsTorqueTask', 'ExternalWrenchContact', 'PointContact', 'PuppetContact', 'TaskContact'], 'placo::kinematics': ['AvoidSelfCollisionsKinematicsConstraint', 'AxisAlignTask', 'CentroidalMomentumTask', 'CoMPolygonConstraint', 'CoMTask', 'ConeConstraint', 'DistanceTask', 'FrameTask', 'GearTask', 'JointsTask', 'KinematicsConstraint', 'KinematicsSolver', 'KineticEnergyRegularizationTask', 'ManipulabilityTask', 'OrientationTask', 'PositionTask', 'RegularizationTask', 'RelativeFrameTask', 'RelativeOrientationTask', 'RelativePositionTask', 'Task', 'WheelTask'], 'placo::tools': ['AxisesMask', 'CubicSpline', 'CubicSpline3D', 'Prioritized'], 'placo::model': ['Collision', 'Distance', 'RobotWrapper', 'RobotWrapper_State'], 'placo::problem': ['Expression', 'Integrator', 'IntegratorTrajectory', 'PolygonConstraint', 'Problem', 'ProblemConstraint', 'QPError', 'Sparsity', 'SparsityInterval', 'Variable'], 'placo::humanoid': ['Footstep', 'FootstepsPlanner', 'FootstepsPlannerNaive', 'FootstepsPlannerRepetitive', 'HumanoidParameters', 'HumanoidRobot', 'LIPM', 'LIPMTrajectory', 'Support', 'SwingFoot', 'SwingFootCubic', 'SwingFootCubicTrajectory', 'SwingFootQuintic', 'SwingFootQuinticTrajectory', 'SwingFootTrajectory', 'WalkPatternGenerator', 'WalkTasks', 'WalkTrajectory']}
|
|
7541
|
+
__groups__ = {'placo::dynamics': ['AvoidSelfCollisionsDynamicsConstraint', 'Contact', 'Contact6D', 'DynamicsCoMTask', 'DynamicsConstraint', 'DynamicsFrameTask', 'DynamicsGearTask', 'DynamicsJointsTask', 'DynamicsOrientationTask', 'DynamicsPositionTask', 'DynamicsRelativeFrameTask', 'DynamicsRelativeOrientationTask', 'DynamicsRelativePositionTask', 'DynamicsSolver', 'DynamicsSolverResult', 'DynamicsTask', 'DynamicsTorqueTask', 'ExternalWrenchContact', 'LineContact', 'PointContact', 'PuppetContact', 'TaskContact'], 'placo::kinematics': ['AvoidSelfCollisionsKinematicsConstraint', 'AxisAlignTask', 'CentroidalMomentumTask', 'CoMPolygonConstraint', 'CoMTask', 'ConeConstraint', 'DistanceTask', 'FrameTask', 'GearTask', 'JointsTask', 'KinematicsConstraint', 'KinematicsSolver', 'KineticEnergyRegularizationTask', 'ManipulabilityTask', 'OrientationTask', 'PositionTask', 'RegularizationTask', 'RelativeFrameTask', 'RelativeOrientationTask', 'RelativePositionTask', 'Task', 'WheelTask'], 'placo::tools': ['AxisesMask', 'CubicSpline', 'CubicSpline3D', 'Prioritized'], 'placo::model': ['Collision', 'Distance', 'RobotWrapper', 'RobotWrapper_State'], 'placo::problem': ['Expression', 'Integrator', 'IntegratorTrajectory', 'PolygonConstraint', 'Problem', 'ProblemConstraint', 'QPError', 'Sparsity', 'SparsityInterval', 'Variable'], 'placo::humanoid': ['Footstep', 'FootstepsPlanner', 'FootstepsPlannerNaive', 'FootstepsPlannerRepetitive', 'HumanoidParameters', 'HumanoidRobot', 'LIPM', 'LIPMTrajectory', 'Support', 'SwingFoot', 'SwingFootCubic', 'SwingFootCubicTrajectory', 'SwingFootQuintic', 'SwingFootQuinticTrajectory', 'SwingFootTrajectory', 'WalkPatternGenerator', 'WalkTasks', 'WalkTrajectory']}
|
|
@@ -243,7 +243,7 @@ def contacts_viz(solver: placo.DynamicsSolver, ratio=0.1, radius=0.005):
|
|
|
243
243
|
origin = T_world_frame[:3, 3]
|
|
244
244
|
else:
|
|
245
245
|
origin = T_world_frame[:3, 3] + T_world_frame[:3, :3] @ contact.zmp()
|
|
246
|
-
|
|
246
|
+
|
|
247
247
|
arrow_viz(
|
|
248
248
|
f"contact_{k}",
|
|
249
249
|
origin,
|
|
@@ -251,6 +251,23 @@ def contacts_viz(solver: placo.DynamicsSolver, ratio=0.1, radius=0.005):
|
|
|
251
251
|
color=0x00FFAA,
|
|
252
252
|
radius=radius,
|
|
253
253
|
)
|
|
254
|
+
elif isinstance(contact, placo.LineContact):
|
|
255
|
+
frame_name = frames[contact.position_task().frame_index]
|
|
256
|
+
T_world_frame = robot.get_T_world_frame(frame_name)
|
|
257
|
+
wrench = T_world_frame[:3, :3] @ contact.wrench[:3]
|
|
258
|
+
|
|
259
|
+
if np.linalg.norm(wrench) < 1e-6:
|
|
260
|
+
origin = T_world_frame[:3, 3]
|
|
261
|
+
else:
|
|
262
|
+
origin = T_world_frame[:3, 3] + T_world_frame[:3, :3] @ contact.zmp()
|
|
263
|
+
|
|
264
|
+
arrow_viz(
|
|
265
|
+
f"contact_{k}",
|
|
266
|
+
origin,
|
|
267
|
+
origin + wrench * ratio,
|
|
268
|
+
color=0xFF33AA,
|
|
269
|
+
radius=radius,
|
|
270
|
+
)
|
|
254
271
|
elif isinstance(contact, placo.ExternalWrenchContact):
|
|
255
272
|
frame_name = frames[contact.frame_index]
|
|
256
273
|
T_world_frame = robot.get_T_world_frame(frame_name)
|
|
@@ -60,20 +60,12 @@ void AvoidSelfCollisionsConstraint::add_constraint(problem::Problem& problem, pr
|
|
|
60
60
|
Eigen::VectorXd dJ = n.transpose() * (dJB - dJA).block(0, 0, 3, solver->N) * solver->robot.state.qd;
|
|
61
61
|
|
|
62
62
|
// Computing xdd_safe from qdd_safe
|
|
63
|
-
double
|
|
63
|
+
double xdd_safe = 0.0;
|
|
64
64
|
for (int k = 6; k < solver->N; k++)
|
|
65
65
|
{
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
double lambda_i = fabs(solver->qdd_safe[k] / J(0, k));
|
|
69
|
-
if (lambda < 0 || lambda_i < lambda)
|
|
70
|
-
{
|
|
71
|
-
lambda = lambda_i;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
66
|
+
xdd_safe += fabs(J(0, k)) * solver->qdd_safe[k];
|
|
74
67
|
}
|
|
75
|
-
|
|
76
|
-
double xdd_safe = (lambda * (J * J.transpose()))(0, 0) + dJ[0];
|
|
68
|
+
xdd_safe = 0.5 * xdd_safe;
|
|
77
69
|
|
|
78
70
|
if (distance.min_distance >= self_collisions_margin)
|
|
79
71
|
{
|