placo 0.5.4__tar.gz → 0.7.4__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.5.4 → placo-0.7.4}/CMakeLists.txt +15 -7
- {placo-0.5.4 → placo-0.7.4}/Makefile +1 -1
- placo-0.7.4/PKG-INFO +60 -0
- placo-0.7.4/README.md +39 -0
- placo-0.7.4/bindings/doxystub.h +15 -0
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-dynamics.cpp +61 -69
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-footsteps.cpp +13 -12
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-kinematics.cpp +20 -19
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-parameters.cpp +6 -7
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-problem.cpp +21 -15
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-robot-wrapper.cpp +15 -20
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-tools.cpp +39 -9
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-utils.hpp +9 -0
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-walk-pattern-generator.cpp +40 -13
- {placo-0.5.4 → placo-0.7.4}/bindings/module.cpp +0 -1
- {placo-0.5.4 → placo-0.7.4}/bindings/module.h +1 -2
- placo-0.7.4/build_wheel.sh +9 -0
- placo-0.7.4/placo.pyi +9582 -0
- {placo-0.5.4 → placo-0.7.4}/pyproject.toml +6 -7
- placo-0.7.4/python/placo_utils/view.py +37 -0
- {placo-0.5.4 → placo-0.7.4}/python/placo_utils/visualization.py +30 -7
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +3 -11
- placo-0.7.4/src/placo/dynamics/contacts.cpp +265 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/contacts.h +41 -24
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/dynamics_solver.cpp +126 -148
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/dynamics_solver.h +60 -80
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/joints_task.cpp +10 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/joints_task.h +7 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/position_task.cpp +5 -6
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/position_task.h +5 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/relative_orientation_task.cpp +1 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/relative_position_task.h +1 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/task.cpp +1 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/task.h +2 -7
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/torque_task.cpp +12 -3
- placo-0.7.4/src/placo/dynamics/torque_task.h +61 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/footsteps_planner.cpp +51 -54
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/footsteps_planner.h +21 -10
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -90
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/humanoid_parameters.cpp +7 -52
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/humanoid_parameters.h +17 -49
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/humanoid_robot.cpp +15 -6
- placo-0.7.4/src/placo/humanoid/kick.cpp +44 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/lipm.cpp +36 -8
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/lipm.h +27 -12
- placo-0.7.4/src/placo/humanoid/swing_foot_cubic.cpp +56 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/swing_foot_cubic.h +4 -3
- placo-0.7.4/src/placo/humanoid/walk_pattern_generator.cpp +695 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/walk_pattern_generator.h +78 -50
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/walk_tasks.cpp +15 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/walk_tasks.h +11 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/centroidal_momentum_task.cpp +8 -2
- placo-0.7.4/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +43 -0
- placo-0.7.4/src/placo/kinematics/joint_space_half_spaces_constraint.h +32 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/joints_task.cpp +10 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/joints_task.h +7 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/kinematics_solver.cpp +6 -17
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/kinematics_solver.h +9 -7
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/relative_orientation_task.cpp +5 -5
- {placo-0.5.4 → placo-0.7.4}/src/placo/model/robot_wrapper.cpp +34 -5
- {placo-0.5.4 → placo-0.7.4}/src/placo/model/robot_wrapper.h +24 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/expression.cpp +34 -5
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/expression.h +8 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/integrator.cpp +5 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/integrator.h +1 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/polygon_constraint.cpp +1 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/problem.cpp +1 -4
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/problem.h +5 -0
- placo-0.7.4/src/placo/problem/problem_polynom.cpp +30 -0
- placo-0.7.4/src/placo/problem/problem_polynom.h +37 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/axises_mask.h +1 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/cubic_spline.cpp +14 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/cubic_spline.h +14 -1
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/cubic_spline_3d.cpp +5 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/cubic_spline_3d.h +7 -0
- placo-0.7.4/src/placo/tools/directions.cpp +42 -0
- placo-0.7.4/src/placo/tools/directions.h +22 -0
- placo-0.7.4/src/placo/tools/polynom.cpp +41 -0
- placo-0.7.4/src/placo/tools/polynom.h +33 -0
- placo-0.7.4/src/placo/tools/segment.cpp +103 -0
- placo-0.7.4/src/placo/tools/segment.h +80 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/utils.cpp +52 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/utils.h +7 -1
- placo-0.5.4/PKG-INFO +0 -25
- placo-0.5.4/README.md +0 -3
- placo-0.5.4/bindings/registry.cpp +0 -23
- placo-0.5.4/bindings/registry.h +0 -95
- placo-0.5.4/doxygen_parse.py +0 -199
- placo-0.5.4/placo.pyi +0 -7449
- placo-0.5.4/src/placo/dynamics/contacts.cpp +0 -205
- placo-0.5.4/src/placo/dynamics/reaction_ratio_constraint.cpp +0 -30
- placo-0.5.4/src/placo/dynamics/reaction_ratio_constraint.h +0 -27
- placo-0.5.4/src/placo/dynamics/torque_task.h +0 -35
- placo-0.5.4/src/placo/humanoid/kick.cpp +0 -44
- placo-0.5.4/src/placo/humanoid/swing_foot_cubic.cpp +0 -45
- placo-0.5.4/src/placo/humanoid/walk_pattern_generator.cpp +0 -685
- placo-0.5.4/stubs.py +0 -262
- {placo-0.5.4 → placo-0.7.4}/.clang-format +0 -0
- {placo-0.5.4 → placo-0.7.4}/.gitattributes +0 -0
- {placo-0.5.4 → placo-0.7.4}/.gitignore +0 -0
- {placo-0.5.4 → placo-0.7.4}/.readthedocs.yaml +0 -0
- {placo-0.5.4 → placo-0.7.4}/Doxyfile +0 -0
- {placo-0.5.4 → placo-0.7.4}/LICENSE +0 -0
- {placo-0.5.4 → placo-0.7.4}/bindings/expose-eigen.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/python/.vscode/settings.json +0 -0
- {placo-0.5.4 → placo-0.7.4}/python/Makefile +0 -0
- {placo-0.5.4 → placo-0.7.4}/python/placo_utils/__init__.py +0 -0
- {placo-0.5.4 → placo-0.7.4}/python/placo_utils/tf.py +0 -0
- {placo-0.5.4 → placo-0.7.4}/python/run_tests.sh +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/humanoid_robot.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/kick.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/qp_error.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/sparsity.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/variable.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/problem/variable.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.5.4 → placo-0.7.4}/src/placo/tools/prioritized.h +0 -0
- {placo-0.5.4 → placo-0.7.4}/tweak_sdist.sh +0 -0
- {placo-0.5.4 → placo-0.7.4}/wks.yml +0 -0
|
@@ -51,6 +51,9 @@ add_library(libplaco SHARED
|
|
|
51
51
|
src/placo/tools/prioritized.cpp
|
|
52
52
|
src/placo/tools/cubic_spline.cpp
|
|
53
53
|
src/placo/tools/cubic_spline_3d.cpp
|
|
54
|
+
src/placo/tools/directions.cpp
|
|
55
|
+
src/placo/tools/polynom.cpp
|
|
56
|
+
src/placo/tools/segment.cpp
|
|
54
57
|
|
|
55
58
|
# Problem formulation
|
|
56
59
|
src/placo/problem/problem.cpp
|
|
@@ -58,6 +61,7 @@ add_library(libplaco SHARED
|
|
|
58
61
|
src/placo/problem/variable.cpp
|
|
59
62
|
src/placo/problem/expression.cpp
|
|
60
63
|
src/placo/problem/integrator.cpp
|
|
64
|
+
src/placo/problem/problem_polynom.cpp
|
|
61
65
|
src/placo/problem/constraint.cpp
|
|
62
66
|
src/placo/problem/polygon_constraint.cpp
|
|
63
67
|
src/placo/problem/sparsity.cpp
|
|
@@ -83,6 +87,7 @@ add_library(libplaco SHARED
|
|
|
83
87
|
src/placo/kinematics/constraint.cpp
|
|
84
88
|
src/placo/kinematics/avoid_self_collisions_constraint.cpp
|
|
85
89
|
src/placo/kinematics/com_polygon_constraint.cpp
|
|
90
|
+
src/placo/kinematics/joint_space_half_spaces_constraint.cpp
|
|
86
91
|
src/placo/kinematics/cone_constraint.cpp
|
|
87
92
|
src/placo/kinematics/axis_align_task.cpp
|
|
88
93
|
|
|
@@ -102,7 +107,6 @@ add_library(libplaco SHARED
|
|
|
102
107
|
src/placo/dynamics/dynamics_solver.cpp
|
|
103
108
|
src/placo/dynamics/constraint.cpp
|
|
104
109
|
src/placo/dynamics/avoid_self_collisions_constraint.cpp
|
|
105
|
-
src/placo/dynamics/reaction_ratio_constraint.cpp
|
|
106
110
|
|
|
107
111
|
${PROTO_SRCS}
|
|
108
112
|
${PROTO_HDRS}
|
|
@@ -123,7 +127,7 @@ target_link_libraries(libplaco PUBLIC
|
|
|
123
127
|
${PROTOBUF_LIBRARIES}
|
|
124
128
|
${PROTOBUF_LIBRARIES}
|
|
125
129
|
)
|
|
126
|
-
target_compile_definitions(libplaco PUBLIC
|
|
130
|
+
target_compile_definitions(libplaco PUBLIC)
|
|
127
131
|
|
|
128
132
|
if(TARGET rhoban_utils)
|
|
129
133
|
message("Placo: Rhoban utils is present, enabling it")
|
|
@@ -135,6 +139,7 @@ set(CMAKE_SHARED_MODULE_PREFIX "")
|
|
|
135
139
|
|
|
136
140
|
find_package(Python3 REQUIRED)
|
|
137
141
|
find_package(Boost COMPONENTS python REQUIRED)
|
|
142
|
+
find_package(Python REQUIRED COMPONENTS Interpreter)
|
|
138
143
|
|
|
139
144
|
add_library(placo MODULE
|
|
140
145
|
bindings/expose-eigen.cpp
|
|
@@ -147,16 +152,19 @@ add_library(placo MODULE
|
|
|
147
152
|
bindings/expose-walk-pattern-generator.cpp
|
|
148
153
|
bindings/expose-dynamics.cpp
|
|
149
154
|
bindings/module.cpp
|
|
150
|
-
bindings/registry.cpp
|
|
151
155
|
)
|
|
152
156
|
set_target_properties(placo PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PYTHON_SITELIB})
|
|
153
157
|
|
|
154
158
|
target_link_libraries(placo ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} libplaco)
|
|
155
159
|
target_include_directories(placo PRIVATE ${PYTHON_INCLUDE_DIRS})
|
|
156
160
|
|
|
157
|
-
add_custom_command(
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
add_custom_command(
|
|
162
|
+
TARGET placo POST_BUILD
|
|
163
|
+
COMMAND doxystub
|
|
164
|
+
--module placo
|
|
165
|
+
--doxygen_directory "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
166
|
+
--output "${CMAKE_BINARY_DIR}/${PYTHON_SITELIB}/placo.pyi"
|
|
167
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${PYTHON_SITELIB}"
|
|
160
168
|
COMMENT "Generating stubs..."
|
|
161
169
|
)
|
|
162
170
|
|
|
@@ -171,4 +179,4 @@ set_target_properties(libplaco PROPERTIES INSTALL_RPATH "\$ORIGIN")
|
|
|
171
179
|
install(TARGETS libplaco DESTINATION lib)
|
|
172
180
|
install(TARGETS placo DESTINATION ${PYTHON_SITELIB})
|
|
173
181
|
install(FILES ${CMAKE_BINARY_DIR}/${PYTHON_SITELIB}/placo.pyi DESTINATION ${PYTHON_SITELIB})
|
|
174
|
-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${PYTHON_SITELIB}/placo_utils DESTINATION ${PYTHON_SITELIB})
|
|
182
|
+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${PYTHON_SITELIB}/placo_utils DESTINATION ${PYTHON_SITELIB})
|
placo-0.7.4/PKG-INFO
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: placo
|
|
3
|
+
Version: 0.7.4
|
|
4
|
+
Summary: PlaCo: Rhoban Planning and Control
|
|
5
|
+
Requires-Python: >= 3.9
|
|
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 >= 3
|
|
14
|
+
Requires-Dist: rhoban-cmeel-jsoncpp
|
|
15
|
+
Requires-Dist: meshcat
|
|
16
|
+
Requires-Dist: ischedule
|
|
17
|
+
Provides-Extra: build
|
|
18
|
+
Requires-Dist: pin[build] >= 3 ; extra == "build"
|
|
19
|
+
Requires-Dist: doxystub ; extra == "build"
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
<img width="400" src="https://placo.readthedocs.io/en/latest/_static/placo.png" />
|
|
23
|
+
|
|
24
|
+
## Planning & Control
|
|
25
|
+
|
|
26
|
+
PlaCo is Rhoban's planning and control library. It is built on the top of [pinocchio](https://github.com/stack-of-tasks/pinocchio), [eiquadprog](https://github.com/stack-of-tasks/eiquadprog) QP solver, and fully written in C++ with Python bindings, allowing fast prototyping with good runtime performances. It features task-space inverse kinematics and dynamics (see below) high-level API for whole-body control tasks.
|
|
27
|
+
|
|
28
|
+
### Task-Space Inverse Kinematics
|
|
29
|
+
|
|
30
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/kinematics/videos/quadruped_targets.mp4?raw=true)
|
|
31
|
+
|
|
32
|
+
High-level API to specify tasks for constrained inverse kinematics (IK).
|
|
33
|
+
|
|
34
|
+
- [See documentation](https://placo.readthedocs.io/en/latest/kinematics/getting_started.html)
|
|
35
|
+
- [Examples](https://placo.readthedocs.io/en/latest/kinematics/examples_gallery.html)
|
|
36
|
+
|
|
37
|
+
### Task-Space Inverse Dynamics
|
|
38
|
+
|
|
39
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/dynamics/videos/megabot.mp4?raw=true)
|
|
40
|
+
|
|
41
|
+
High-level API to specify tasks for constrained inverse dynamics (ID).
|
|
42
|
+
|
|
43
|
+
- [See documentation](https://placo.readthedocs.io/en/latest/dynamics/getting_started.html)
|
|
44
|
+
- [Examples](https://placo.readthedocs.io/en/latest/dynamics/examples_gallery.html)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Installing
|
|
48
|
+
|
|
49
|
+
PlaCo can be installed from ``pip``
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
pip install placo
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Or [built from sources](https://placo.readthedocs.io/en/latest/basics/installation_source.html)
|
|
56
|
+
|
|
57
|
+
## Resources
|
|
58
|
+
|
|
59
|
+
* [Documentation](https://placo.readthedocs.io/en/latest/)
|
|
60
|
+
* [Examples](https://github.com/rhoban/placo-examples) repository
|
placo-0.7.4/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<img width="400" src="https://placo.readthedocs.io/en/latest/_static/placo.png" />
|
|
2
|
+
|
|
3
|
+
## Planning & Control
|
|
4
|
+
|
|
5
|
+
PlaCo is Rhoban's planning and control library. It is built on the top of [pinocchio](https://github.com/stack-of-tasks/pinocchio), [eiquadprog](https://github.com/stack-of-tasks/eiquadprog) QP solver, and fully written in C++ with Python bindings, allowing fast prototyping with good runtime performances. It features task-space inverse kinematics and dynamics (see below) high-level API for whole-body control tasks.
|
|
6
|
+
|
|
7
|
+
### Task-Space Inverse Kinematics
|
|
8
|
+
|
|
9
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/kinematics/videos/quadruped_targets.mp4?raw=true)
|
|
10
|
+
|
|
11
|
+
High-level API to specify tasks for constrained inverse kinematics (IK).
|
|
12
|
+
|
|
13
|
+
- [See documentation](https://placo.readthedocs.io/en/latest/kinematics/getting_started.html)
|
|
14
|
+
- [Examples](https://placo.readthedocs.io/en/latest/kinematics/examples_gallery.html)
|
|
15
|
+
|
|
16
|
+
### Task-Space Inverse Dynamics
|
|
17
|
+
|
|
18
|
+
[](https://github.com/Rhoban/placo-examples/blob/master/dynamics/videos/megabot.mp4?raw=true)
|
|
19
|
+
|
|
20
|
+
High-level API to specify tasks for constrained inverse dynamics (ID).
|
|
21
|
+
|
|
22
|
+
- [See documentation](https://placo.readthedocs.io/en/latest/dynamics/getting_started.html)
|
|
23
|
+
- [Examples](https://placo.readthedocs.io/en/latest/dynamics/examples_gallery.html)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Installing
|
|
27
|
+
|
|
28
|
+
PlaCo can be installed from ``pip``
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
pip install placo
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or [built from sources](https://placo.readthedocs.io/en/latest/basics/installation_source.html)
|
|
35
|
+
|
|
36
|
+
## Resources
|
|
37
|
+
|
|
38
|
+
* [Documentation](https://placo.readthedocs.io/en/latest/)
|
|
39
|
+
* [Examples](https://github.com/rhoban/placo-examples) repository
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <boost/python.hpp>
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This wrapper adds a __cxx_class__ method on the exposed class, allowing to retrieve the original
|
|
7
|
+
* C++ type of the object from Python.
|
|
8
|
+
*/
|
|
9
|
+
template <class W, class X1 = boost::python::detail::not_specified, class X2 = boost::python::detail::not_specified,
|
|
10
|
+
class X3 = boost::python::detail::not_specified, typename... Args>
|
|
11
|
+
boost::python::class_<W, X1, X2, X3> class__(Args... args)
|
|
12
|
+
{
|
|
13
|
+
return boost::python::class_<W, X1, X2>(args...).def(
|
|
14
|
+
"__cxx_class__", +[]() { return boost::core::demangle(typeid(W).name()); });
|
|
15
|
+
}
|
|
@@ -2,30 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
#include "expose-utils.hpp"
|
|
4
4
|
#include "module.h"
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
#include "doxystub.h"
|
|
6
7
|
#include "placo/model/robot_wrapper.h"
|
|
7
8
|
#include "placo/dynamics/dynamics_solver.h"
|
|
8
9
|
#include <Eigen/Dense>
|
|
9
10
|
#include <boost/python.hpp>
|
|
11
|
+
#include <eigenpy/eigen-to-python.hpp>
|
|
10
12
|
|
|
11
13
|
using namespace placo;
|
|
12
14
|
using namespace placo::dynamics;
|
|
13
15
|
using namespace placo::model;
|
|
14
16
|
|
|
15
17
|
// Overloads
|
|
16
|
-
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(
|
|
18
|
+
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(frame_configure_overloads, configure, 2, 4);
|
|
17
19
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(solve_overloads, solve, 0, 1);
|
|
20
|
+
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_torque_overloads, set_torque, 2, 4);
|
|
21
|
+
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_joint_overloads, set_joint, 2, 4);
|
|
18
22
|
|
|
19
23
|
void exposeDynamics()
|
|
20
24
|
{
|
|
21
25
|
class__<DynamicsSolver::Result>("DynamicsSolverResult")
|
|
22
26
|
.add_property("success", &DynamicsSolver::Result::success)
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
"qdd", +[](const DynamicsSolver::Result& result) { return result.qdd; })
|
|
27
|
-
.add_property(
|
|
28
|
-
"tau_contacts", +[](const DynamicsSolver::Result& result) { return result.tau_contacts; })
|
|
27
|
+
.def_readwrite("tau", &DynamicsSolver::Result::tau)
|
|
28
|
+
.def_readwrite("qdd", &DynamicsSolver::Result::qdd)
|
|
29
|
+
.def_readwrite("tau_contacts", &DynamicsSolver::Result::tau_contacts)
|
|
29
30
|
.def(
|
|
30
31
|
"tau_dict", +[](const DynamicsSolver::Result& result, RobotWrapper& robot) {
|
|
31
32
|
boost::python::dict dict;
|
|
@@ -42,15 +43,16 @@ void exposeDynamics()
|
|
|
42
43
|
.def_readwrite("active", &Contact::active)
|
|
43
44
|
.def_readwrite("mu", &Contact::mu)
|
|
44
45
|
.def_readwrite("weight_forces", &Contact::weight_forces)
|
|
46
|
+
.def_readwrite("weight_tangentials", &Contact::weight_tangentials)
|
|
45
47
|
.def_readwrite("weight_moments", &Contact::weight_moments)
|
|
46
|
-
.
|
|
47
|
-
"wrench", +[](Contact& contact) { return contact.wrench; });
|
|
48
|
+
.def_readonly("wrench", &Contact::wrench);
|
|
48
49
|
|
|
49
50
|
class__<PointContact, bases<Contact>>("PointContact", init<PositionTask&, bool>())
|
|
50
51
|
.def(
|
|
51
52
|
"position_task", +[](PointContact& contact) -> PositionTask& { return *contact.position_task; },
|
|
52
53
|
return_internal_reference<>())
|
|
53
|
-
.def_readwrite("unilateral", &PointContact::unilateral)
|
|
54
|
+
.def_readwrite("unilateral", &PointContact::unilateral)
|
|
55
|
+
.def_readwrite("R_world_surface", &PointContact::R_world_surface);
|
|
54
56
|
|
|
55
57
|
class__<Contact6D, bases<Contact>>("Contact6D", init<FrameTask&, bool>())
|
|
56
58
|
.def(
|
|
@@ -64,14 +66,23 @@ void exposeDynamics()
|
|
|
64
66
|
.def_readwrite("width", &Contact6D::width)
|
|
65
67
|
.def("zmp", &Contact6D::zmp);
|
|
66
68
|
|
|
67
|
-
class__<
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
class__<LineContact, bases<Contact>>("LineContact", init<FrameTask&, bool>())
|
|
70
|
+
.def(
|
|
71
|
+
"position_task", +[](LineContact& contact) -> PositionTask& { return *contact.position_task; },
|
|
72
|
+
return_internal_reference<>())
|
|
73
|
+
.def(
|
|
74
|
+
"orientation_task", +[](LineContact& contact) -> OrientationTask& { return *contact.orientation_task; },
|
|
75
|
+
return_internal_reference<>())
|
|
76
|
+
.def_readwrite("unilateral", &LineContact::unilateral)
|
|
77
|
+
.def_readwrite("length", &LineContact::length)
|
|
78
|
+
.def("zmp", &LineContact::zmp)
|
|
79
|
+
.add_property(
|
|
80
|
+
"R_world_surface", +[](PointContact& contact) { return contact.R_world_surface; },
|
|
81
|
+
+[](PointContact& contact, Eigen::Matrix3d R) { contact.R_world_surface = R; });
|
|
70
82
|
|
|
71
83
|
class__<ExternalWrenchContact, bases<Contact>>("ExternalWrenchContact", init<RobotWrapper::FrameIndex>())
|
|
72
84
|
.add_property("frame_index", &ExternalWrenchContact::frame_index)
|
|
73
|
-
.
|
|
74
|
-
"w_ext", +[](ExternalWrenchContact& contact) { return contact.w_ext; }, &ExternalWrenchContact::w_ext);
|
|
85
|
+
.def_readwrite("w_ext", &ExternalWrenchContact::w_ext);
|
|
75
86
|
|
|
76
87
|
class__<PuppetContact, bases<Contact>>("PuppetContact", init<>());
|
|
77
88
|
|
|
@@ -79,29 +90,28 @@ void exposeDynamics()
|
|
|
79
90
|
|
|
80
91
|
class__<DynamicsSolver>("DynamicsSolver", init<RobotWrapper&>())
|
|
81
92
|
.add_property("problem", &DynamicsSolver::problem)
|
|
82
|
-
.def_readwrite("
|
|
93
|
+
.def_readwrite("damping", &DynamicsSolver::damping)
|
|
83
94
|
.def_readwrite("dt", &DynamicsSolver::dt)
|
|
84
|
-
.
|
|
95
|
+
.def("set_qdd_safe", &DynamicsSolver::set_qdd_safe)
|
|
96
|
+
.def("set_torque_limit", &DynamicsSolver::set_torque_limit)
|
|
85
97
|
.def_readwrite("gravity_only", &DynamicsSolver::gravity_only)
|
|
86
98
|
.def_readwrite("torque_cost", &DynamicsSolver::torque_cost)
|
|
99
|
+
.add_property(
|
|
100
|
+
"extra_force", +[](DynamicsSolver& solver) { return solver.extra_force; },
|
|
101
|
+
+[](DynamicsSolver& solver, Eigen::VectorXd force) { solver.extra_force = force; })
|
|
87
102
|
.def("mask_fbase", &DynamicsSolver::mask_fbase)
|
|
88
103
|
.def("add_point_contact", &DynamicsSolver::add_point_contact, return_internal_reference<>())
|
|
89
104
|
.def("add_unilateral_point_contact", &DynamicsSolver::add_unilateral_point_contact, return_internal_reference<>())
|
|
90
|
-
.def("add_relative_point_contact", &DynamicsSolver::add_relative_point_contact, return_internal_reference<>())
|
|
91
|
-
.def("add_relative_fixed_contact", &DynamicsSolver::add_relative_fixed_contact, return_internal_reference<>())
|
|
92
105
|
.def("add_planar_contact", &DynamicsSolver::add_planar_contact, return_internal_reference<>())
|
|
93
106
|
.def("add_fixed_contact", &DynamicsSolver::add_fixed_contact, return_internal_reference<>())
|
|
94
|
-
.def
|
|
107
|
+
.def("add_line_contact", &DynamicsSolver::add_line_contact, return_internal_reference<>())
|
|
108
|
+
.def("add_unilateral_line_contact", &DynamicsSolver::add_unilateral_line_contact, return_internal_reference<>())
|
|
109
|
+
.def<ExternalWrenchContact& (DynamicsSolver::*)(std::string, std::string)>(
|
|
95
110
|
"add_external_wrench_contact", &DynamicsSolver::add_external_wrench_contact, return_internal_reference<>())
|
|
96
111
|
.def("add_puppet_contact", &DynamicsSolver::add_puppet_contact, return_internal_reference<>())
|
|
97
112
|
.def("add_task_contact", &DynamicsSolver::add_task_contact, return_internal_reference<>())
|
|
98
113
|
.def("add_avoid_self_collisions_constraint", &DynamicsSolver::add_avoid_self_collisions_constraint,
|
|
99
114
|
return_internal_reference<>())
|
|
100
|
-
.def("add_reaction_ratio_constraint", &DynamicsSolver::add_reaction_ratio_constraint,
|
|
101
|
-
return_internal_reference<>())
|
|
102
|
-
.def("set_passive", &DynamicsSolver::set_passive, set_passive_overloads())
|
|
103
|
-
.def("set_tau", &DynamicsSolver::set_tau)
|
|
104
|
-
.def("reset_joint", &DynamicsSolver::reset_joint)
|
|
105
115
|
.def("enable_velocity_limits", &DynamicsSolver::enable_velocity_limits)
|
|
106
116
|
.def("enable_velocity_vs_torque_limits", &DynamicsSolver::enable_velocity_vs_torque_limits)
|
|
107
117
|
.def("enable_joint_limits", &DynamicsSolver::enable_joint_limits)
|
|
@@ -116,6 +126,8 @@ void exposeDynamics()
|
|
|
116
126
|
.def<void (DynamicsSolver::*)(FrameTask&)>("remove_task", &DynamicsSolver::remove_task)
|
|
117
127
|
.def("remove_contact", &DynamicsSolver::remove_contact)
|
|
118
128
|
.def("remove_constraint", &DynamicsSolver::remove_constraint)
|
|
129
|
+
.def("set_kp", &DynamicsSolver::set_kp)
|
|
130
|
+
.def("set_kd", &DynamicsSolver::set_kd)
|
|
119
131
|
.add_property(
|
|
120
132
|
"robot", +[](const DynamicsSolver& solver) { return solver.robot; })
|
|
121
133
|
.def(
|
|
@@ -147,64 +159,44 @@ void exposeDynamics()
|
|
|
147
159
|
&DynamicsSolver::add_frame_task);
|
|
148
160
|
|
|
149
161
|
class__<Task, bases<tools::Prioritized>, boost::noncopyable>("DynamicsTask", no_init)
|
|
150
|
-
.
|
|
151
|
-
|
|
152
|
-
.add_property(
|
|
153
|
-
"b", +[](const Task& task) { return task.b; })
|
|
162
|
+
.def_readwrite("A", &Task::A)
|
|
163
|
+
.def_readwrite("b", &Task::b)
|
|
154
164
|
.add_property("kp", &Task::kp, &Task::kp)
|
|
155
165
|
.add_property("kd", &Task::kd, &Task::kd)
|
|
156
|
-
.add_property("critically_damped", &Task::critically_damped, &Task::critically_damped)
|
|
157
166
|
.add_property("error", &Task::error)
|
|
158
167
|
.add_property("derror", &Task::derror);
|
|
159
168
|
|
|
160
169
|
class__<PositionTask, bases<Task>>("DynamicsPositionTask", init<RobotWrapper::FrameIndex, Eigen::Vector3d>())
|
|
161
170
|
.add_property("frame_index", &PositionTask::frame_index)
|
|
162
|
-
.
|
|
163
|
-
|
|
164
|
-
.
|
|
165
|
-
"dtarget_world", +[](const PositionTask& task) { return task.dtarget_world; }, &PositionTask::dtarget_world)
|
|
171
|
+
.def_readwrite("target_world", &PositionTask::target_world)
|
|
172
|
+
.def_readwrite("dtarget_world", &PositionTask::dtarget_world)
|
|
173
|
+
.def_readwrite("ddtarget_world", &PositionTask::ddtarget_world)
|
|
166
174
|
.add_property("mask", &PositionTask::mask, &PositionTask::mask);
|
|
167
175
|
|
|
168
176
|
class__<CoMTask, bases<Task>>("DynamicsCoMTask", init<Eigen::Vector3d>())
|
|
169
|
-
.
|
|
170
|
-
|
|
171
|
-
.
|
|
172
|
-
"dtarget_world", +[](const CoMTask& task) { return task.dtarget_world; }, &CoMTask::dtarget_world)
|
|
173
|
-
.add_property(
|
|
174
|
-
"ddtarget_world", +[](const CoMTask& task) { return task.dtarget_world; }, &CoMTask::ddtarget_world)
|
|
177
|
+
.def_readwrite("target_world", &CoMTask::target_world)
|
|
178
|
+
.def_readwrite("dtarget_world", &CoMTask::dtarget_world)
|
|
179
|
+
.def_readwrite("ddtarget_world", &CoMTask::ddtarget_world)
|
|
175
180
|
.add_property("mask", &CoMTask::mask, &CoMTask::mask);
|
|
176
181
|
|
|
177
182
|
class__<RelativePositionTask, bases<Task>>(
|
|
178
183
|
"DynamicsRelativePositionTask", init<RobotWrapper::FrameIndex, RobotWrapper::FrameIndex, Eigen::Vector3d>())
|
|
179
|
-
.
|
|
180
|
-
|
|
181
|
-
.
|
|
182
|
-
"dtarget", +[](const RelativePositionTask& task) { return task.dtarget; }, &RelativePositionTask::dtarget)
|
|
183
|
-
.add_property(
|
|
184
|
-
"ddtarget", +[](const RelativePositionTask& task) { return task.ddtarget; }, &RelativePositionTask::ddtarget)
|
|
184
|
+
.def_readwrite("target", &RelativePositionTask::target)
|
|
185
|
+
.def_readwrite("dtarget", &RelativePositionTask::dtarget)
|
|
186
|
+
.def_readwrite("ddtarget", &RelativePositionTask::ddtarget)
|
|
185
187
|
.add_property("mask", &RelativePositionTask::mask, &RelativePositionTask::mask);
|
|
186
188
|
|
|
187
189
|
class__<RelativeOrientationTask, bases<Task>>(
|
|
188
190
|
"DynamicsRelativeOrientationTask", init<RobotWrapper::FrameIndex, RobotWrapper::FrameIndex, Eigen::Matrix3d>())
|
|
189
|
-
.
|
|
190
|
-
|
|
191
|
-
.
|
|
192
|
-
"omega_a_b", +[](const RelativeOrientationTask& task) { return task.omega_a_b; },
|
|
193
|
-
&RelativeOrientationTask::omega_a_b)
|
|
194
|
-
.add_property(
|
|
195
|
-
"domega_a_b", +[](const RelativeOrientationTask& task) { return task.domega_a_b; },
|
|
196
|
-
&RelativeOrientationTask::domega_a_b)
|
|
191
|
+
.def_readwrite("R_a_b", &RelativeOrientationTask::R_a_b)
|
|
192
|
+
.def_readwrite("omega_a_b", &RelativeOrientationTask::omega_a_b)
|
|
193
|
+
.def_readwrite("domega_a_b", &RelativeOrientationTask::domega_a_b)
|
|
197
194
|
.add_property("mask", &RelativeOrientationTask::mask, &RelativeOrientationTask::mask);
|
|
198
195
|
|
|
199
196
|
class__<OrientationTask, bases<Task>>("DynamicsOrientationTask", init<RobotWrapper::FrameIndex, Eigen::Matrix3d>())
|
|
200
|
-
.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
.add_property(
|
|
204
|
-
"omega_world", +[](const OrientationTask& task) { return task.omega_world; }, &OrientationTask::omega_world)
|
|
205
|
-
.add_property(
|
|
206
|
-
"domega_world", +[](const OrientationTask& task) { return task.domega_world; },
|
|
207
|
-
&OrientationTask::domega_world)
|
|
197
|
+
.def_readwrite("R_world_frame", &OrientationTask::R_world_frame)
|
|
198
|
+
.def_readwrite("omega_world", &OrientationTask::omega_world)
|
|
199
|
+
.def_readwrite("domega_world", &OrientationTask::domega_world)
|
|
208
200
|
.add_property("mask", &OrientationTask::mask, &OrientationTask::mask);
|
|
209
201
|
|
|
210
202
|
class__<FrameTask>("DynamicsFrameTask", init<>())
|
|
@@ -215,7 +207,7 @@ void exposeDynamics()
|
|
|
215
207
|
.def(
|
|
216
208
|
"orientation", +[](const FrameTask& task) -> OrientationTask& { return *task.orientation; },
|
|
217
209
|
return_internal_reference<>())
|
|
218
|
-
.def("configure", &FrameTask::configure)
|
|
210
|
+
.def("configure", &FrameTask::configure, frame_configure_overloads())
|
|
219
211
|
.add_property("T_world_frame", &FrameTask::get_T_world_frame, &FrameTask::set_T_world_frame);
|
|
220
212
|
|
|
221
213
|
class__<RelativeFrameTask>("DynamicsRelativeFrameTask", init<>())
|
|
@@ -230,7 +222,8 @@ void exposeDynamics()
|
|
|
230
222
|
.add_property("T_a_b", &RelativeFrameTask::get_T_a_b, &RelativeFrameTask::set_T_a_b);
|
|
231
223
|
|
|
232
224
|
class__<JointsTask, bases<Task>>("DynamicsJointsTask", init<>())
|
|
233
|
-
.def("set_joint", &JointsTask::set_joint)
|
|
225
|
+
.def("set_joint", &JointsTask::set_joint, set_joint_overloads())
|
|
226
|
+
.def("get_joint", &JointsTask::get_joint)
|
|
234
227
|
.def(
|
|
235
228
|
"set_joints", +[](JointsTask& task,
|
|
236
229
|
boost::python::dict& py_dict) { update_map<std::string, double>(task.joints, py_dict); })
|
|
@@ -239,7 +232,9 @@ void exposeDynamics()
|
|
|
239
232
|
update_map<std::string, double>(task.djoints, py_dict);
|
|
240
233
|
});
|
|
241
234
|
|
|
242
|
-
class__<TorqueTask, bases<Task>>("DynamicsTorqueTask", init<>())
|
|
235
|
+
class__<TorqueTask, bases<Task>>("DynamicsTorqueTask", init<>())
|
|
236
|
+
.def("set_torque", &TorqueTask::set_torque, set_torque_overloads())
|
|
237
|
+
.def("reset_torque", &TorqueTask::reset_torque);
|
|
243
238
|
|
|
244
239
|
class__<GearTask, bases<Task>>("DynamicsGearTask", init<>())
|
|
245
240
|
.def("set_gear", &GearTask::set_gear)
|
|
@@ -250,7 +245,4 @@ void exposeDynamics()
|
|
|
250
245
|
class__<AvoidSelfCollisionsConstraint, bases<Constraint>>("AvoidSelfCollisionsDynamicsConstraint", init<>())
|
|
251
246
|
.def_readwrite("self_collisions_margin", &AvoidSelfCollisionsConstraint::self_collisions_margin)
|
|
252
247
|
.def_readwrite("self_collisions_trigger", &AvoidSelfCollisionsConstraint::self_collisions_trigger);
|
|
253
|
-
|
|
254
|
-
class__<ReactionRatioConstraint, bases<Constraint>>("DynamicsReactionRatioConstraint", init<Contact&, double>())
|
|
255
|
-
.def_readwrite("reaction_ratio", &ReactionRatioConstraint::reaction_ratio);
|
|
256
248
|
}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
#include "expose-utils.hpp"
|
|
4
4
|
#include "module.h"
|
|
5
|
-
#include "
|
|
5
|
+
#include "doxystub.h"
|
|
6
6
|
#include "placo/humanoid/footsteps_planner.h"
|
|
7
7
|
#include "placo/humanoid/footsteps_planner_naive.h"
|
|
8
8
|
#include "placo/humanoid/footsteps_planner_repetitive.h"
|
|
9
9
|
#include <Eigen/Dense>
|
|
10
10
|
#include <boost/python.hpp>
|
|
11
|
+
#include <eigenpy/eigen-to-python.hpp>
|
|
11
12
|
|
|
12
13
|
using namespace boost::python;
|
|
13
14
|
using namespace placo::humanoid;
|
|
@@ -20,37 +21,37 @@ void exposeFootsteps()
|
|
|
20
21
|
.value("right", HumanoidRobot::Side::Right);
|
|
21
22
|
|
|
22
23
|
class__<FootstepsPlanner::Footstep>("Footstep", init<double, double>())
|
|
23
|
-
.def("support_polygon", &FootstepsPlanner::Footstep::support_polygon)
|
|
24
24
|
.add_property("side", &FootstepsPlanner::Footstep::side, &FootstepsPlanner::Footstep::side)
|
|
25
|
-
.add_property(
|
|
26
|
-
"frame", +[](const FootstepsPlanner::Footstep& footstep) { return footstep.frame; },
|
|
27
|
-
&FootstepsPlanner::Footstep::frame)
|
|
28
25
|
.add_property("foot_length", &FootstepsPlanner::Footstep::foot_length, &FootstepsPlanner::Footstep::foot_length)
|
|
29
26
|
.add_property("foot_width", &FootstepsPlanner::Footstep::foot_width, &FootstepsPlanner::Footstep::foot_width)
|
|
27
|
+
.add_property("frame", &FootstepsPlanner::Footstep::frame, &FootstepsPlanner::Footstep::frame)
|
|
30
28
|
.def("support_polygon", &FootstepsPlanner::Footstep::support_polygon)
|
|
31
29
|
.def("overlap", &FootstepsPlanner::Footstep::overlap)
|
|
32
30
|
.def("polygon_contains", &FootstepsPlanner::Footstep::polygon_contains)
|
|
33
|
-
.staticmethod("polygon_contains")
|
|
34
|
-
.add_property("kick", &FootstepsPlanner::Footstep::kick, &FootstepsPlanner::Footstep::kick);
|
|
31
|
+
.staticmethod("polygon_contains");
|
|
35
32
|
|
|
36
|
-
class__<FootstepsPlanner::Support>("Support")
|
|
33
|
+
class__<FootstepsPlanner::Support>("Support", init<>())
|
|
37
34
|
.def("support_polygon", &FootstepsPlanner::Support::support_polygon)
|
|
38
35
|
.def("frame", &FootstepsPlanner::Support::frame)
|
|
39
36
|
.def("footstep_frame", &FootstepsPlanner::Support::footstep_frame)
|
|
37
|
+
.def("apply_offset", &FootstepsPlanner::Support::apply_offset)
|
|
40
38
|
.def("side", &FootstepsPlanner::Support::side)
|
|
41
39
|
.def("is_both", &FootstepsPlanner::Support::is_both)
|
|
42
40
|
.def(
|
|
43
41
|
"set_start", +[](FootstepsPlanner::Support& support, bool b) { support.start = b; })
|
|
44
42
|
.def(
|
|
45
43
|
"set_end", +[](FootstepsPlanner::Support& support, bool b) { support.end = b; })
|
|
46
|
-
.
|
|
47
|
-
.add_property("
|
|
44
|
+
.add_property("footsteps", &FootstepsPlanner::Support::footsteps, &FootstepsPlanner::Support::footsteps)
|
|
45
|
+
.add_property("t_start", &FootstepsPlanner::Support::t_start, &FootstepsPlanner::Support::t_start)
|
|
46
|
+
.add_property("elapsed_ratio", &FootstepsPlanner::Support::elapsed_ratio,
|
|
47
|
+
&FootstepsPlanner::Support::elapsed_ratio)
|
|
48
|
+
.add_property("time_ratio", &FootstepsPlanner::Support::time_ratio, &FootstepsPlanner::Support::time_ratio)
|
|
48
49
|
.add_property("start", &FootstepsPlanner::Support::start, &FootstepsPlanner::Support::start)
|
|
49
|
-
.add_property("end", &FootstepsPlanner::Support::end, &FootstepsPlanner::Support::end)
|
|
50
|
+
.add_property("end", &FootstepsPlanner::Support::end, &FootstepsPlanner::Support::end)
|
|
51
|
+
.add_property("replanned", &FootstepsPlanner::Support::replanned, &FootstepsPlanner::Support::replanned);
|
|
50
52
|
|
|
51
53
|
class__<FootstepsPlanner, boost::noncopyable>("FootstepsPlanner", no_init)
|
|
52
54
|
.def("make_supports", &FootstepsPlanner::make_supports)
|
|
53
|
-
.def("add_first_support", &FootstepsPlanner::add_first_support)
|
|
54
55
|
.def("opposite_footstep", &FootstepsPlanner::opposite_footstep);
|
|
55
56
|
|
|
56
57
|
class__<FootstepsPlannerNaive, bases<FootstepsPlanner>>("FootstepsPlannerNaive", init<HumanoidParameters&>())
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
#include "expose-utils.hpp"
|
|
4
4
|
#include "module.h"
|
|
5
|
-
#include "
|
|
5
|
+
#include "doxystub.h"
|
|
6
6
|
#include "placo/kinematics/kinematics_solver.h"
|
|
7
7
|
#include <boost/python/return_internal_reference.hpp>
|
|
8
8
|
#include <Eigen/Dense>
|
|
9
9
|
#include <boost/python.hpp>
|
|
10
|
+
#include <eigenpy/eigen-to-python.hpp>
|
|
10
11
|
|
|
11
12
|
using namespace boost::python;
|
|
12
13
|
using namespace placo;
|
|
@@ -92,6 +93,10 @@ void exposeKinematics()
|
|
|
92
93
|
.def("add_com_polygon_constraint", &KinematicsSolver::add_com_polygon_constraint,
|
|
93
94
|
return_internal_reference<>())
|
|
94
95
|
|
|
96
|
+
// Joint-space half-spaces
|
|
97
|
+
.def("add_joint_space_half_spaces_constraint", &KinematicsSolver::add_joint_space_half_spaces_constraint,
|
|
98
|
+
return_internal_reference<>())
|
|
99
|
+
|
|
95
100
|
// Cone constraint
|
|
96
101
|
.def<ConeConstraint& (KinematicsSolver::*)(std::string, std::string, double)>(
|
|
97
102
|
"add_cone_constraint", &KinematicsSolver::add_cone_constraint, return_internal_reference<>())
|
|
@@ -114,14 +119,11 @@ void exposeKinematics()
|
|
|
114
119
|
.def<void (KinematicsSolver::*)(Task&)>("remove_task", &KinematicsSolver::remove_task)
|
|
115
120
|
.def<void (KinematicsSolver::*)(FrameTask&)>("remove_task", &KinematicsSolver::remove_task)
|
|
116
121
|
.def("remove_constraint", &KinematicsSolver::remove_constraint)
|
|
117
|
-
.def("solve", &KinematicsSolver::solve)
|
|
118
|
-
.def("add_q_noise", &KinematicsSolver::add_q_noise);
|
|
122
|
+
.def("solve", &KinematicsSolver::solve);
|
|
119
123
|
|
|
120
124
|
class__<Task, bases<tools::Prioritized>, boost::noncopyable>("Task", no_init)
|
|
121
|
-
.
|
|
122
|
-
|
|
123
|
-
.add_property(
|
|
124
|
-
"b", +[](const Task& task) { return task.b; })
|
|
125
|
+
.def_readonly("A", &Task::A)
|
|
126
|
+
.def_readonly("b", &Task::b)
|
|
125
127
|
.def("error", &Task::error)
|
|
126
128
|
.def("error_norm", &Task::error_norm)
|
|
127
129
|
.def("update", &Task::update);
|
|
@@ -136,8 +138,7 @@ void exposeKinematics()
|
|
|
136
138
|
"RelativePositionTask", init<RobotWrapper::FrameIndex, RobotWrapper::FrameIndex, Eigen::Vector3d>())
|
|
137
139
|
.add_property("frame_a", &RelativePositionTask::frame_a)
|
|
138
140
|
.add_property("frame_b", &RelativePositionTask::frame_b)
|
|
139
|
-
.
|
|
140
|
-
"target", +[](const RelativePositionTask& task) { return task.target; }, &RelativePositionTask::target)
|
|
141
|
+
.def_readwrite("target", &RelativePositionTask::target)
|
|
141
142
|
.add_property("mask", &RelativePositionTask::mask, &RelativePositionTask::mask);
|
|
142
143
|
|
|
143
144
|
class__<CoMTask, bases<Task>>("CoMTask", init<Eigen::Vector3d>())
|
|
@@ -147,17 +148,14 @@ void exposeKinematics()
|
|
|
147
148
|
|
|
148
149
|
class__<OrientationTask, bases<Task>>("OrientationTask", init<RobotWrapper::FrameIndex, Eigen::Matrix3d>())
|
|
149
150
|
.add_property("frame_index", &OrientationTask::frame_index)
|
|
150
|
-
.
|
|
151
|
-
"R_world_frame", +[](const OrientationTask& task) { return task.R_world_frame; },
|
|
152
|
-
&OrientationTask::R_world_frame)
|
|
151
|
+
.def_readwrite("R_world_frame", &OrientationTask::R_world_frame)
|
|
153
152
|
.add_property("mask", &OrientationTask::mask, &OrientationTask::mask);
|
|
154
153
|
|
|
155
154
|
class__<RelativeOrientationTask, bases<Task>>(
|
|
156
155
|
"RelativeOrientationTask", init<RobotWrapper::FrameIndex, RobotWrapper::FrameIndex, Eigen::Matrix3d>())
|
|
157
156
|
.add_property("frame_a", &RelativeOrientationTask::frame_a)
|
|
158
157
|
.add_property("frame_b", &RelativeOrientationTask::frame_b)
|
|
159
|
-
.
|
|
160
|
-
"R_a_b", +[](const RelativeOrientationTask& task) { return task.R_a_b; }, &RelativeOrientationTask::R_a_b)
|
|
158
|
+
.def_readwrite("R_a_b", &RelativeOrientationTask::R_a_b)
|
|
161
159
|
.add_property("mask", &RelativeOrientationTask::mask, &RelativeOrientationTask::mask);
|
|
162
160
|
|
|
163
161
|
class__<FrameTask>("FrameTask", init<>())
|
|
@@ -187,12 +185,11 @@ void exposeKinematics()
|
|
|
187
185
|
.add_property("frame_index", &AxisAlignTask::frame_index)
|
|
188
186
|
.add_property(
|
|
189
187
|
"axis_frame", +[](const AxisAlignTask& task) { return task.axis_frame; }, &AxisAlignTask::axis_frame)
|
|
190
|
-
.
|
|
191
|
-
"targetAxis_world", +[](const AxisAlignTask& task) { return task.targetAxis_world; },
|
|
192
|
-
&AxisAlignTask::targetAxis_world);
|
|
188
|
+
.def_readwrite("targetAxis_world", &AxisAlignTask::targetAxis_world);
|
|
193
189
|
|
|
194
190
|
class__<JointsTask, bases<Task>>("JointsTask", init<>())
|
|
195
191
|
.def("set_joint", &JointsTask::set_joint)
|
|
192
|
+
.def("get_joint", &JointsTask::get_joint)
|
|
196
193
|
.def(
|
|
197
194
|
"set_joints", +[](JointsTask& task, boost::python::dict& py_dict) {
|
|
198
195
|
update_map<std::string, double>(task.joints, py_dict);
|
|
@@ -206,8 +203,7 @@ void exposeKinematics()
|
|
|
206
203
|
.add_property("joint", &WheelTask::joint)
|
|
207
204
|
.add_property("radius", &WheelTask::radius)
|
|
208
205
|
.add_property("omniwheel", &WheelTask::omniwheel)
|
|
209
|
-
.
|
|
210
|
-
"T_world_surface", +[](const WheelTask& task) { return task.T_world_surface; }, &WheelTask::T_world_surface);
|
|
206
|
+
.def_readwrite("T_world_surface", &WheelTask::T_world_surface);
|
|
211
207
|
|
|
212
208
|
class__<DistanceTask, bases<Task>>("DistanceTask", init<RobotWrapper::FrameIndex, RobotWrapper::FrameIndex, double>())
|
|
213
209
|
.add_property("frame_a", &DistanceTask::frame_a)
|
|
@@ -240,6 +236,11 @@ void exposeKinematics()
|
|
|
240
236
|
.def_readwrite("omega", &CoMPolygonConstraint::omega)
|
|
241
237
|
.def_readwrite("margin", &CoMPolygonConstraint::margin);
|
|
242
238
|
|
|
239
|
+
class__<JointSpaceHalfSpacesConstraint, bases<Constraint>>("JointSpaceHalfSpacesConstraint",
|
|
240
|
+
init<Eigen::MatrixXd, Eigen::VectorXd>())
|
|
241
|
+
.def_readwrite("A", &JointSpaceHalfSpacesConstraint::A)
|
|
242
|
+
.def_readwrite("b", &JointSpaceHalfSpacesConstraint::b);
|
|
243
|
+
|
|
243
244
|
class__<ConeConstraint, bases<Constraint>>(
|
|
244
245
|
"ConeConstraint", init<model::RobotWrapper::FrameIndex, model::RobotWrapper::FrameIndex, double>())
|
|
245
246
|
.def_readwrite("angle_max", &ConeConstraint::angle_max)
|