placo 0.7.6__tar.gz → 0.7.10__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.7.10/.github/workflows/wheels.yml +71 -0
- {placo-0.7.6 → placo-0.7.10}/CMakeLists.txt +1 -0
- {placo-0.7.6 → placo-0.7.10}/Doxyfile +3 -4
- {placo-0.7.6 → placo-0.7.10}/PKG-INFO +3 -4
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-footsteps.cpp +2 -1
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-parameters.cpp +0 -1
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-robot-wrapper.cpp +6 -1
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-walk-pattern-generator.cpp +4 -2
- {placo-0.7.6 → placo-0.7.10}/pyproject.toml +15 -4
- placo-0.7.10/scripts/requirements.sh +13 -0
- placo-0.7.10/scripts/robotpkg.sh +33 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/footsteps_planner.h +1 -1
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/humanoid_parameters.h +0 -5
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/humanoid_robot.cpp +22 -2
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/humanoid_robot.h +18 -4
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/walk_pattern_generator.cpp +48 -21
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/walk_pattern_generator.h +12 -10
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/walk_tasks.cpp +7 -6
- {placo-0.7.6 → placo-0.7.10}/src/placo/model/robot_wrapper.cpp +5 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/model/robot_wrapper.h +5 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/qp_error.h +1 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/cubic_spline.cpp +0 -5
- placo-0.7.10/wks.yml +5 -0
- placo-0.7.6/placo.pyi +0 -9620
- placo-0.7.6/wks.yml +0 -2
- {placo-0.7.6 → placo-0.7.10}/.clang-format +0 -0
- {placo-0.7.6 → placo-0.7.10}/.gitattributes +0 -0
- {placo-0.7.6 → placo-0.7.10}/.gitignore +0 -0
- {placo-0.7.6 → placo-0.7.10}/.readthedocs.yaml +0 -0
- {placo-0.7.6 → placo-0.7.10}/LICENSE +0 -0
- {placo-0.7.6 → placo-0.7.10}/Makefile +0 -0
- {placo-0.7.6 → placo-0.7.10}/README.md +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/doxystub.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-eigen.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-kinematics.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-problem.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-tools.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/expose-utils.hpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/module.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/bindings/module.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/build_wheel.sh +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/.vscode/settings.json +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/Makefile +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/placo_utils/__init__.py +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/placo_utils/tf.py +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/placo_utils/view.py +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/placo_utils/visualization.py +0 -0
- {placo-0.7.6 → placo-0.7.10}/python/run_tests.sh +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/kick.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/lipm.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/humanoid/walk_tasks.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/joint_space_half_spaces_constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/kinematics_solver.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/expression.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/expression.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/integrator.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/problem.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/problem.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/problem_polynom.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/problem_polynom.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/sparsity.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/variable.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/problem/variable.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/directions.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/directions.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/polynom.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/polynom.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/prioritized.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/segment.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/segment.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/utils.cpp +0 -0
- {placo-0.7.6 → placo-0.7.10}/src/placo/tools/utils.h +0 -0
- {placo-0.7.6 → placo-0.7.10}/tweak_sdist.sh +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
CIBW_BUILD: "cp310-*64"
|
|
10
|
+
CIBW_SKIP: "*musl*"
|
|
11
|
+
CIBW_REPAIR_WHEEL_COMMAND: ""
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build_wheels:
|
|
15
|
+
name: Build wheels on ${{ matrix.os }}
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
os: [macos-latest, ubuntu-latest]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
# Used to host cibuildwheel
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
|
|
27
|
+
- name: Install cibuildwheel
|
|
28
|
+
run: python -m pip install cibuildwheel==3.0.0b1
|
|
29
|
+
|
|
30
|
+
- name: Build wheels
|
|
31
|
+
run: python -m cibuildwheel --output-dir wheelhouse
|
|
32
|
+
# to supply options, put them in 'env', like:
|
|
33
|
+
# env:
|
|
34
|
+
# CIBW_SOME_OPTION: value
|
|
35
|
+
# ...
|
|
36
|
+
|
|
37
|
+
- uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
40
|
+
path: ./wheelhouse/*.whl
|
|
41
|
+
|
|
42
|
+
build_sdist:
|
|
43
|
+
name: Build source distribution
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- name: Build sdist
|
|
49
|
+
run: pipx run build --sdist
|
|
50
|
+
|
|
51
|
+
- uses: actions/upload-artifact@v4
|
|
52
|
+
with:
|
|
53
|
+
name: cibw-sdist
|
|
54
|
+
path: dist/*.tar.gz
|
|
55
|
+
|
|
56
|
+
upload_pypi:
|
|
57
|
+
needs: [build_sdist, build_wheels]
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
environment: pypi
|
|
60
|
+
permissions:
|
|
61
|
+
id-token: write
|
|
62
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/download-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
# unpacks all CIBW artifacts into dist/
|
|
67
|
+
pattern: cibw-*
|
|
68
|
+
path: dist
|
|
69
|
+
merge-multiple: true
|
|
70
|
+
|
|
71
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -154,6 +154,7 @@ add_library(placo MODULE
|
|
|
154
154
|
bindings/module.cpp
|
|
155
155
|
)
|
|
156
156
|
set_target_properties(placo PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PYTHON_SITELIB})
|
|
157
|
+
target_compile_definitions(placo PUBLIC -DBOOST_DISABLE_PRAGMA_MESSAGE)
|
|
157
158
|
|
|
158
159
|
target_link_libraries(placo ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} libplaco)
|
|
159
160
|
target_include_directories(placo PRIVATE ${PYTHON_INCLUDE_DIRS})
|
|
@@ -803,7 +803,7 @@ QUIET = NO
|
|
|
803
803
|
# Tip: Turn warnings on while writing the documentation.
|
|
804
804
|
# The default value is: YES.
|
|
805
805
|
|
|
806
|
-
WARNINGS =
|
|
806
|
+
WARNINGS = NO
|
|
807
807
|
|
|
808
808
|
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
|
|
809
809
|
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
|
|
@@ -818,7 +818,7 @@ WARN_IF_UNDOCUMENTED = NO
|
|
|
818
818
|
# markup commands wrongly.
|
|
819
819
|
# The default value is: YES.
|
|
820
820
|
|
|
821
|
-
WARN_IF_DOC_ERROR =
|
|
821
|
+
WARN_IF_DOC_ERROR = NO
|
|
822
822
|
|
|
823
823
|
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
|
824
824
|
# are documented, but have no documentation for their parameters or return
|
|
@@ -869,7 +869,6 @@ INPUT = src/placo/dynamics \
|
|
|
869
869
|
src/placo/tools \
|
|
870
870
|
src/placo/model \
|
|
871
871
|
src/placo/kinematics \
|
|
872
|
-
src/placo/planning \
|
|
873
872
|
src/placo/problem \
|
|
874
873
|
src/placo
|
|
875
874
|
|
|
@@ -2361,7 +2360,7 @@ HIDE_UNDOC_RELATIONS = YES
|
|
|
2361
2360
|
# set to NO
|
|
2362
2361
|
# The default value is: YES.
|
|
2363
2362
|
|
|
2364
|
-
HAVE_DOT =
|
|
2363
|
+
HAVE_DOT = NO
|
|
2365
2364
|
|
|
2366
2365
|
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
|
2367
2366
|
# to run in parallel. When set to 0 doxygen will base this on the number of
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: placo
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.10
|
|
4
4
|
Summary: PlaCo: Rhoban Planning and Control
|
|
5
5
|
Requires-Python: >= 3.9
|
|
6
6
|
License-Expression: MIT
|
|
@@ -16,9 +16,8 @@ Requires-Dist: meshcat
|
|
|
16
16
|
Requires-Dist: ischedule
|
|
17
17
|
Provides-Extra: build
|
|
18
18
|
Requires-Dist: pin[build] >= 3 ; extra == "build"
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist: doxystub ; extra == "build"
|
|
19
|
+
Requires-Dist: doxystub >= 0.0.13 ; extra == "build"
|
|
20
|
+
Requires-Dist: cmake<4 ; extra == "build"
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
|
|
24
23
|
<img width="400" src="https://placo.readthedocs.io/en/latest/_static/placo.png" />
|
|
@@ -48,7 +48,8 @@ void exposeFootsteps()
|
|
|
48
48
|
.add_property("time_ratio", &FootstepsPlanner::Support::time_ratio, &FootstepsPlanner::Support::time_ratio)
|
|
49
49
|
.add_property("start", &FootstepsPlanner::Support::start, &FootstepsPlanner::Support::start)
|
|
50
50
|
.add_property("end", &FootstepsPlanner::Support::end, &FootstepsPlanner::Support::end)
|
|
51
|
-
.add_property("
|
|
51
|
+
.add_property("target_world_dcm", &FootstepsPlanner::Support::target_world_dcm,
|
|
52
|
+
&FootstepsPlanner::Support::target_world_dcm);
|
|
52
53
|
|
|
53
54
|
class__<FootstepsPlanner, boost::noncopyable>("FootstepsPlanner", no_init)
|
|
54
55
|
.def("make_supports", &FootstepsPlanner::make_supports)
|
|
@@ -27,7 +27,6 @@ void exposeParameters()
|
|
|
27
27
|
.add_property("startend_double_support_ratio", &HumanoidParameters::startend_double_support_ratio,
|
|
28
28
|
&HumanoidParameters::startend_double_support_ratio)
|
|
29
29
|
.add_property("planned_timesteps", &HumanoidParameters::planned_timesteps, &HumanoidParameters::planned_timesteps)
|
|
30
|
-
.add_property("replan_timesteps", &HumanoidParameters::replan_timesteps, &HumanoidParameters::replan_timesteps)
|
|
31
30
|
.add_property("zmp_margin", &HumanoidParameters::zmp_margin, &HumanoidParameters::zmp_margin)
|
|
32
31
|
.add_property("walk_foot_height", &HumanoidParameters::walk_foot_height, &HumanoidParameters::walk_foot_height)
|
|
33
32
|
.add_property("walk_foot_rise_ratio", &HumanoidParameters::walk_foot_rise_ratio,
|
|
@@ -57,6 +57,7 @@ void exposeRobotType(class_<RobotType, W1>& type)
|
|
|
57
57
|
.def("get_T_world_fbase", &RobotType::get_T_world_fbase)
|
|
58
58
|
.def("set_T_world_fbase", &RobotType::set_T_world_fbase)
|
|
59
59
|
.def("com_world", &RobotType::com_world)
|
|
60
|
+
.def("dcom_world", &RobotType::dcom_world)
|
|
60
61
|
.def("centroidal_map", &RobotType::centroidal_map)
|
|
61
62
|
.def("joint_names", &RobotType::joint_names, joint_names_overloads())
|
|
62
63
|
.def("frame_names", &RobotType::frame_names)
|
|
@@ -178,11 +179,15 @@ void exposeRobotWrapper()
|
|
|
178
179
|
humanoidWrapper
|
|
179
180
|
.def<void (HumanoidRobot::*)(const std::string&)>("update_support_side", &HumanoidRobot::update_support_side)
|
|
180
181
|
.def("ensure_on_floor", &HumanoidRobot::ensure_on_floor)
|
|
182
|
+
.def("ensure_on_floor_oriented", &HumanoidRobot::ensure_on_floor_oriented)
|
|
181
183
|
.def("get_T_world_left", &HumanoidRobot::get_T_world_left)
|
|
182
184
|
.def("get_T_world_right", &HumanoidRobot::get_T_world_right)
|
|
183
185
|
.def("get_T_world_trunk", &HumanoidRobot::get_T_world_trunk)
|
|
184
186
|
.def("get_com_velocity", &HumanoidRobot::get_com_velocity)
|
|
185
|
-
.def("dcm", &
|
|
187
|
+
.def("dcm", +[](HumanoidRobot& robot, double omega) { return robot.dcm(omega); })
|
|
188
|
+
.def("dcm_from_com_vel", +[](HumanoidRobot& robot, double omega, Eigen::Vector2d com_velocity) {
|
|
189
|
+
return robot.dcm(omega, com_velocity);
|
|
190
|
+
})
|
|
186
191
|
.def("zmp", &HumanoidRobot::zmp)
|
|
187
192
|
.def("other_side", &HumanoidRobot::other_side)
|
|
188
193
|
.def(
|
|
@@ -27,7 +27,7 @@ void exposeWalkPatternGenerator()
|
|
|
27
27
|
.add_property("t_end", &WalkPatternGenerator::TrajectoryPart::t_end, &WalkPatternGenerator::TrajectoryPart::t_end)
|
|
28
28
|
.add_property("support", &WalkPatternGenerator::TrajectoryPart::support);
|
|
29
29
|
|
|
30
|
-
class__<WalkPatternGenerator::Trajectory>("WPGTrajectory", init<double, double, double>())
|
|
30
|
+
class__<WalkPatternGenerator::Trajectory>("WPGTrajectory", init<double, double, double, double>())
|
|
31
31
|
.add_property("t_start", &WalkPatternGenerator::Trajectory::t_start)
|
|
32
32
|
.add_property("t_end", &WalkPatternGenerator::Trajectory::t_end)
|
|
33
33
|
.add_property("com_target_z", &WalkPatternGenerator::Trajectory::com_target_z)
|
|
@@ -63,7 +63,9 @@ void exposeWalkPatternGenerator()
|
|
|
63
63
|
.def("can_replan_supports", &WalkPatternGenerator::can_replan_supports)
|
|
64
64
|
.def("replan_supports", &WalkPatternGenerator::replan_supports)
|
|
65
65
|
.def("update_supports", &WalkPatternGenerator::update_supports)
|
|
66
|
-
.def("get_optimal_zmp", &WalkPatternGenerator::get_optimal_zmp)
|
|
66
|
+
.def("get_optimal_zmp", &WalkPatternGenerator::get_optimal_zmp)
|
|
67
|
+
.def("support_default_timesteps", &WalkPatternGenerator::support_default_timesteps)
|
|
68
|
+
.def("support_default_duration", &WalkPatternGenerator::support_default_duration);
|
|
67
69
|
|
|
68
70
|
class__<SwingFoot>("SwingFoot", init<>())
|
|
69
71
|
.def("make_trajectory", &SwingFoot::make_trajectory)
|
|
@@ -5,9 +5,8 @@ requires = [
|
|
|
5
5
|
"eiquadprog >= 1.2.6, < 2",
|
|
6
6
|
"pin[build] >= 3",
|
|
7
7
|
"rhoban-cmeel-jsoncpp",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"doxystub"
|
|
8
|
+
"doxystub >= 0.0.13",
|
|
9
|
+
"cmake<4"
|
|
11
10
|
]
|
|
12
11
|
|
|
13
12
|
[project]
|
|
@@ -24,7 +23,7 @@ description = "PlaCo: Rhoban Planning and Control"
|
|
|
24
23
|
license = "MIT"
|
|
25
24
|
name = "placo"
|
|
26
25
|
requires-python = ">= 3.9"
|
|
27
|
-
version = "0.7.
|
|
26
|
+
version = "0.7.10"
|
|
28
27
|
|
|
29
28
|
[project.urls]
|
|
30
29
|
changelog = "https://github.com/rhoban/placo/blob/main/CHANGELOG.md"
|
|
@@ -42,3 +41,15 @@ all = true
|
|
|
42
41
|
|
|
43
42
|
[tool.cmeel]
|
|
44
43
|
run-tests = false
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
[tool.cibuildwheel.macos]
|
|
47
|
+
before-all = "brew install doxygen"
|
|
48
|
+
|
|
49
|
+
[tool.cibuildwheel.linux]
|
|
50
|
+
before-all = "yum install -y doxygen"
|
|
51
|
+
|
|
52
|
+
[[tool.cibuildwheel.overrides]]
|
|
53
|
+
select = "*-musllinux*"
|
|
54
|
+
before-all = "apk add doxygen"
|
|
55
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Installing doxystub
|
|
4
|
+
pip install doxystub
|
|
5
|
+
|
|
6
|
+
# APT dependencies
|
|
7
|
+
sudo apt install -qqy lsb-release curl libboost-python-dev libjsoncpp-dev doxygen
|
|
8
|
+
|
|
9
|
+
# Installing robotpkg
|
|
10
|
+
bash scripts/robotpkg.sh
|
|
11
|
+
|
|
12
|
+
# Installing robotpkg dependencies
|
|
13
|
+
sudo apt install -qqy robotpkg-py3*-pinocchio robotpkg-coal robotpkg-eiquadprog robotpkg-*-eigenpy
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Installing robotpkg
|
|
4
|
+
# see https://stack-of-tasks.github.io/pinocchio/download.html
|
|
5
|
+
if [ ! -f /etc/apt/sources.list.d/robotpkg.list ]
|
|
6
|
+
then
|
|
7
|
+
echo "* Setting up robotpkg apt..."
|
|
8
|
+
sudo mkdir -p /etc/apt/keyrings
|
|
9
|
+
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.asc \
|
|
10
|
+
| sudo tee /etc/apt/keyrings/robotpkg.asc
|
|
11
|
+
|
|
12
|
+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/robotpkg.asc] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" \
|
|
13
|
+
| sudo tee /etc/apt/sources.list.d/robotpkg.list
|
|
14
|
+
|
|
15
|
+
sudo apt update
|
|
16
|
+
else
|
|
17
|
+
echo "* robotpkg is already present"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
PATH_TEST=`echo $PATH|grep openrob|wc -l`
|
|
21
|
+
if [ $PATH_TEST -eq 0 ]
|
|
22
|
+
then
|
|
23
|
+
echo "Adding environment variables to .bashrc: you might have to reload your shell"
|
|
24
|
+
|
|
25
|
+
PYTHON_VERSION=`python --version|cut -d" " -f2|cut -d"." -f-2`
|
|
26
|
+
|
|
27
|
+
echo "# Openrobot packages" >> ~/.bashrc
|
|
28
|
+
echo "export PATH=/opt/openrobots/bin:\$PATH" >> ~/.bashrc
|
|
29
|
+
echo "export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:\$PKG_CONFIG_PATH" >> ~/.bashrc
|
|
30
|
+
echo "export LD_LIBRARY_PATH=/opt/openrobots/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc
|
|
31
|
+
echo "export PYTHONPATH=/opt/openrobots/lib/python$PYTHON_VERSION/site-packages:\$PYTHONPATH" >> ~/.bashrc
|
|
32
|
+
echo "export CMAKE_PREFIX_PATH=/opt/openrobots:\$CMAKE_PREFIX_PATH" >> ~/.bashrc
|
|
33
|
+
fi
|
|
@@ -52,10 +52,10 @@ public:
|
|
|
52
52
|
double elapsed_ratio = 0.; // Elapsed ratio of the support phase, ranging from 0 to 1
|
|
53
53
|
|
|
54
54
|
double time_ratio = 1.; // Time ratio for the remaining part of the support phase
|
|
55
|
+
Eigen::Vector2d target_world_dcm = Eigen::Vector2d::Zero(); // Target DCM in the world frame at the end of the support phase
|
|
55
56
|
|
|
56
57
|
bool start = false;
|
|
57
58
|
bool end = false;
|
|
58
|
-
bool replanned = false;
|
|
59
59
|
|
|
60
60
|
std::vector<Eigen::Vector2d> polygon;
|
|
61
61
|
bool computed_polygon = false;
|
|
@@ -39,6 +39,7 @@ void HumanoidRobot::initialize()
|
|
|
39
39
|
void HumanoidRobot::init_config()
|
|
40
40
|
{
|
|
41
41
|
support_side = Left;
|
|
42
|
+
support_is_both = false;
|
|
42
43
|
|
|
43
44
|
T_world_support.setIdentity();
|
|
44
45
|
|
|
@@ -94,6 +95,19 @@ void HumanoidRobot::ensure_on_floor()
|
|
|
94
95
|
update_kinematics();
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
void HumanoidRobot::ensure_on_floor_oriented(Eigen::Matrix3d R_world_trunk)
|
|
99
|
+
{
|
|
100
|
+
update_kinematics();
|
|
101
|
+
|
|
102
|
+
// Getting the support orientation
|
|
103
|
+
Eigen::Affine3d T_trunk_support = get_T_a_b(trunk, support_frame());
|
|
104
|
+
Eigen::Matrix3d R_world_support = R_world_trunk * T_trunk_support.linear();
|
|
105
|
+
T_world_support.linear() = R_world_support;
|
|
106
|
+
|
|
107
|
+
set_T_world_frame(support_frame(), T_world_support);
|
|
108
|
+
update_kinematics();
|
|
109
|
+
}
|
|
110
|
+
|
|
97
111
|
void HumanoidRobot::update_from_imu(Eigen::Matrix3d R_world_trunk)
|
|
98
112
|
{
|
|
99
113
|
update_kinematics();
|
|
@@ -180,13 +194,19 @@ Eigen::VectorXd HumanoidRobot::get_torques(Eigen::VectorXd acc_a, Eigen::VectorX
|
|
|
180
194
|
return M * acc + h - J_c * contact_forces;
|
|
181
195
|
}
|
|
182
196
|
|
|
183
|
-
Eigen::Vector2d HumanoidRobot::dcm(
|
|
197
|
+
Eigen::Vector2d HumanoidRobot::dcm(double omega)
|
|
198
|
+
{
|
|
199
|
+
// DCM = c + (1/omega) c_dot
|
|
200
|
+
return com_world().head(2) + (1 / omega) * dcom_world().head(2);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
Eigen::Vector2d HumanoidRobot::dcm(double omega, Eigen::Vector2d com_velocity)
|
|
184
204
|
{
|
|
185
205
|
// DCM = c + (1/omega) c_dot
|
|
186
206
|
return com_world().head(2) + (1 / omega) * com_velocity;
|
|
187
207
|
}
|
|
188
208
|
|
|
189
|
-
Eigen::Vector2d HumanoidRobot::zmp(Eigen::Vector2d com_acceleration
|
|
209
|
+
Eigen::Vector2d HumanoidRobot::zmp(double omega, Eigen::Vector2d com_acceleration)
|
|
190
210
|
{
|
|
191
211
|
// ZMP = c - (1/omega^2) c_ddot
|
|
192
212
|
return com_world().head(2) - (1 / pow(omega, 2)) * com_acceleration;
|
|
@@ -38,6 +38,13 @@ public:
|
|
|
38
38
|
*/
|
|
39
39
|
void ensure_on_floor();
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @brief Place the robot on its support on the floor according
|
|
43
|
+
* to the trunk orientation and the kinematic configuration
|
|
44
|
+
* @param R_world_trunk Orientation of the trunk
|
|
45
|
+
*/
|
|
46
|
+
void ensure_on_floor_oriented(Eigen::Matrix3d R_world_trunk);
|
|
47
|
+
|
|
41
48
|
/**
|
|
42
49
|
* @brief Rotate the robot around its support
|
|
43
50
|
* @param R_world_trunk Orientation of the trunk from the IMU
|
|
@@ -67,19 +74,26 @@ public:
|
|
|
67
74
|
|
|
68
75
|
/**
|
|
69
76
|
* @brief Compute the Divergent Component of Motion (DCM)
|
|
70
|
-
* @param com_velocity CoM velocity
|
|
71
77
|
* @param omega Natural frequency of the LIP (= sqrt(g/h))
|
|
72
78
|
* @return DCM
|
|
73
79
|
*/
|
|
74
|
-
Eigen::Vector2d dcm(
|
|
80
|
+
Eigen::Vector2d dcm(double omega);
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @brief Compute the Divergent Component of Motion (DCM)
|
|
84
|
+
* @param omega Natural frequency of the LIP (= sqrt(g/h))
|
|
85
|
+
* @param com_velocity CoM velocity
|
|
86
|
+
* @return DCM
|
|
87
|
+
*/
|
|
88
|
+
Eigen::Vector2d dcm(double omega, Eigen::Vector2d com_velocity);
|
|
75
89
|
|
|
76
90
|
/**
|
|
77
91
|
* @brief Compute the Zero-tilting Moment Point (ZMP)
|
|
78
|
-
* @param com_acceleration CoM acceleration
|
|
79
92
|
* @param omega Natural frequency of the LIP (= sqrt(g/h))
|
|
93
|
+
* @param com_acceleration CoM acceleration
|
|
80
94
|
* @return ZMP
|
|
81
95
|
*/
|
|
82
|
-
Eigen::Vector2d zmp(Eigen::Vector2d com_acceleration
|
|
96
|
+
Eigen::Vector2d zmp(double omega, Eigen::Vector2d com_acceleration);
|
|
83
97
|
|
|
84
98
|
// We suppose we have one support frame and associated transformation
|
|
85
99
|
RobotWrapper::FrameIndex support_frame();
|
|
@@ -24,13 +24,14 @@ WalkPatternGenerator::Trajectory::Trajectory()
|
|
|
24
24
|
T.setIdentity();
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
WalkPatternGenerator::Trajectory::Trajectory(double com_target_z, double t_start, double trunk_pitch)
|
|
27
|
+
WalkPatternGenerator::Trajectory::Trajectory(double com_target_z, double t_start, double trunk_pitch, double trunk_roll)
|
|
28
28
|
: left_foot_yaw(true)
|
|
29
29
|
, right_foot_yaw(true)
|
|
30
30
|
, trunk_yaw(true)
|
|
31
31
|
, com_target_z(com_target_z)
|
|
32
32
|
, t_start(t_start)
|
|
33
33
|
, trunk_pitch(trunk_pitch)
|
|
34
|
+
, trunk_roll(trunk_roll)
|
|
34
35
|
{
|
|
35
36
|
T.setIdentity();
|
|
36
37
|
}
|
|
@@ -190,9 +191,10 @@ Eigen::Vector2d WalkPatternGenerator::Trajectory::get_p_world_ZMP(double t, doub
|
|
|
190
191
|
|
|
191
192
|
Eigen::Matrix3d WalkPatternGenerator::Trajectory::get_R_world_trunk(double t)
|
|
192
193
|
{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
Eigen::Matrix3d R_world_trunk = Eigen::AngleAxisd(trunk_yaw.pos(t), Eigen::Vector3d::UnitZ()).matrix() *
|
|
195
|
+
Eigen::AngleAxisd(trunk_pitch, Eigen::Vector3d::UnitY()).matrix() *
|
|
196
|
+
Eigen::AngleAxisd(trunk_roll, Eigen::Vector3d::UnitX()).matrix();
|
|
197
|
+
return T.linear() * R_world_trunk;
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
HumanoidRobot::Side WalkPatternGenerator::Trajectory::support_side(double t)
|
|
@@ -237,7 +239,7 @@ FootstepsPlanner::Support WalkPatternGenerator::Trajectory::get_next_support(dou
|
|
|
237
239
|
_findPart(parts, t, &index);
|
|
238
240
|
if (index + n >= parts.size())
|
|
239
241
|
{
|
|
240
|
-
|
|
242
|
+
return T * parts.back().support;
|
|
241
243
|
}
|
|
242
244
|
return T * parts[index + n].support;
|
|
243
245
|
}
|
|
@@ -301,7 +303,7 @@ void WalkPatternGenerator::plan_dbl_support(Trajectory& trajectory, int part_ind
|
|
|
301
303
|
trajectory.trunk_yaw.add_point(part.t_end, frame_yaw(part.support.frame().rotation()), 0);
|
|
302
304
|
}
|
|
303
305
|
|
|
304
|
-
void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_index, Trajectory* old_trajectory
|
|
306
|
+
void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_index, Trajectory* old_trajectory)
|
|
305
307
|
{
|
|
306
308
|
TrajectoryPart& part = trajectory.parts[part_index];
|
|
307
309
|
|
|
@@ -313,13 +315,13 @@ void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_ind
|
|
|
313
315
|
|
|
314
316
|
if (part_index == 0 && old_trajectory != nullptr)
|
|
315
317
|
{
|
|
316
|
-
Eigen::Vector3d start = old_trajectory->get_T_world_foot(flying_side,
|
|
317
|
-
Eigen::Vector3d start_vel = old_trajectory->get_v_world_foot(flying_side,
|
|
318
|
+
Eigen::Vector3d start = old_trajectory->get_T_world_foot(flying_side, trajectory.t_start).translation();
|
|
319
|
+
Eigen::Vector3d start_vel = old_trajectory->get_v_world_foot(flying_side, trajectory.t_start);
|
|
318
320
|
part.swing_trajectory = SwingFootCubic::make_trajectory(part.t_start, virt_duration, parameters.walk_foot_height,
|
|
319
321
|
parameters.walk_foot_rise_ratio, start, T_world_end.translation(), part.support.elapsed_ratio, start_vel);
|
|
320
322
|
|
|
321
|
-
double replan_yaw = old_trajectory->foot_yaw(flying_side).pos(
|
|
322
|
-
trajectory.foot_yaw(flying_side).add_point(
|
|
323
|
+
double replan_yaw = old_trajectory->foot_yaw(flying_side).pos(trajectory.t_start);
|
|
324
|
+
trajectory.foot_yaw(flying_side).add_point(trajectory.t_start, replan_yaw, 0);
|
|
323
325
|
}
|
|
324
326
|
else
|
|
325
327
|
{
|
|
@@ -340,7 +342,7 @@ void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_ind
|
|
|
340
342
|
trajectory.add_supports(part.t_end, part.support);
|
|
341
343
|
}
|
|
342
344
|
|
|
343
|
-
void WalkPatternGenerator::plan_feet_trajectories(Trajectory& trajectory, Trajectory* old_trajectory
|
|
345
|
+
void WalkPatternGenerator::plan_feet_trajectories(Trajectory& trajectory, Trajectory* old_trajectory)
|
|
344
346
|
{
|
|
345
347
|
// Add the initial position to the trajectory
|
|
346
348
|
trajectory.add_supports(trajectory.t_start, trajectory.parts[0].support);
|
|
@@ -359,7 +361,7 @@ void WalkPatternGenerator::plan_feet_trajectories(Trajectory& trajectory, Trajec
|
|
|
359
361
|
// Single support
|
|
360
362
|
if (trajectory.parts[i].support.footsteps.size() == 1)
|
|
361
363
|
{
|
|
362
|
-
plan_sgl_support(trajectory, i, old_trajectory
|
|
364
|
+
plan_sgl_support(trajectory, i, old_trajectory);
|
|
363
365
|
}
|
|
364
366
|
// Double support
|
|
365
367
|
else
|
|
@@ -438,9 +440,12 @@ void WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<Footstep
|
|
|
438
440
|
|
|
439
441
|
// Solving the problem
|
|
440
442
|
problem.solve();
|
|
443
|
+
|
|
441
444
|
for (int i = 0; i < trajectory.parts.size(); i++)
|
|
442
445
|
{
|
|
443
|
-
trajectory.parts[i]
|
|
446
|
+
auto& part = trajectory.parts[i];
|
|
447
|
+
part.com_trajectory = lipms[i].get_trajectory();
|
|
448
|
+
part.support.target_world_dcm = part.com_trajectory.dcm(part.t_end, omega);
|
|
444
449
|
}
|
|
445
450
|
}
|
|
446
451
|
|
|
@@ -452,7 +457,7 @@ WalkPatternGenerator::Trajectory WalkPatternGenerator::plan(std::vector<Footstep
|
|
|
452
457
|
throw std::runtime_error("Trying to plan() with 0 supports");
|
|
453
458
|
}
|
|
454
459
|
|
|
455
|
-
Trajectory trajectory(parameters.walk_com_height, t_start, parameters.walk_trunk_pitch);
|
|
460
|
+
Trajectory trajectory(parameters.walk_com_height, t_start, parameters.walk_trunk_pitch, 0.);
|
|
456
461
|
|
|
457
462
|
plan_com(trajectory, supports, initial_com_world.head(2));
|
|
458
463
|
plan_feet_trajectories(trajectory);
|
|
@@ -469,14 +474,21 @@ WalkPatternGenerator::Trajectory WalkPatternGenerator::replan(std::vector<Footst
|
|
|
469
474
|
throw std::runtime_error("Trying to replan() with 0 supports");
|
|
470
475
|
}
|
|
471
476
|
|
|
472
|
-
|
|
477
|
+
// std::cout << "------------------ Old Next support: -----------------" << std::endl;
|
|
478
|
+
// std::cout << "x: " << old_trajectory.get_next_support(t_replan).frame().translation().x() << std::endl;
|
|
479
|
+
// std::cout << "y: " << old_trajectory.get_next_support(t_replan).frame().translation().y() << std::endl;
|
|
480
|
+
// std::cout << "------------------ New Next support: -----------------" << std::endl;
|
|
481
|
+
// std::cout << "x: " << supports[1].frame().translation().x() << std::endl;
|
|
482
|
+
// std::cout << "y: " << supports[1].frame().translation().y() << std::endl;
|
|
483
|
+
|
|
484
|
+
Trajectory trajectory(parameters.walk_com_height, t_replan, parameters.walk_trunk_pitch, 0.);
|
|
473
485
|
|
|
474
486
|
Eigen::Vector2d initial_pos = old_trajectory.get_p_world_CoM(t_replan).head(2);
|
|
475
487
|
Eigen::Vector2d initial_vel = old_trajectory.get_v_world_CoM(t_replan).head(2);
|
|
476
488
|
Eigen::Vector2d initial_acc = old_trajectory.get_a_world_CoM(t_replan).head(2);
|
|
477
489
|
plan_com(trajectory, supports, initial_pos, initial_vel, initial_acc);
|
|
478
490
|
|
|
479
|
-
plan_feet_trajectories(trajectory, &old_trajectory
|
|
491
|
+
plan_feet_trajectories(trajectory, &old_trajectory);
|
|
480
492
|
|
|
481
493
|
return trajectory;
|
|
482
494
|
}
|
|
@@ -489,6 +501,17 @@ bool WalkPatternGenerator::can_replan_supports(Trajectory& trajectory, double t_
|
|
|
489
501
|
return false;
|
|
490
502
|
}
|
|
491
503
|
|
|
504
|
+
// XXX: Need to move to a branch
|
|
505
|
+
// We can't replan if more than 1/2 of the support phase has passed
|
|
506
|
+
// if (trajectory.get_support(t_replan).elapsed_ratio > 0.8)
|
|
507
|
+
// {
|
|
508
|
+
// return false;
|
|
509
|
+
// }
|
|
510
|
+
// if (t_replan - trajectory.get_support(t_replan).t_start < 0.005)
|
|
511
|
+
// {
|
|
512
|
+
// return false;
|
|
513
|
+
// }
|
|
514
|
+
|
|
492
515
|
return true;
|
|
493
516
|
}
|
|
494
517
|
|
|
@@ -540,7 +563,7 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::replan_supports(Foo
|
|
|
540
563
|
double elapsed_duration = t_replan - std::max(t_last_replan, current_support.t_start);
|
|
541
564
|
supports[0].elapsed_ratio = current_support.elapsed_ratio + elapsed_duration / (support_default_duration(current_support) * current_support.time_ratio);
|
|
542
565
|
supports[0].time_ratio = current_support.time_ratio;
|
|
543
|
-
supports[0].
|
|
566
|
+
supports[0].target_world_dcm = current_support.target_world_dcm;
|
|
544
567
|
return supports;
|
|
545
568
|
}
|
|
546
569
|
|
|
@@ -578,8 +601,8 @@ void WalkPatternGenerator::Trajectory::print_parts_timings()
|
|
|
578
601
|
}
|
|
579
602
|
}
|
|
580
603
|
|
|
581
|
-
std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(double t,
|
|
582
|
-
|
|
604
|
+
std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(double t,
|
|
605
|
+
std::vector<FootstepsPlanner::Support> supports, Eigen::Vector2d world_measured_dcm)
|
|
583
606
|
{
|
|
584
607
|
FootstepsPlanner::Support current_support = supports[0];
|
|
585
608
|
FootstepsPlanner::Support next_support = supports[1];
|
|
@@ -618,7 +641,10 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
618
641
|
problem.add_constraint(world_next_zmp_expr == next_support.frame().translation().head(2)).configure(ProblemConstraint::Soft, w2);
|
|
619
642
|
|
|
620
643
|
// DCM offset reference (expressed in the world frame)
|
|
621
|
-
Eigen::Vector2d world_target_dcm_offset =
|
|
644
|
+
Eigen::Vector2d world_target_dcm_offset = current_support.target_world_dcm - next_support.frame().translation().head(2);
|
|
645
|
+
// Eigen::Vector2d world_target_dcm_offset = world_end_dcm - next_support.frame().translation().head(2);
|
|
646
|
+
// std::cout << "world_target_dcm_offset: " << world_target_dcm_offset.transpose() << std::endl;
|
|
647
|
+
|
|
622
648
|
Expression world_dcm_offset_expr = R_world_support * support_dcm_offset->expr();
|
|
623
649
|
problem.add_constraint(world_dcm_offset_expr == world_target_dcm_offset).configure(ProblemConstraint::Soft, w3);
|
|
624
650
|
|
|
@@ -657,7 +683,8 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(dou
|
|
|
657
683
|
|
|
658
684
|
// LIPM Dynamics (expressed in the world frame)
|
|
659
685
|
double duration = std::max(0., T - elapsed_time);
|
|
660
|
-
Eigen::Vector2d world_virtual_zmp = get_optimal_zmp(world_measured_dcm,
|
|
686
|
+
Eigen::Vector2d world_virtual_zmp = get_optimal_zmp(world_measured_dcm, current_support.target_world_dcm, duration, current_support);
|
|
687
|
+
// Eigen::Vector2d world_virtual_zmp = flatten_on_floor(current_support.frame()).translation().head(2);
|
|
661
688
|
problem.add_constraint(world_next_zmp_expr + world_dcm_offset_expr == (world_measured_dcm - world_virtual_zmp) * exp(-omega * elapsed_time) * tau->expr() + world_virtual_zmp).configure(ProblemConstraint::Hard);
|
|
662
689
|
|
|
663
690
|
problem.solve();
|
|
@@ -36,7 +36,7 @@ public:
|
|
|
36
36
|
struct Trajectory
|
|
37
37
|
{
|
|
38
38
|
Trajectory();
|
|
39
|
-
Trajectory(double com_target_z, double t_start = 0., double trunk_pitch = 0.);
|
|
39
|
+
Trajectory(double com_target_z, double t_start = 0., double trunk_pitch = 0., double trunk_roll = 0.);
|
|
40
40
|
|
|
41
41
|
// Debug
|
|
42
42
|
void print_parts_timings();
|
|
@@ -83,12 +83,14 @@ public:
|
|
|
83
83
|
FootstepsPlanner::Support get_support(double t);
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* @brief Returns the nth next support corresponding to the given time in the trajectory
|
|
86
|
+
* @brief Returns the nth next support corresponding to the given time in the trajectory.
|
|
87
|
+
* If n is greater than the number of remaining supports, the last support is returned
|
|
87
88
|
*/
|
|
88
89
|
FootstepsPlanner::Support get_next_support(double t, int n = 1);
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
|
-
* @brief Returns the nth previous support corresponding to the given time in the trajectory
|
|
92
|
+
* @brief Returns the nth previous support corresponding to the given time in the trajectory.
|
|
93
|
+
* If n is greater than the number of previous supports, the first support is returned
|
|
92
94
|
*/
|
|
93
95
|
FootstepsPlanner::Support get_prev_support(double t, int n = 1);
|
|
94
96
|
|
|
@@ -183,8 +185,8 @@ public:
|
|
|
183
185
|
* @param world_measured_dcm The measured DCM in world frame
|
|
184
186
|
* @param world_end_dcm The desired DCM at the end of the current support phase
|
|
185
187
|
*/
|
|
186
|
-
std::vector<FootstepsPlanner::Support> update_supports(double t,
|
|
187
|
-
|
|
188
|
+
std::vector<FootstepsPlanner::Support> update_supports(double t,
|
|
189
|
+
std::vector<FootstepsPlanner::Support> supports, Eigen::Vector2d world_measured_dcm);
|
|
188
190
|
|
|
189
191
|
/**
|
|
190
192
|
* @brief Computes the best ZMP in the support polygon to move de DCM from
|
|
@@ -196,6 +198,9 @@ public:
|
|
|
196
198
|
*/
|
|
197
199
|
Eigen::Vector2d get_optimal_zmp(Eigen::Vector2d world_dcm_start, Eigen::Vector2d world_dcm_end,
|
|
198
200
|
double duration, FootstepsPlanner::Support& support);
|
|
201
|
+
|
|
202
|
+
int support_default_timesteps(FootstepsPlanner::Support& support);
|
|
203
|
+
double support_default_duration(FootstepsPlanner::Support& support);
|
|
199
204
|
|
|
200
205
|
protected:
|
|
201
206
|
// Robot associated to the WPG
|
|
@@ -213,10 +218,7 @@ protected:
|
|
|
213
218
|
Eigen::Vector2d initial_vel = Eigen::Vector2d::Zero(), Eigen::Vector2d initial_acc = Eigen::Vector2d::Zero());
|
|
214
219
|
|
|
215
220
|
void plan_dbl_support(Trajectory& trajectory, int part_index);
|
|
216
|
-
void plan_sgl_support(Trajectory& trajectory, int part_index, Trajectory* old_trajectory
|
|
217
|
-
void plan_feet_trajectories(Trajectory& trajectory, Trajectory* old_trajectory = nullptr
|
|
218
|
-
|
|
219
|
-
int support_default_timesteps(FootstepsPlanner::Support& support);
|
|
220
|
-
double support_default_duration(FootstepsPlanner::Support& support);
|
|
221
|
+
void plan_sgl_support(Trajectory& trajectory, int part_index, Trajectory* old_trajectory);
|
|
222
|
+
void plan_feet_trajectories(Trajectory& trajectory, Trajectory* old_trajectory = nullptr);
|
|
221
223
|
};
|
|
222
224
|
} // namespace placo::humanoid
|