placo 0.8.7__tar.gz → 0.8.8__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.8.7 → placo-0.8.8}/.github/workflows/wheels.yml +6 -0
- {placo-0.8.7 → placo-0.8.8}/PKG-INFO +1 -1
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-walk-pattern-generator.cpp +8 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/module.cpp +3 -0
- {placo-0.8.7 → placo-0.8.8}/pyproject.toml +1 -1
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/walk_pattern_generator.cpp +84 -49
- placo-0.8.7/Makefile +0 -12
- placo-0.8.7/build_wheel.sh +0 -9
- placo-0.8.7/tweak_sdist.sh +0 -22
- {placo-0.8.7 → placo-0.8.8}/.clang-format +0 -0
- {placo-0.8.7 → placo-0.8.8}/.gitattributes +0 -0
- {placo-0.8.7 → placo-0.8.8}/.gitignore +0 -0
- {placo-0.8.7 → placo-0.8.8}/.readthedocs.yaml +0 -0
- {placo-0.8.7 → placo-0.8.8}/CMakeLists.txt +0 -0
- {placo-0.8.7 → placo-0.8.8}/Doxyfile +0 -0
- {placo-0.8.7 → placo-0.8.8}/LICENSE +0 -0
- {placo-0.8.7 → placo-0.8.8}/README.md +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/doxystub.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-eigen.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-footsteps.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-kinematics.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-parameters.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-problem.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-robot-wrapper.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-tools.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/expose-utils.hpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/bindings/module.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/.vscode/settings.json +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/Makefile +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/placo_utils/__init__.py +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/placo_utils/tf.py +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/placo_utils/view.py +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/placo_utils/visualization.py +0 -0
- {placo-0.8.7 → placo-0.8.8}/python/run_tests.sh +0 -0
- {placo-0.8.7 → placo-0.8.8}/scripts/requirements.sh +0 -0
- {placo-0.8.7 → placo-0.8.8}/scripts/robotpkg.sh +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/footsteps_planner.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/humanoid_parameters.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/humanoid_robot.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/humanoid_robot.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/kick.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/lipm.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/walk_pattern_generator.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/walk_tasks.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/humanoid/walk_tasks.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/joint_space_half_spaces_constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/kinematics_solver.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/model/robot_wrapper.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/model/robot_wrapper.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/expression.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/expression.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/integrator.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/problem.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/problem.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/problem_polynom.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/problem_polynom.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/qp_error.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/sparsity.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/variable.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/problem/variable.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/cubic_spline.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/directions.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/directions.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/polynom.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/polynom.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/prioritized.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/segment.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/segment.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/utils.cpp +0 -0
- {placo-0.8.7 → placo-0.8.8}/src/placo/tools/utils.h +0 -0
- {placo-0.8.7 → placo-0.8.8}/wks.yml +0 -0
|
@@ -4,10 +4,15 @@ on:
|
|
|
4
4
|
release:
|
|
5
5
|
types:
|
|
6
6
|
- published
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- '**' # Sur tout push, toutes branches
|
|
7
10
|
|
|
8
11
|
env:
|
|
9
12
|
CIBW_SKIP: "*i686 *musl* *armv7* *ppc64* *s390*"
|
|
10
13
|
CIBW_REPAIR_WHEEL_COMMAND: ""
|
|
14
|
+
CIBW_TEST_REQUIRES: matplotlib
|
|
15
|
+
CIBW_TEST_COMMAND: "python -m unittest discover python/tests/ \"*_test.py\""
|
|
11
16
|
|
|
12
17
|
jobs:
|
|
13
18
|
build_wheels:
|
|
@@ -40,6 +45,7 @@ jobs:
|
|
|
40
45
|
path: ./wheelhouse/*.whl
|
|
41
46
|
|
|
42
47
|
build_sdist:
|
|
48
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
43
49
|
name: Build source distribution
|
|
44
50
|
runs-on: ubuntu-latest
|
|
45
51
|
steps:
|
|
@@ -133,6 +133,14 @@ void exposeWalkPatternGenerator()
|
|
|
133
133
|
.add_property("trunk_orientation_task",
|
|
134
134
|
make_function(
|
|
135
135
|
+[](WalkTasks& tasks) -> OrientationTask& { return *tasks.trunk_orientation_task; },
|
|
136
|
+
return_value_policy<reference_existing_object>()))
|
|
137
|
+
.add_property("com_task",
|
|
138
|
+
make_function(
|
|
139
|
+
+[](WalkTasks& tasks) -> CoMTask& { return *tasks.com_task; },
|
|
140
|
+
return_value_policy<reference_existing_object>()))
|
|
141
|
+
.add_property("trunk_task",
|
|
142
|
+
make_function(
|
|
143
|
+
+[](WalkTasks& tasks) -> PositionTask& { return *tasks.trunk_task; },
|
|
136
144
|
return_value_policy<reference_existing_object>()));
|
|
137
145
|
|
|
138
146
|
class__<LIPM::Trajectory>("LIPMTrajectory", init<>())
|
|
@@ -9,22 +9,17 @@ namespace placo::humanoid
|
|
|
9
9
|
using namespace placo::problem;
|
|
10
10
|
using namespace placo::tools;
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
WalkPatternGenerator::TrajectoryPart::TrajectoryPart(FootstepsPlanner::Support support, double t_start)
|
|
14
|
-
:
|
|
15
|
-
, t_start(t_start)
|
|
13
|
+
: support(support), t_start(t_start)
|
|
16
14
|
{
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
WalkPatternGenerator::Trajectory::Trajectory()
|
|
20
|
-
: left_foot_yaw(true)
|
|
21
|
-
, right_foot_yaw(true)
|
|
22
|
-
, trunk_yaw(true)
|
|
17
|
+
WalkPatternGenerator::Trajectory::Trajectory() : left_foot_yaw(true), right_foot_yaw(true), trunk_yaw(true)
|
|
23
18
|
{
|
|
24
19
|
T.setIdentity();
|
|
25
20
|
}
|
|
26
21
|
|
|
27
|
-
WalkPatternGenerator::Trajectory::Trajectory(double com_target_z, double t_start, double trunk_pitch, double trunk_roll)
|
|
22
|
+
WalkPatternGenerator::Trajectory::Trajectory(double com_target_z, double t_start, double trunk_pitch, double trunk_roll)
|
|
28
23
|
: left_foot_yaw(true)
|
|
29
24
|
, right_foot_yaw(true)
|
|
30
25
|
, trunk_yaw(true)
|
|
@@ -317,8 +312,9 @@ void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_ind
|
|
|
317
312
|
{
|
|
318
313
|
Eigen::Vector3d start = old_trajectory->get_T_world_foot(flying_side, trajectory.t_start).translation();
|
|
319
314
|
Eigen::Vector3d start_vel = old_trajectory->get_v_world_foot(flying_side, trajectory.t_start);
|
|
320
|
-
part.swing_trajectory = SwingFootCubic::make_trajectory(
|
|
321
|
-
|
|
315
|
+
part.swing_trajectory = SwingFootCubic::make_trajectory(
|
|
316
|
+
part.t_start, virt_duration, parameters.walk_foot_height, parameters.walk_foot_rise_ratio, start,
|
|
317
|
+
T_world_end.translation(), part.support.elapsed_ratio, start_vel);
|
|
322
318
|
|
|
323
319
|
double replan_yaw = old_trajectory->foot_yaw(flying_side).pos(trajectory.t_start);
|
|
324
320
|
trajectory.foot_yaw(flying_side).add_point(trajectory.t_start, replan_yaw, 0);
|
|
@@ -326,8 +322,9 @@ void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_ind
|
|
|
326
322
|
else
|
|
327
323
|
{
|
|
328
324
|
Eigen::Vector3d start = trajectory.parts[part_index - 1].support.footstep_frame(flying_side).translation();
|
|
329
|
-
part.swing_trajectory =
|
|
330
|
-
|
|
325
|
+
part.swing_trajectory =
|
|
326
|
+
SwingFootCubic::make_trajectory(part.t_start, virt_duration, parameters.walk_foot_height,
|
|
327
|
+
parameters.walk_foot_rise_ratio, start, T_world_end.translation());
|
|
331
328
|
}
|
|
332
329
|
|
|
333
330
|
trajectory.foot_yaw(flying_side).add_point(part.t_end, frame_yaw(T_world_end.rotation()), 0);
|
|
@@ -356,7 +353,7 @@ void WalkPatternGenerator::plan_feet_trajectories(Trajectory& trajectory, Trajec
|
|
|
356
353
|
old_trajectory->trunk_yaw.vel(trajectory.t_start));
|
|
357
354
|
}
|
|
358
355
|
|
|
359
|
-
for (int i; i<trajectory.parts.size(); i++)
|
|
356
|
+
for (int i; i < trajectory.parts.size(); i++)
|
|
360
357
|
{
|
|
361
358
|
// Single support
|
|
362
359
|
if (trajectory.parts[i].support.footsteps.size() == 1)
|
|
@@ -371,12 +368,14 @@ void WalkPatternGenerator::plan_feet_trajectories(Trajectory& trajectory, Trajec
|
|
|
371
368
|
}
|
|
372
369
|
}
|
|
373
370
|
|
|
374
|
-
void WalkPatternGenerator::constrain_lipm(problem::Problem& problem, LIPM& lipm, FootstepsPlanner::Support& support,
|
|
371
|
+
void WalkPatternGenerator::constrain_lipm(problem::Problem& problem, LIPM& lipm, FootstepsPlanner::Support& support,
|
|
372
|
+
double omega_2, HumanoidParameters& parameters)
|
|
375
373
|
{
|
|
376
|
-
for (int timestep = 1; timestep < lipm.timesteps+1; timestep++)
|
|
374
|
+
for (int timestep = 1; timestep < lipm.timesteps + 1; timestep++)
|
|
377
375
|
{
|
|
378
376
|
// Ensuring ZMP remains in the support polygon
|
|
379
|
-
auto& zmp_constraint = problem.add_constraint(PolygonConstraint::in_polygon_xy(
|
|
377
|
+
auto& zmp_constraint = problem.add_constraint(PolygonConstraint::in_polygon_xy(
|
|
378
|
+
lipm.zmp(timestep, omega_2), support.support_polygon(), parameters.zmp_margin));
|
|
380
379
|
if (soft)
|
|
381
380
|
{
|
|
382
381
|
zmp_constraint.configure(ProblemConstraint::Soft, 1e5);
|
|
@@ -392,12 +391,14 @@ void WalkPatternGenerator::constrain_lipm(problem::Problem& problem, LIPM& lipm,
|
|
|
392
391
|
|
|
393
392
|
// ZMP reference trajectory : target is the center of the support polygon
|
|
394
393
|
Eigen::Vector2d zmp_target = (support.frame() * Eigen::Vector3d(x_offset, y_offset, 0)).head(2);
|
|
395
|
-
problem.add_constraint(lipm.zmp(timestep, omega_2) == zmp_target)
|
|
396
|
-
|
|
394
|
+
problem.add_constraint(lipm.zmp(timestep, omega_2) == zmp_target)
|
|
395
|
+
.configure(ProblemConstraint::Soft, parameters.zmp_reference_weight);
|
|
396
|
+
|
|
397
397
|
// At the end of an end support, we reach the target with a null speed and a null acceleration
|
|
398
398
|
if (support.end && timestep == lipm.timesteps)
|
|
399
399
|
{
|
|
400
|
-
auto& pos_constraint = problem.add_constraint(
|
|
400
|
+
auto& pos_constraint = problem.add_constraint(
|
|
401
|
+
lipm.pos(timestep) == Eigen::Vector2d(support.frame().translation().x(), support.frame().translation().y()));
|
|
401
402
|
auto& vel_constraint = problem.add_constraint(lipm.vel(timestep) == Eigen::Vector2d(0., 0.));
|
|
402
403
|
auto& acc_constraint = problem.add_constraint(lipm.acc(timestep) == Eigen::Vector2d(0., 0.));
|
|
403
404
|
|
|
@@ -411,8 +412,9 @@ void WalkPatternGenerator::constrain_lipm(problem::Problem& problem, LIPM& lipm,
|
|
|
411
412
|
}
|
|
412
413
|
}
|
|
413
414
|
|
|
414
|
-
void WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<FootstepsPlanner::Support>& supports,
|
|
415
|
-
|
|
415
|
+
void WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<FootstepsPlanner::Support>& supports,
|
|
416
|
+
Eigen::Vector2d initial_pos, Eigen::Vector2d initial_vel,
|
|
417
|
+
Eigen::Vector2d initial_acc)
|
|
416
418
|
{
|
|
417
419
|
// Initialization of the LIPM problem
|
|
418
420
|
problem::Problem problem;
|
|
@@ -420,7 +422,7 @@ void WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<Footstep
|
|
|
420
422
|
|
|
421
423
|
// Building each TrajectoryPart and LIPM
|
|
422
424
|
double t = trajectory.t_start;
|
|
423
|
-
for (auto& support: supports)
|
|
425
|
+
for (auto& support : supports)
|
|
424
426
|
{
|
|
425
427
|
double support_duration = (1 - support.elapsed_ratio) * support_default_duration(support) * support.time_ratio;
|
|
426
428
|
int lipm_timesteps = std::max(1, int((1 - support.elapsed_ratio) * support_default_timesteps(support)));
|
|
@@ -451,7 +453,7 @@ void WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<Footstep
|
|
|
451
453
|
|
|
452
454
|
// Solving the problem
|
|
453
455
|
problem.solve();
|
|
454
|
-
|
|
456
|
+
|
|
455
457
|
for (int i = 0; i < trajectory.parts.size(); i++)
|
|
456
458
|
{
|
|
457
459
|
auto& part = trajectory.parts[i];
|
|
@@ -507,8 +509,15 @@ WalkPatternGenerator::Trajectory WalkPatternGenerator::replan(std::vector<Footst
|
|
|
507
509
|
bool WalkPatternGenerator::can_replan_supports(Trajectory& trajectory, double t_replan)
|
|
508
510
|
{
|
|
509
511
|
// We can't replan from an "end", a "start" or if the next support is an "end"
|
|
510
|
-
if (trajectory.get_support(t_replan).end || trajectory.get_support(t_replan).start ||
|
|
512
|
+
if (trajectory.get_support(t_replan).end || trajectory.get_support(t_replan).start ||
|
|
513
|
+
trajectory.get_next_support(t_replan).end)
|
|
514
|
+
{
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
if (trajectory.get_support(t_replan).is_both())
|
|
511
519
|
{
|
|
520
|
+
// We can't replan if the current support is a double support
|
|
512
521
|
return false;
|
|
513
522
|
}
|
|
514
523
|
|
|
@@ -526,7 +535,9 @@ bool WalkPatternGenerator::can_replan_supports(Trajectory& trajectory, double t_
|
|
|
526
535
|
return true;
|
|
527
536
|
}
|
|
528
537
|
|
|
529
|
-
std::vector<FootstepsPlanner::Support> WalkPatternGenerator::replan_supports(FootstepsPlanner& planner,
|
|
538
|
+
std::vector<FootstepsPlanner::Support> WalkPatternGenerator::replan_supports(FootstepsPlanner& planner,
|
|
539
|
+
Trajectory& trajectory, double t_replan,
|
|
540
|
+
double t_last_replan)
|
|
530
541
|
{
|
|
531
542
|
if (!can_replan_supports(trajectory, t_replan))
|
|
532
543
|
{
|
|
@@ -563,16 +574,20 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::replan_supports(Foo
|
|
|
563
574
|
std::vector<FootstepsPlanner::Support> supports;
|
|
564
575
|
if (current_support.is_both())
|
|
565
576
|
{
|
|
566
|
-
supports = FootstepsPlanner::make_supports(footsteps, current_support.t_start, false,
|
|
577
|
+
supports = FootstepsPlanner::make_supports(footsteps, current_support.t_start, false,
|
|
578
|
+
parameters.has_double_support(), true);
|
|
567
579
|
supports.erase(supports.begin());
|
|
568
580
|
}
|
|
569
581
|
else
|
|
570
582
|
{
|
|
571
|
-
supports = FootstepsPlanner::make_supports(footsteps, current_support.t_start, false,
|
|
583
|
+
supports = FootstepsPlanner::make_supports(footsteps, current_support.t_start, false,
|
|
584
|
+
parameters.has_double_support(), true);
|
|
572
585
|
}
|
|
573
586
|
|
|
574
587
|
double elapsed_duration = t_replan - std::max(t_last_replan, current_support.t_start);
|
|
575
|
-
supports[0].elapsed_ratio =
|
|
588
|
+
supports[0].elapsed_ratio =
|
|
589
|
+
current_support.elapsed_ratio +
|
|
590
|
+
elapsed_duration / (support_default_duration(current_support) * current_support.time_ratio);
|
|
576
591
|
supports[0].time_ratio = current_support.time_ratio;
|
|
577
592
|
supports[0].target_world_dcm = current_support.target_world_dcm;
|
|
578
593
|
return supports;
|
|
@@ -606,14 +621,15 @@ double WalkPatternGenerator::support_default_duration(FootstepsPlanner::Support&
|
|
|
606
621
|
|
|
607
622
|
void WalkPatternGenerator::Trajectory::print_parts_timings()
|
|
608
623
|
{
|
|
609
|
-
for (int i=0; i<parts.size(); i++)
|
|
624
|
+
for (int i = 0; i < parts.size(); i++)
|
|
610
625
|
{
|
|
611
626
|
std::cout << "Part " << i << " : start at " << parts[i].t_start << ", end at " << parts[i].t_end << std::endl;
|
|
612
627
|
}
|
|
613
628
|
}
|
|
614
629
|
|
|
615
|
-
std::vector<FootstepsPlanner::Support>
|
|
616
|
-
|
|
630
|
+
std::vector<FootstepsPlanner::Support>
|
|
631
|
+
WalkPatternGenerator::update_supports(double t, std::vector<FootstepsPlanner::Support> supports,
|
|
632
|
+
Eigen::Vector2d world_target_zmp, Eigen::Vector2d world_measured_dcm)
|
|
617
633
|
{
|
|
618
634
|
FootstepsPlanner::Support current_support = supports[0];
|
|
619
635
|
if (current_support.is_both())
|
|
@@ -632,9 +648,11 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
632
648
|
Eigen::Vector2d p_world_support = current_support.frame().translation().head(2);
|
|
633
649
|
|
|
634
650
|
// Decision variables
|
|
635
|
-
placo::problem::Variable* support_next_zmp =
|
|
636
|
-
|
|
637
|
-
placo::problem::Variable*
|
|
651
|
+
placo::problem::Variable* support_next_zmp =
|
|
652
|
+
&problem.add_variable(2); // ZMP of the next support expressed in the current support frame
|
|
653
|
+
placo::problem::Variable* tau = &problem.add_variable(1); // exp(omega * T) where T is the end of the current support
|
|
654
|
+
placo::problem::Variable* support_dcm_offset =
|
|
655
|
+
&problem.add_variable(2); // Offset of the DCM from the ZMP in the current support frame
|
|
638
656
|
|
|
639
657
|
// ----------------- Objective functions: -----------------
|
|
640
658
|
// Time reference
|
|
@@ -656,15 +674,16 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
656
674
|
|
|
657
675
|
// --------------------- Constraints: ---------------------
|
|
658
676
|
// Time constraints
|
|
659
|
-
double T_min = std::max(0.15, elapsed_time);
|
|
660
|
-
double T_max = std::max(3., elapsed_time);
|
|
677
|
+
double T_min = std::max(0.15, elapsed_time); // Should probably add an offset to elapsed_time
|
|
678
|
+
double T_max = std::max(3., elapsed_time); // Arbitrary value of 3s
|
|
661
679
|
problem.add_constraint(tau->expr() >= exp(omega * (T_min))).configure(ProblemConstraint::Hard);
|
|
662
680
|
problem.add_constraint(tau->expr() <= exp(omega * (T_max))).configure(ProblemConstraint::Hard);
|
|
663
681
|
|
|
664
682
|
// ZMP and DCM offset constraints (expressed in the current support frame)
|
|
665
683
|
if (current_support.side() == HumanoidRobot::Side::Right)
|
|
666
684
|
{
|
|
667
|
-
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_next_zmp->expr(), parameters.op_space_polygon))
|
|
685
|
+
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_next_zmp->expr(), parameters.op_space_polygon))
|
|
686
|
+
.configure(ProblemConstraint::Hard);
|
|
668
687
|
|
|
669
688
|
std::vector<Eigen::Vector2d> dcm_offset_polygon = parameters.dcm_offset_polygon;
|
|
670
689
|
for (auto& point : dcm_offset_polygon)
|
|
@@ -672,7 +691,8 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
672
691
|
point(0) = -point(0);
|
|
673
692
|
point(1) = -point(1);
|
|
674
693
|
}
|
|
675
|
-
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_dcm_offset->expr(), parameters.dcm_offset_polygon))
|
|
694
|
+
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_dcm_offset->expr(), parameters.dcm_offset_polygon))
|
|
695
|
+
.configure(ProblemConstraint::Soft, w_viability);
|
|
676
696
|
}
|
|
677
697
|
else
|
|
678
698
|
{
|
|
@@ -682,16 +702,23 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
682
702
|
point(0) = -point(0);
|
|
683
703
|
point(1) = -point(1);
|
|
684
704
|
}
|
|
685
|
-
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_next_zmp->expr(), op_space_polygon))
|
|
705
|
+
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_next_zmp->expr(), op_space_polygon))
|
|
706
|
+
.configure(ProblemConstraint::Hard);
|
|
686
707
|
|
|
687
|
-
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_dcm_offset->expr(), parameters.dcm_offset_polygon))
|
|
708
|
+
problem.add_constraint(PolygonConstraint::in_polygon_xy(support_dcm_offset->expr(), parameters.dcm_offset_polygon))
|
|
709
|
+
.configure(ProblemConstraint::Soft, w_viability);
|
|
688
710
|
}
|
|
689
|
-
|
|
711
|
+
|
|
690
712
|
// LIPM Dynamics (expressed in the world frame)
|
|
691
713
|
double duration = std::max(0., T - elapsed_time);
|
|
692
|
-
Eigen::Vector2d world_virtual_zmp =
|
|
714
|
+
Eigen::Vector2d world_virtual_zmp =
|
|
715
|
+
get_optimal_zmp(world_measured_dcm, current_support.target_world_dcm, duration, current_support);
|
|
693
716
|
// Eigen::Vector2d world_virtual_zmp = flatten_on_floor(current_support.frame()).translation().head(2);
|
|
694
|
-
problem
|
|
717
|
+
problem
|
|
718
|
+
.add_constraint(world_next_zmp_expr + world_dcm_offset_expr ==
|
|
719
|
+
(world_measured_dcm - world_virtual_zmp) * exp(-omega * elapsed_time) * tau->expr() +
|
|
720
|
+
world_virtual_zmp)
|
|
721
|
+
.configure(ProblemConstraint::Hard);
|
|
695
722
|
|
|
696
723
|
problem.solve();
|
|
697
724
|
|
|
@@ -702,13 +729,14 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
702
729
|
|
|
703
730
|
// Updating current support remaining duration
|
|
704
731
|
double support_remaining_time = log(tau->value(0)) / omega - elapsed_time;
|
|
705
|
-
supports[0].time_ratio =
|
|
732
|
+
supports[0].time_ratio =
|
|
733
|
+
support_remaining_time / (support_default_duration(current_support) * (1 - current_support.elapsed_ratio));
|
|
706
734
|
|
|
707
735
|
return supports;
|
|
708
736
|
}
|
|
709
737
|
|
|
710
|
-
Eigen::Vector2d WalkPatternGenerator::get_optimal_zmp(Eigen::Vector2d world_dcm_start,
|
|
711
|
-
|
|
738
|
+
Eigen::Vector2d WalkPatternGenerator::get_optimal_zmp(Eigen::Vector2d world_dcm_start, Eigen::Vector2d world_dcm_end,
|
|
739
|
+
double duration, FootstepsPlanner::Support& support)
|
|
712
740
|
{
|
|
713
741
|
placo::problem::Problem problem;
|
|
714
742
|
|
|
@@ -716,11 +744,18 @@ Eigen::Vector2d WalkPatternGenerator::get_optimal_zmp(Eigen::Vector2d world_dcm_
|
|
|
716
744
|
placo::problem::Variable* world_zmp = &problem.add_variable(2);
|
|
717
745
|
|
|
718
746
|
// LIPM Dynamics
|
|
719
|
-
// problem.add_constraint(world_dcm_end == (world_dcm_start - world_zmp->expr()) * exp(omega * duration) +
|
|
720
|
-
|
|
747
|
+
// problem.add_constraint(world_dcm_end == (world_dcm_start - world_zmp->expr()) * exp(omega * duration) +
|
|
748
|
+
// world_zmp->expr()).configure(ProblemConstraint::Soft, 1);
|
|
749
|
+
problem
|
|
750
|
+
.add_constraint(world_zmp->expr() ==
|
|
751
|
+
(world_dcm_end - world_dcm_start * exp(omega * duration)) / (1 - exp(omega * duration)))
|
|
752
|
+
.configure(ProblemConstraint::Soft, 1);
|
|
721
753
|
|
|
722
754
|
// ZMP constrained to stay in the support polygon
|
|
723
|
-
problem
|
|
755
|
+
problem
|
|
756
|
+
.add_constraint(
|
|
757
|
+
PolygonConstraint::in_polygon_xy(world_zmp->expr(), support.support_polygon(), parameters.zmp_margin))
|
|
758
|
+
.configure(ProblemConstraint::Hard);
|
|
724
759
|
|
|
725
760
|
problem.solve();
|
|
726
761
|
return world_zmp->value;
|
placo-0.8.7/Makefile
DELETED
placo-0.8.7/build_wheel.sh
DELETED
placo-0.8.7/tweak_sdist.sh
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Moving to dist/
|
|
4
|
-
cd dist/
|
|
5
|
-
|
|
6
|
-
# Retrieving package name (e.g: placo-X.Y.Z)
|
|
7
|
-
package=`basename *.tar.gz .tar.gz`
|
|
8
|
-
echo ${package}
|
|
9
|
-
|
|
10
|
-
# Unpacking the wheel
|
|
11
|
-
wheel unpack *.whl
|
|
12
|
-
|
|
13
|
-
# Retrieving the placo.pyi produced in the wheel and copying it to the root
|
|
14
|
-
placo_pyi=`find ${package}/ -name "placo.pyi"`
|
|
15
|
-
cp ${placo_pyi} ${package}/
|
|
16
|
-
|
|
17
|
-
# Adding it to the tar.gz
|
|
18
|
-
gunzip ${package}.tar.gz
|
|
19
|
-
tar -rf ${package}.tar ${package}/placo.pyi
|
|
20
|
-
gzip ${package}.tar
|
|
21
|
-
|
|
22
|
-
rm -rf ${package}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|