placo 0.9.0__tar.gz → 0.9.2__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.9.0 → placo-0.9.2}/PKG-INFO +1 -1
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-robot-wrapper.cpp +14 -13
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-walk-pattern-generator.cpp +19 -12
- {placo-0.9.0 → placo-0.9.2}/pyproject.toml +1 -1
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/footsteps_planner.h +12 -5
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/humanoid_robot.cpp +0 -6
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/humanoid_robot.h +4 -10
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/walk_pattern_generator.cpp +92 -33
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/walk_pattern_generator.h +37 -7
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/kinematics_solver.h +1 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/model/robot_wrapper.cpp +0 -5
- {placo-0.9.0 → placo-0.9.2}/src/placo/model/robot_wrapper.h +1 -6
- {placo-0.9.0 → placo-0.9.2}/.clang-format +0 -0
- {placo-0.9.0 → placo-0.9.2}/.gitattributes +0 -0
- {placo-0.9.0 → placo-0.9.2}/.github/workflows/wheels.yml +0 -0
- {placo-0.9.0 → placo-0.9.2}/.gitignore +0 -0
- {placo-0.9.0 → placo-0.9.2}/.readthedocs.yaml +0 -0
- {placo-0.9.0 → placo-0.9.2}/CMakeLists.txt +0 -0
- {placo-0.9.0 → placo-0.9.2}/Doxyfile +0 -0
- {placo-0.9.0 → placo-0.9.2}/LICENSE +0 -0
- {placo-0.9.0 → placo-0.9.2}/README.md +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/doxystub.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-eigen.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-footsteps.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-kinematics.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-parameters.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-problem.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-tools.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/expose-utils.hpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/module.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/bindings/module.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/.vscode/settings.json +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/Makefile +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/placo_utils/__init__.py +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/placo_utils/tf.py +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/placo_utils/view.py +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/placo_utils/visualization.py +0 -0
- {placo-0.9.0 → placo-0.9.2}/python/run_tests.sh +0 -0
- {placo-0.9.0 → placo-0.9.2}/scripts/requirements.sh +0 -0
- {placo-0.9.0 → placo-0.9.2}/scripts/robotpkg.sh +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/humanoid_parameters.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/kick.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/lipm.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/walk_tasks.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/humanoid/walk_tasks.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/distance_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/distance_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/joint_space_half_spaces_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/yaw_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/kinematics/yaw_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/expression.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/expression.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/integrator.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/problem.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/problem.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/problem_polynom.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/problem_polynom.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/qp_error.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/sparsity.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/variable.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/problem/variable.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/cubic_spline.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/directions.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/directions.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/polynom.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/polynom.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/prioritized.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/segment.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/segment.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/utils.cpp +0 -0
- {placo-0.9.0 → placo-0.9.2}/src/placo/tools/utils.h +0 -0
- {placo-0.9.0 → placo-0.9.2}/wks.yml +0 -0
|
@@ -43,10 +43,12 @@ void exposeRobotType(class_<RobotType, W1>& type)
|
|
|
43
43
|
.def("set_velocity_limits", &RobotType::set_velocity_limits)
|
|
44
44
|
.def("set_torque_limit", &RobotType::set_torque_limit)
|
|
45
45
|
.def("set_joint_limits", &RobotType::set_joint_limits)
|
|
46
|
-
.def(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
.def(
|
|
47
|
+
"get_joint_limits",
|
|
48
|
+
+[](RobotType& robot, const std::string& joint) {
|
|
49
|
+
auto limits = robot.get_joint_limits(joint);
|
|
50
|
+
return Eigen::Vector2d(limits.first, limits.second);
|
|
51
|
+
})
|
|
50
52
|
.def("update_kinematics", &RobotType::update_kinematics)
|
|
51
53
|
.def("compute_hessians", &RobotType::compute_hessians)
|
|
52
54
|
.def(
|
|
@@ -57,7 +59,6 @@ void exposeRobotType(class_<RobotType, W1>& type)
|
|
|
57
59
|
.def("get_T_world_fbase", &RobotType::get_T_world_fbase)
|
|
58
60
|
.def("set_T_world_fbase", &RobotType::set_T_world_fbase)
|
|
59
61
|
.def("com_world", &RobotType::com_world)
|
|
60
|
-
.def("dcom_world", &RobotType::dcom_world)
|
|
61
62
|
.def("centroidal_map", &RobotType::centroidal_map)
|
|
62
63
|
.def("joint_names", &RobotType::joint_names, joint_names_overloads())
|
|
63
64
|
.def("frame_names", &RobotType::frame_names)
|
|
@@ -180,14 +181,12 @@ void exposeRobotWrapper()
|
|
|
180
181
|
.def<void (HumanoidRobot::*)(const std::string&)>("update_support_side", &HumanoidRobot::update_support_side)
|
|
181
182
|
.def("ensure_on_floor", &HumanoidRobot::ensure_on_floor)
|
|
182
183
|
.def("ensure_on_floor_oriented", &HumanoidRobot::ensure_on_floor_oriented)
|
|
184
|
+
.def("update_from_imu", &HumanoidRobot::update_from_imu)
|
|
183
185
|
.def("get_T_world_left", &HumanoidRobot::get_T_world_left)
|
|
184
186
|
.def("get_T_world_right", &HumanoidRobot::get_T_world_right)
|
|
185
187
|
.def("get_T_world_trunk", &HumanoidRobot::get_T_world_trunk)
|
|
186
188
|
.def("get_com_velocity", &HumanoidRobot::get_com_velocity)
|
|
187
|
-
.def("dcm",
|
|
188
|
-
.def("dcm_from_com_vel", +[](HumanoidRobot& robot, double omega, Eigen::Vector2d com_velocity) {
|
|
189
|
-
return robot.dcm(omega, com_velocity);
|
|
190
|
-
})
|
|
189
|
+
.def("dcm", &HumanoidRobot::dcm)
|
|
191
190
|
.def("zmp", &HumanoidRobot::zmp)
|
|
192
191
|
.def("other_side", &HumanoidRobot::other_side)
|
|
193
192
|
.def(
|
|
@@ -213,10 +212,12 @@ void exposeRobotWrapper()
|
|
|
213
212
|
"get_support_side", +[](const HumanoidRobot& robot) { return robot.support_side; })
|
|
214
213
|
.add_property("support_is_both", &HumanoidRobot::support_is_both, &HumanoidRobot::support_is_both)
|
|
215
214
|
.add_property("support_side", &HumanoidRobot::support_side)
|
|
216
|
-
.def(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
.def(
|
|
216
|
+
"get_T_world_support", +[](const HumanoidRobot& robot) { return robot.T_world_support; })
|
|
217
|
+
.def(
|
|
218
|
+
"set_T_world_support", +[](HumanoidRobot& robot, const Eigen::Affine3d& T_world_support) {
|
|
219
|
+
robot.T_world_support = T_world_support;
|
|
220
|
+
});
|
|
220
221
|
|
|
221
222
|
exposeStdVector<RobotWrapper::Collision>("vector_Collision");
|
|
222
223
|
exposeStdVector<RobotWrapper::Distance>("vector_Distance");
|
|
@@ -23,9 +23,11 @@ using namespace placo::humanoid;
|
|
|
23
23
|
void exposeWalkPatternGenerator()
|
|
24
24
|
{
|
|
25
25
|
class__<WalkPatternGenerator::TrajectoryPart>("WPGTrajectoryPart", init<FootstepsPlanner::Support, double>())
|
|
26
|
-
.add_property("t_start", &WalkPatternGenerator::TrajectoryPart::t_start,
|
|
26
|
+
.add_property("t_start", &WalkPatternGenerator::TrajectoryPart::t_start,
|
|
27
|
+
&WalkPatternGenerator::TrajectoryPart::t_start)
|
|
27
28
|
.add_property("t_end", &WalkPatternGenerator::TrajectoryPart::t_end, &WalkPatternGenerator::TrajectoryPart::t_end)
|
|
28
|
-
.add_property("support", &WalkPatternGenerator::TrajectoryPart::support,
|
|
29
|
+
.add_property("support", &WalkPatternGenerator::TrajectoryPart::support,
|
|
30
|
+
&WalkPatternGenerator::TrajectoryPart::support);
|
|
29
31
|
|
|
30
32
|
class__<WalkPatternGenerator::Trajectory>("WPGTrajectory", init<double, double, double, double>())
|
|
31
33
|
.add_property("t_start", &WalkPatternGenerator::Trajectory::t_start)
|
|
@@ -33,8 +35,8 @@ void exposeWalkPatternGenerator()
|
|
|
33
35
|
.add_property("com_target_z", &WalkPatternGenerator::Trajectory::com_target_z)
|
|
34
36
|
.add_property("trunk_pitch", &WalkPatternGenerator::Trajectory::trunk_pitch)
|
|
35
37
|
.add_property("trunk_roll", &WalkPatternGenerator::Trajectory::trunk_roll)
|
|
36
|
-
.add_property("kept_ts", &WalkPatternGenerator::Trajectory::kept_ts)
|
|
37
38
|
.add_property("parts", &WalkPatternGenerator::Trajectory::parts)
|
|
39
|
+
.add_property("replan_success", &WalkPatternGenerator::Trajectory::replan_success)
|
|
38
40
|
.def("get_T_world_left", &WalkPatternGenerator::Trajectory::get_T_world_left)
|
|
39
41
|
.def("get_T_world_right", &WalkPatternGenerator::Trajectory::get_T_world_right)
|
|
40
42
|
.def("get_v_world_right", &WalkPatternGenerator::Trajectory::get_v_world_right)
|
|
@@ -46,6 +48,9 @@ void exposeWalkPatternGenerator()
|
|
|
46
48
|
.def("get_p_world_ZMP", &WalkPatternGenerator::Trajectory::get_p_world_ZMP)
|
|
47
49
|
.def("get_p_world_DCM", &WalkPatternGenerator::Trajectory::get_p_world_DCM)
|
|
48
50
|
.def("get_R_world_trunk", &WalkPatternGenerator::Trajectory::get_R_world_trunk)
|
|
51
|
+
.def("get_p_support_CoM", &WalkPatternGenerator::Trajectory::get_p_support_CoM)
|
|
52
|
+
.def("get_v_support_CoM", &WalkPatternGenerator::Trajectory::get_v_support_CoM)
|
|
53
|
+
.def("get_p_support_DCM", &WalkPatternGenerator::Trajectory::get_p_support_DCM)
|
|
49
54
|
.def("support_side", &WalkPatternGenerator::Trajectory::support_side)
|
|
50
55
|
.def("support_is_both", &WalkPatternGenerator::Trajectory::support_is_both)
|
|
51
56
|
.def("get_supports", &WalkPatternGenerator::Trajectory::get_supports)
|
|
@@ -67,7 +72,11 @@ void exposeWalkPatternGenerator()
|
|
|
67
72
|
.def("get_optimal_zmp", &WalkPatternGenerator::get_optimal_zmp)
|
|
68
73
|
.def("support_default_timesteps", &WalkPatternGenerator::support_default_timesteps)
|
|
69
74
|
.def("support_default_duration", &WalkPatternGenerator::support_default_duration)
|
|
70
|
-
.add_property("soft", &WalkPatternGenerator::soft, &WalkPatternGenerator::soft)
|
|
75
|
+
.add_property("soft", &WalkPatternGenerator::soft, &WalkPatternGenerator::soft)
|
|
76
|
+
.add_property("zmp_in_support_weight", &WalkPatternGenerator::zmp_in_support_weight,
|
|
77
|
+
&WalkPatternGenerator::zmp_in_support_weight)
|
|
78
|
+
.add_property("stop_end_support_weight", &WalkPatternGenerator::stop_end_support_weight,
|
|
79
|
+
&WalkPatternGenerator::stop_end_support_weight);
|
|
71
80
|
|
|
72
81
|
class__<SwingFoot>("SwingFoot", init<>())
|
|
73
82
|
.def("make_trajectory", &SwingFoot::make_trajectory)
|
|
@@ -134,14 +143,12 @@ void exposeWalkPatternGenerator()
|
|
|
134
143
|
make_function(
|
|
135
144
|
+[](WalkTasks& tasks) -> OrientationTask& { return *tasks.trunk_orientation_task; },
|
|
136
145
|
return_value_policy<reference_existing_object>()))
|
|
137
|
-
.add_property("com_task",
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
+[](WalkTasks& tasks) -> PositionTask& { return *tasks.trunk_task; },
|
|
144
|
-
return_value_policy<reference_existing_object>()));
|
|
146
|
+
.add_property("com_task", make_function(
|
|
147
|
+
+[](WalkTasks& tasks) -> CoMTask& { return *tasks.com_task; },
|
|
148
|
+
return_value_policy<reference_existing_object>()))
|
|
149
|
+
.add_property("trunk_task", make_function(
|
|
150
|
+
+[](WalkTasks& tasks) -> PositionTask& { return *tasks.trunk_task; },
|
|
151
|
+
return_value_policy<reference_existing_object>()));
|
|
145
152
|
|
|
146
153
|
class__<LIPM::Trajectory>("LIPMTrajectory", init<>())
|
|
147
154
|
.def("pos", &LIPM::Trajectory::pos)
|
|
@@ -48,11 +48,17 @@ public:
|
|
|
48
48
|
|
|
49
49
|
std::vector<Footstep> footsteps;
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
double
|
|
51
|
+
// Time at which the support starts. Is set to -1 if not initialized
|
|
52
|
+
double t_start = -1.;
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
// Elapsed ratio of the support phase, ranging from 0 to 1
|
|
55
|
+
double elapsed_ratio = 0.;
|
|
56
|
+
|
|
57
|
+
// Time ratio for the remaining part of the support phase
|
|
58
|
+
double time_ratio = 1.;
|
|
59
|
+
|
|
60
|
+
// Target DCM in the world frame at the end of the support phase
|
|
61
|
+
Eigen::Vector2d target_world_dcm = Eigen::Vector2d::Zero();
|
|
56
62
|
|
|
57
63
|
bool start = false;
|
|
58
64
|
bool end = false;
|
|
@@ -119,7 +125,8 @@ public:
|
|
|
119
125
|
* @return vector of supports to use. It starts with initial double supports,
|
|
120
126
|
* and add double support phases between footsteps.
|
|
121
127
|
*/
|
|
122
|
-
static std::vector<Support> make_supports(std::vector<Footstep> footsteps, double t_start, bool start = true,
|
|
128
|
+
static std::vector<Support> make_supports(std::vector<Footstep> footsteps, double t_start, bool start = true,
|
|
129
|
+
bool middle = false, bool end = true);
|
|
123
130
|
|
|
124
131
|
/**
|
|
125
132
|
* @brief Return the type of footsteps planner
|
|
@@ -194,12 +194,6 @@ Eigen::VectorXd HumanoidRobot::get_torques(Eigen::VectorXd acc_a, Eigen::VectorX
|
|
|
194
194
|
return M * acc + h - J_c * contact_forces;
|
|
195
195
|
}
|
|
196
196
|
|
|
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
197
|
Eigen::Vector2d HumanoidRobot::dcm(double omega, Eigen::Vector2d com_velocity)
|
|
204
198
|
{
|
|
205
199
|
// DCM = c + (1/omega) c_dot
|
|
@@ -39,7 +39,7 @@ public:
|
|
|
39
39
|
void ensure_on_floor();
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* @brief Place the robot on its support on the floor according
|
|
42
|
+
* @brief Place the robot on its support on the floor according
|
|
43
43
|
* to the trunk orientation and the kinematic configuration
|
|
44
44
|
* @param R_world_trunk Orientation of the trunk
|
|
45
45
|
*/
|
|
@@ -70,14 +70,8 @@ public:
|
|
|
70
70
|
* @param use_non_linear_effects If true, non linear effects are taken into account (state.qd necessary)
|
|
71
71
|
* @return Torques of the motors
|
|
72
72
|
*/
|
|
73
|
-
Eigen::VectorXd get_torques(Eigen::VectorXd acc_a, Eigen::VectorXd contact_forces,
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @brief Compute the Divergent Component of Motion (DCM)
|
|
77
|
-
* @param omega Natural frequency of the LIP (= sqrt(g/h))
|
|
78
|
-
* @return DCM
|
|
79
|
-
*/
|
|
80
|
-
Eigen::Vector2d dcm(double omega);
|
|
73
|
+
Eigen::VectorXd get_torques(Eigen::VectorXd acc_a, Eigen::VectorXd contact_forces,
|
|
74
|
+
bool use_non_linear_effects = false);
|
|
81
75
|
|
|
82
76
|
/**
|
|
83
77
|
* @brief Compute the Divergent Component of Motion (DCM)
|
|
@@ -145,4 +139,4 @@ public:
|
|
|
145
139
|
double dist_z_pan_camera; // Distance along z between the pan DoF and the camera in the head
|
|
146
140
|
double dist_y_trunk_foot; // Distance along y between the trunk and the left_foot frame in model
|
|
147
141
|
};
|
|
148
|
-
} // namespace placo::humanoid
|
|
142
|
+
} // namespace placo::humanoid
|
|
@@ -212,6 +212,25 @@ Eigen::Matrix3d WalkPatternGenerator::Trajectory::get_R_world_trunk(double t)
|
|
|
212
212
|
return T.linear() * R_world_trunk;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
Eigen::Vector3d WalkPatternGenerator::Trajectory::get_p_support_CoM(double t)
|
|
216
|
+
{
|
|
217
|
+
TrajectoryPart& part = _findPart(parts, t);
|
|
218
|
+
Eigen::Affine3d T_support_world = placo::tools::flatten_on_floor(get_T_world_foot(part.support.side(), t)).inverse();
|
|
219
|
+
return T_support_world * get_p_world_CoM(t);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
Eigen::Vector3d WalkPatternGenerator::Trajectory::get_v_support_CoM(double t)
|
|
223
|
+
{
|
|
224
|
+
TrajectoryPart& part = _findPart(parts, t);
|
|
225
|
+
Eigen::Affine3d T_support_world = placo::tools::flatten_on_floor(get_T_world_foot(part.support.side(), t)).inverse();
|
|
226
|
+
return T_support_world.linear() * get_v_world_CoM(t);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
Eigen::Vector2d WalkPatternGenerator::Trajectory::get_p_support_DCM(double t, double omega)
|
|
230
|
+
{
|
|
231
|
+
return get_p_support_CoM(t).head(2) + (1 / omega) * get_v_support_CoM(t).head(2);
|
|
232
|
+
}
|
|
233
|
+
|
|
215
234
|
HumanoidRobot::Side WalkPatternGenerator::Trajectory::support_side(double t)
|
|
216
235
|
{
|
|
217
236
|
return _findPart(parts, t).support.side();
|
|
@@ -402,7 +421,7 @@ void WalkPatternGenerator::constrain_lipm(problem::Problem& problem, LIPM& lipm,
|
|
|
402
421
|
lipm.zmp(timestep, omega_2), support.support_polygon(), parameters.zmp_margin));
|
|
403
422
|
if (soft)
|
|
404
423
|
{
|
|
405
|
-
zmp_constraint.configure(ProblemConstraint::Soft,
|
|
424
|
+
zmp_constraint.configure(ProblemConstraint::Soft, zmp_in_support_weight);
|
|
406
425
|
}
|
|
407
426
|
|
|
408
427
|
// Optional offset for single supports
|
|
@@ -428,15 +447,15 @@ void WalkPatternGenerator::constrain_lipm(problem::Problem& problem, LIPM& lipm,
|
|
|
428
447
|
|
|
429
448
|
if (soft)
|
|
430
449
|
{
|
|
431
|
-
pos_constraint.configure(ProblemConstraint::Soft,
|
|
432
|
-
vel_constraint.configure(ProblemConstraint::Soft,
|
|
433
|
-
acc_constraint.configure(ProblemConstraint::Soft,
|
|
450
|
+
pos_constraint.configure(ProblemConstraint::Soft, stop_end_support_weight);
|
|
451
|
+
vel_constraint.configure(ProblemConstraint::Soft, stop_end_support_weight);
|
|
452
|
+
acc_constraint.configure(ProblemConstraint::Soft, stop_end_support_weight);
|
|
434
453
|
}
|
|
435
454
|
}
|
|
436
455
|
}
|
|
437
456
|
}
|
|
438
457
|
|
|
439
|
-
|
|
458
|
+
bool WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<FootstepsPlanner::Support>& supports,
|
|
440
459
|
Eigen::Vector2d initial_pos, Eigen::Vector2d initial_vel,
|
|
441
460
|
Eigen::Vector2d initial_acc)
|
|
442
461
|
{
|
|
@@ -476,14 +495,24 @@ void WalkPatternGenerator::plan_com(Trajectory& trajectory, std::vector<Footstep
|
|
|
476
495
|
trajectory.t_end = t;
|
|
477
496
|
|
|
478
497
|
// Solving the problem
|
|
479
|
-
|
|
498
|
+
try
|
|
499
|
+
{
|
|
500
|
+
problem.solve();
|
|
501
|
+
}
|
|
502
|
+
catch (const std::exception& e)
|
|
503
|
+
{
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
480
506
|
|
|
507
|
+
// Attributing the LIPM trajectories to the trajectory parts
|
|
481
508
|
for (int i = 0; i < (int)trajectory.parts.size(); i++)
|
|
482
509
|
{
|
|
483
510
|
auto& part = trajectory.parts[i];
|
|
484
511
|
part.com_trajectory = lipms[i].get_trajectory();
|
|
485
512
|
part.support.target_world_dcm = part.com_trajectory.dcm(part.t_end, omega);
|
|
486
513
|
}
|
|
514
|
+
|
|
515
|
+
return true;
|
|
487
516
|
}
|
|
488
517
|
|
|
489
518
|
WalkPatternGenerator::Trajectory WalkPatternGenerator::plan(std::vector<FootstepsPlanner::Support>& supports,
|
|
@@ -523,7 +552,13 @@ WalkPatternGenerator::Trajectory WalkPatternGenerator::replan(std::vector<Footst
|
|
|
523
552
|
Eigen::Vector2d initial_pos = old_trajectory.get_p_world_CoM(t_replan).head(2);
|
|
524
553
|
Eigen::Vector2d initial_vel = old_trajectory.get_v_world_CoM(t_replan).head(2);
|
|
525
554
|
Eigen::Vector2d initial_acc = old_trajectory.get_a_world_CoM(t_replan).head(2);
|
|
526
|
-
plan_com(trajectory, supports, initial_pos, initial_vel, initial_acc);
|
|
555
|
+
bool planned_com = plan_com(trajectory, supports, initial_pos, initial_vel, initial_acc);
|
|
556
|
+
|
|
557
|
+
// If we can't plan the CoM, we return the trimmed old trajectory
|
|
558
|
+
if (!planned_com)
|
|
559
|
+
{
|
|
560
|
+
return trim_old_trajectory(old_trajectory, t_replan);
|
|
561
|
+
}
|
|
527
562
|
|
|
528
563
|
plan_feet_trajectories(trajectory, &old_trajectory);
|
|
529
564
|
|
|
@@ -539,23 +574,12 @@ bool WalkPatternGenerator::can_replan_supports(Trajectory& trajectory, double t_
|
|
|
539
574
|
return false;
|
|
540
575
|
}
|
|
541
576
|
|
|
577
|
+
// We can't replan if the current support is a double support
|
|
542
578
|
if (trajectory.get_support(t_replan).is_both())
|
|
543
579
|
{
|
|
544
|
-
// We can't replan if the current support is a double support
|
|
545
580
|
return false;
|
|
546
581
|
}
|
|
547
582
|
|
|
548
|
-
// XXX: Need to move to a branch
|
|
549
|
-
// We can't replan if more than 1/2 of the support phase has passed
|
|
550
|
-
// if (trajectory.get_support(t_replan).elapsed_ratio > 0.8)
|
|
551
|
-
// {
|
|
552
|
-
// return false;
|
|
553
|
-
// }
|
|
554
|
-
// if (t_replan - trajectory.get_support(t_replan).t_start < 0.005)
|
|
555
|
-
// {
|
|
556
|
-
// return false;
|
|
557
|
-
// }
|
|
558
|
-
|
|
559
583
|
return true;
|
|
560
584
|
}
|
|
561
585
|
|
|
@@ -613,7 +637,6 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::replan_supports(Foo
|
|
|
613
637
|
current_support.elapsed_ratio +
|
|
614
638
|
elapsed_duration / (support_default_duration(current_support) * current_support.time_ratio);
|
|
615
639
|
supports[0].time_ratio = current_support.time_ratio;
|
|
616
|
-
supports[0].target_world_dcm = current_support.target_world_dcm;
|
|
617
640
|
return supports;
|
|
618
641
|
}
|
|
619
642
|
|
|
@@ -651,9 +674,8 @@ void WalkPatternGenerator::Trajectory::print_parts_timings()
|
|
|
651
674
|
}
|
|
652
675
|
}
|
|
653
676
|
|
|
654
|
-
std::vector<FootstepsPlanner::Support>
|
|
655
|
-
|
|
656
|
-
Eigen::Vector2d world_target_zmp, Eigen::Vector2d world_measured_dcm)
|
|
677
|
+
std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(
|
|
678
|
+
double t, std::vector<FootstepsPlanner::Support> supports, Eigen::Vector2d world_measured_dcm)
|
|
657
679
|
{
|
|
658
680
|
FootstepsPlanner::Support current_support = supports[0];
|
|
659
681
|
if (current_support.is_both())
|
|
@@ -671,12 +693,15 @@ WalkPatternGenerator::update_supports(double t, std::vector<FootstepsPlanner::Su
|
|
|
671
693
|
Eigen::Matrix2d R_world_support = current_support.frame().rotation().topLeftCorner(2, 2);
|
|
672
694
|
Eigen::Vector2d p_world_support = current_support.frame().translation().head(2);
|
|
673
695
|
|
|
674
|
-
// Decision variables
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
696
|
+
// ----------------- Decision variables: ------------------
|
|
697
|
+
// ZMP of the next support expressed in the current support frame
|
|
698
|
+
placo::problem::Variable* support_next_zmp = &problem.add_variable(2);
|
|
699
|
+
|
|
700
|
+
// exp(omega * T) where T is the end of the current support
|
|
701
|
+
placo::problem::Variable* tau = &problem.add_variable(1);
|
|
702
|
+
|
|
703
|
+
// Offset of the DCM from the ZMP in the current support frame
|
|
704
|
+
placo::problem::Variable* support_dcm_offset = &problem.add_variable(2);
|
|
680
705
|
|
|
681
706
|
// ----------------- Objective functions: -----------------
|
|
682
707
|
// Time reference
|
|
@@ -685,14 +710,11 @@ WalkPatternGenerator::update_supports(double t, std::vector<FootstepsPlanner::Su
|
|
|
685
710
|
|
|
686
711
|
// ZMP Reference (expressed in the world frame)
|
|
687
712
|
Expression world_next_zmp_expr = p_world_support + R_world_support * support_next_zmp->expr();
|
|
713
|
+
Eigen::Vector2d world_target_zmp = supports[1].frame().translation().head(2);
|
|
688
714
|
problem.add_constraint(world_next_zmp_expr == world_target_zmp).configure(ProblemConstraint::Soft, w2);
|
|
689
715
|
|
|
690
716
|
// DCM offset reference (expressed in the world frame)
|
|
691
|
-
// XXX : l'offset doit être calculé par rapport à la cible mise à jour non ?
|
|
692
717
|
Eigen::Vector2d world_target_dcm_offset = current_support.target_world_dcm - world_target_zmp;
|
|
693
|
-
// Eigen::Vector2d world_target_dcm_offset = world_end_dcm - next_support.frame().translation().head(2);
|
|
694
|
-
// std::cout << "world_target_dcm_offset: " << world_target_dcm_offset.transpose() << std::endl;
|
|
695
|
-
|
|
696
718
|
Expression world_dcm_offset_expr = R_world_support * support_dcm_offset->expr();
|
|
697
719
|
problem.add_constraint(world_dcm_offset_expr == world_target_dcm_offset).configure(ProblemConstraint::Soft, w3);
|
|
698
720
|
|
|
@@ -747,6 +769,7 @@ WalkPatternGenerator::update_supports(double t, std::vector<FootstepsPlanner::Su
|
|
|
747
769
|
problem.solve();
|
|
748
770
|
|
|
749
771
|
// Updating next support position
|
|
772
|
+
// XXX: Problème de transform T qui s'applique ?
|
|
750
773
|
Eigen::Vector2d world_next_zmp_val = p_world_support + R_world_support * support_next_zmp->value;
|
|
751
774
|
supports[1].footsteps[0].frame.translation().x() = world_next_zmp_val(0);
|
|
752
775
|
supports[1].footsteps[0].frame.translation().y() = world_next_zmp_val(1);
|
|
@@ -784,4 +807,40 @@ Eigen::Vector2d WalkPatternGenerator::get_optimal_zmp(Eigen::Vector2d world_dcm_
|
|
|
784
807
|
problem.solve();
|
|
785
808
|
return world_zmp->value;
|
|
786
809
|
}
|
|
810
|
+
|
|
811
|
+
WalkPatternGenerator::Trajectory WalkPatternGenerator::trim_old_trajectory(Trajectory& old_trajectory, double t_replan)
|
|
812
|
+
{
|
|
813
|
+
Trajectory trajectory = old_trajectory;
|
|
814
|
+
trajectory.t_start = t_replan;
|
|
815
|
+
trajectory.replan_success = false;
|
|
816
|
+
|
|
817
|
+
// Remove the parts before the replan time
|
|
818
|
+
std::vector<WalkPatternGenerator::TrajectoryPart> new_parts;
|
|
819
|
+
for (auto part : old_trajectory.parts)
|
|
820
|
+
{
|
|
821
|
+
if (t_replan >= part.t_start)
|
|
822
|
+
{
|
|
823
|
+
if (t_replan < part.t_end)
|
|
824
|
+
{
|
|
825
|
+
TrajectoryPart new_part = part;
|
|
826
|
+
new_part.t_start = t_replan;
|
|
827
|
+
|
|
828
|
+
// Updating the elapsed ratio of the support
|
|
829
|
+
double elapsed_duration = t_replan - std::max(old_trajectory.t_start, new_part.support.t_start);
|
|
830
|
+
new_part.support.elapsed_ratio =
|
|
831
|
+
new_part.support.elapsed_ratio +
|
|
832
|
+
elapsed_duration / (support_default_duration(new_part.support) * new_part.support.time_ratio);
|
|
833
|
+
|
|
834
|
+
new_parts.push_back(new_part);
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
else
|
|
838
|
+
{
|
|
839
|
+
new_parts.push_back(part);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
trajectory.parts = new_parts;
|
|
843
|
+
|
|
844
|
+
return trajectory;
|
|
845
|
+
}
|
|
787
846
|
} // namespace placo::humanoid
|
|
@@ -53,7 +53,8 @@ public:
|
|
|
53
53
|
double trunk_pitch;
|
|
54
54
|
double trunk_roll;
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
// Replan succeeded?
|
|
57
|
+
bool replan_success = true;
|
|
57
58
|
|
|
58
59
|
Eigen::Affine3d get_T_world_left(double t);
|
|
59
60
|
Eigen::Affine3d get_T_world_right(double t);
|
|
@@ -78,6 +79,10 @@ public:
|
|
|
78
79
|
|
|
79
80
|
Eigen::Matrix3d get_R_world_trunk(double t);
|
|
80
81
|
|
|
82
|
+
Eigen::Vector3d get_p_support_CoM(double t);
|
|
83
|
+
Eigen::Vector3d get_v_support_CoM(double t);
|
|
84
|
+
Eigen::Vector2d get_p_support_DCM(double t, double omega);
|
|
85
|
+
|
|
81
86
|
HumanoidRobot::Side support_side(double t);
|
|
82
87
|
bool support_is_both(double t);
|
|
83
88
|
bool is_flying(HumanoidRobot::Side side, double t);
|
|
@@ -180,19 +185,14 @@ public:
|
|
|
180
185
|
std::vector<FootstepsPlanner::Support> replan_supports(FootstepsPlanner& planner, Trajectory& trajectory,
|
|
181
186
|
double t_replan, double t_last_replan);
|
|
182
187
|
|
|
183
|
-
double last_com_planning_duration = 0.;
|
|
184
|
-
double last_feet_planning_duration = 0.;
|
|
185
|
-
|
|
186
188
|
/**
|
|
187
189
|
* @brief Updates the supports to ensure DCM viability by adjusting the
|
|
188
190
|
* duration and the target of the current swing trajectory.
|
|
189
191
|
* @param t Current time
|
|
190
192
|
* @param supports Planned supports
|
|
191
|
-
* @param world_target_zmp Target ZMP for the flying foot in world frame
|
|
192
193
|
* @param world_measured_dcm Measured DCM in world frame
|
|
193
194
|
*/
|
|
194
195
|
std::vector<FootstepsPlanner::Support> update_supports(double t, std::vector<FootstepsPlanner::Support> supports,
|
|
195
|
-
Eigen::Vector2d world_target_zmp,
|
|
196
196
|
Eigen::Vector2d world_measured_dcm);
|
|
197
197
|
|
|
198
198
|
/**
|
|
@@ -210,6 +210,8 @@ public:
|
|
|
210
210
|
double support_default_duration(FootstepsPlanner::Support& support);
|
|
211
211
|
|
|
212
212
|
bool soft = false;
|
|
213
|
+
double zmp_in_support_weight = 1e3;
|
|
214
|
+
double stop_end_support_weight = 1e3;
|
|
213
215
|
|
|
214
216
|
protected:
|
|
215
217
|
// Robot associated to the WPG
|
|
@@ -218,18 +220,46 @@ protected:
|
|
|
218
220
|
// The parameters to use for planning. The values are forwarded to the relevant solvers when needed.
|
|
219
221
|
HumanoidParameters& parameters;
|
|
220
222
|
|
|
223
|
+
// Natural frequency of the LIPM (omega = sqrt(g/h))
|
|
221
224
|
double omega;
|
|
225
|
+
|
|
226
|
+
// Squared natural frequency of the LIPM (omega^2 = g/h)
|
|
222
227
|
double omega_2;
|
|
223
228
|
|
|
229
|
+
/**
|
|
230
|
+
* @brief Constrains the LIPM to ensure that the ZMP stays in the support polygon and that the CoM stops at
|
|
231
|
+
* the end of an end support.
|
|
232
|
+
* @param problem Problem to add the constraints to
|
|
233
|
+
* @param lipm LIPM to constrain
|
|
234
|
+
* @param support Support to constrain
|
|
235
|
+
* @param omega_2 Squared natural frequency of the LIPM (omega^2 = g/h)
|
|
236
|
+
* @param parameters Humanoid parameters to use for the constraints
|
|
237
|
+
*/
|
|
224
238
|
void constrain_lipm(problem::Problem& problem, LIPM& lipm, FootstepsPlanner::Support& support, double omega_2,
|
|
225
239
|
HumanoidParameters& parameters);
|
|
226
240
|
|
|
227
|
-
|
|
241
|
+
/**
|
|
242
|
+
* @brief Plans the CoM trajectory for a given support. Returns false if the QP solver failed to solve the problem.
|
|
243
|
+
* @param trajectory Trajectory to fill
|
|
244
|
+
* @param support Support to plan
|
|
245
|
+
* @param initial_pos Initial position of the CoM in the world frame
|
|
246
|
+
* @param initial_vel Initial velocity of the CoM in the world frame
|
|
247
|
+
* @param initial_acc Initial acceleration of the CoM in the world frame
|
|
248
|
+
*/
|
|
249
|
+
bool plan_com(Trajectory& trajectory, std::vector<FootstepsPlanner::Support>& supports, Eigen::Vector2d initial_pos,
|
|
228
250
|
Eigen::Vector2d initial_vel = Eigen::Vector2d::Zero(),
|
|
229
251
|
Eigen::Vector2d initial_acc = Eigen::Vector2d::Zero());
|
|
230
252
|
|
|
231
253
|
void plan_dbl_support(Trajectory& trajectory, int part_index);
|
|
232
254
|
void plan_sgl_support(Trajectory& trajectory, int part_index, Trajectory* old_trajectory);
|
|
233
255
|
void plan_feet_trajectories(Trajectory& trajectory, Trajectory* old_trajectory = nullptr);
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @brief Trims the old trajectory to the new time horizon without modifying the CoM and feet trajectories.
|
|
259
|
+
* @param old_trajectory The old trajectory to trim
|
|
260
|
+
* @param t_replan The time at which the replan happens
|
|
261
|
+
* @return The trimmed trajectory
|
|
262
|
+
*/
|
|
263
|
+
Trajectory trim_old_trajectory(Trajectory& old_trajectory, double t_replan);
|
|
234
264
|
};
|
|
235
265
|
} // namespace placo::humanoid
|
|
@@ -252,11 +252,6 @@ Eigen::Vector3d RobotWrapper::com_world()
|
|
|
252
252
|
return data->com[0];
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
Eigen::Vector3d RobotWrapper::dcom_world()
|
|
256
|
-
{
|
|
257
|
-
return com_jacobian() * state.qd;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
255
|
void RobotWrapper::update_kinematics()
|
|
261
256
|
{
|
|
262
257
|
pinocchio::framesForwardKinematics(model, *data, state.q);
|
|
@@ -239,11 +239,6 @@ public:
|
|
|
239
239
|
*/
|
|
240
240
|
Eigen::Vector3d com_world();
|
|
241
241
|
|
|
242
|
-
/**
|
|
243
|
-
* @brief Gets the CoM velocity in the world
|
|
244
|
-
*/
|
|
245
|
-
Eigen::Vector3d dcom_world();
|
|
246
|
-
|
|
247
242
|
/**
|
|
248
243
|
* @brief Gets the frame to world transformation matrix for a given frame
|
|
249
244
|
*
|
|
@@ -480,7 +475,7 @@ public:
|
|
|
480
475
|
Eigen::MatrixXd joint_jacobian(pinocchio::JointIndex joint,
|
|
481
476
|
pinocchio::ReferenceFrame ref = pinocchio::ReferenceFrame::LOCAL_WORLD_ALIGNED);
|
|
482
477
|
|
|
483
|
-
|
|
478
|
+
/**
|
|
484
479
|
* @brief Joint jacobian, default reference is LOCAL_WORLD_ALIGNED
|
|
485
480
|
*
|
|
486
481
|
* Be sure you called \ref update_kinematics before calling this method if your state has changed
|
|
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
|