placo 0.9.1__tar.gz → 0.9.3__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.1 → placo-0.9.3}/PKG-INFO +1 -1
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-footsteps.cpp +17 -6
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-walk-pattern-generator.cpp +1 -1
- {placo-0.9.1 → placo-0.9.3}/pyproject.toml +1 -1
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/footsteps_planner.h +1 -1
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/footsteps_planner_naive.cpp +9 -2
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/swing_foot_cubic.cpp +3 -1
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/walk_pattern_generator.cpp +40 -16
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/walk_pattern_generator.h +10 -1
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/walk_tasks.cpp +6 -4
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/walk_tasks.h +2 -1
- {placo-0.9.1 → placo-0.9.3}/.clang-format +0 -0
- {placo-0.9.1 → placo-0.9.3}/.gitattributes +0 -0
- {placo-0.9.1 → placo-0.9.3}/.github/workflows/wheels.yml +0 -0
- {placo-0.9.1 → placo-0.9.3}/.gitignore +0 -0
- {placo-0.9.1 → placo-0.9.3}/.readthedocs.yaml +0 -0
- {placo-0.9.1 → placo-0.9.3}/CMakeLists.txt +0 -0
- {placo-0.9.1 → placo-0.9.3}/Doxyfile +0 -0
- {placo-0.9.1 → placo-0.9.3}/LICENSE +0 -0
- {placo-0.9.1 → placo-0.9.3}/README.md +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/doxystub.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-eigen.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-kinematics.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-parameters.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-problem.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-robot-wrapper.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-tools.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/expose-utils.hpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/module.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/bindings/module.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/.vscode/settings.json +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/Makefile +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/placo_utils/__init__.py +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/placo_utils/tf.py +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/placo_utils/view.py +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/placo_utils/visualization.py +0 -0
- {placo-0.9.1 → placo-0.9.3}/python/run_tests.sh +0 -0
- {placo-0.9.1 → placo-0.9.3}/scripts/requirements.sh +0 -0
- {placo-0.9.1 → placo-0.9.3}/scripts/robotpkg.sh +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/humanoid_parameters.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/humanoid_robot.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/humanoid_robot.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/kick.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/lipm.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/distance_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/distance_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/joint_space_half_spaces_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/kinematics_solver.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/yaw_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/kinematics/yaw_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/model/robot_wrapper.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/model/robot_wrapper.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/expression.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/expression.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/integrator.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/problem.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/problem.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/problem_polynom.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/problem_polynom.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/qp_error.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/sparsity.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/variable.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/problem/variable.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/cubic_spline.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/directions.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/directions.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/polynom.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/polynom.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/prioritized.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/segment.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/segment.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/utils.cpp +0 -0
- {placo-0.9.1 → placo-0.9.3}/src/placo/tools/utils.h +0 -0
- {placo-0.9.1 → placo-0.9.3}/wks.yml +0 -0
|
@@ -25,10 +25,12 @@ void exposeFootsteps()
|
|
|
25
25
|
.add_property("foot_length", &FootstepsPlanner::Footstep::foot_length, &FootstepsPlanner::Footstep::foot_length)
|
|
26
26
|
.add_property("foot_width", &FootstepsPlanner::Footstep::foot_width, &FootstepsPlanner::Footstep::foot_width)
|
|
27
27
|
.add_property("frame", &FootstepsPlanner::Footstep::frame, &FootstepsPlanner::Footstep::frame)
|
|
28
|
-
.def(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
.def(
|
|
29
|
+
"set_frame_xy",
|
|
30
|
+
+[](FootstepsPlanner::Footstep& footstep, double x, double y) {
|
|
31
|
+
footstep.frame.translation().x() = x;
|
|
32
|
+
footstep.frame.translation().y() = y;
|
|
33
|
+
})
|
|
32
34
|
.def("support_polygon", &FootstepsPlanner::Footstep::support_polygon)
|
|
33
35
|
.def("overlap", &FootstepsPlanner::Footstep::overlap)
|
|
34
36
|
.def("polygon_contains", &FootstepsPlanner::Footstep::polygon_contains)
|
|
@@ -52,12 +54,21 @@ void exposeFootsteps()
|
|
|
52
54
|
.add_property("time_ratio", &FootstepsPlanner::Support::time_ratio, &FootstepsPlanner::Support::time_ratio)
|
|
53
55
|
.add_property("start", &FootstepsPlanner::Support::start, &FootstepsPlanner::Support::start)
|
|
54
56
|
.add_property("end", &FootstepsPlanner::Support::end, &FootstepsPlanner::Support::end)
|
|
55
|
-
.add_property("target_world_dcm", &FootstepsPlanner::Support::target_world_dcm,
|
|
57
|
+
.add_property("target_world_dcm", &FootstepsPlanner::Support::target_world_dcm,
|
|
56
58
|
&FootstepsPlanner::Support::target_world_dcm);
|
|
57
59
|
|
|
58
60
|
class__<FootstepsPlanner, boost::noncopyable>("FootstepsPlanner", no_init)
|
|
59
61
|
.def("make_supports", &FootstepsPlanner::make_supports)
|
|
60
|
-
.def("opposite_footstep", &FootstepsPlanner::opposite_footstep)
|
|
62
|
+
.def("opposite_footstep", &FootstepsPlanner::opposite_footstep)
|
|
63
|
+
.def(
|
|
64
|
+
"supports_head", +[](const std::vector<FootstepsPlanner::Support> supports, int index) {
|
|
65
|
+
std::vector<FootstepsPlanner::Support> head;
|
|
66
|
+
for (int i = 0; i < index; ++i)
|
|
67
|
+
{
|
|
68
|
+
head.push_back(supports[i]);
|
|
69
|
+
}
|
|
70
|
+
return head;
|
|
71
|
+
});
|
|
61
72
|
|
|
62
73
|
class__<FootstepsPlannerNaive, bases<FootstepsPlanner>>("FootstepsPlannerNaive", init<HumanoidParameters&>())
|
|
63
74
|
.def("plan", &FootstepsPlannerNaive::plan)
|
|
@@ -35,8 +35,8 @@ void exposeWalkPatternGenerator()
|
|
|
35
35
|
.add_property("com_target_z", &WalkPatternGenerator::Trajectory::com_target_z)
|
|
36
36
|
.add_property("trunk_pitch", &WalkPatternGenerator::Trajectory::trunk_pitch)
|
|
37
37
|
.add_property("trunk_roll", &WalkPatternGenerator::Trajectory::trunk_roll)
|
|
38
|
-
.add_property("kept_ts", &WalkPatternGenerator::Trajectory::kept_ts)
|
|
39
38
|
.add_property("parts", &WalkPatternGenerator::Trajectory::parts)
|
|
39
|
+
.add_property("replan_success", &WalkPatternGenerator::Trajectory::replan_success)
|
|
40
40
|
.def("get_T_world_left", &WalkPatternGenerator::Trajectory::get_T_world_left)
|
|
41
41
|
.def("get_T_world_right", &WalkPatternGenerator::Trajectory::get_T_world_right)
|
|
42
42
|
.def("get_v_world_right", &WalkPatternGenerator::Trajectory::get_v_world_right)
|
|
@@ -18,6 +18,9 @@ namespace placo::humanoid
|
|
|
18
18
|
{
|
|
19
19
|
FootstepsPlannerNaive::FootstepsPlannerNaive(HumanoidParameters& parameters) : FootstepsPlanner(parameters)
|
|
20
20
|
{
|
|
21
|
+
accessibility_length = parameters.walk_max_dx_forward;
|
|
22
|
+
accessibility_width = parameters.walk_max_dy;
|
|
23
|
+
accessibility_yaw = parameters.walk_max_dtheta;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
std::string FootstepsPlannerNaive::name()
|
|
@@ -125,10 +128,14 @@ void FootstepsPlannerNaive::plan_impl(std::vector<FootstepsPlanner::Footstep>& f
|
|
|
125
128
|
error_yaw = accessibility_yaw;
|
|
126
129
|
}
|
|
127
130
|
|
|
131
|
+
// Ellipsoid clipping
|
|
132
|
+
Eigen::Vector3d step(error.x(), error.y(), error_yaw);
|
|
133
|
+
step = parameters.ellipsoid_clip(step);
|
|
134
|
+
|
|
128
135
|
// Computing new frame
|
|
129
136
|
Eigen::Affine3d new_step;
|
|
130
|
-
new_step.translation() = T_support_floatingIdle.translation() +
|
|
131
|
-
new_step.linear() = Eigen::AngleAxisd(
|
|
137
|
+
new_step.translation() = T_support_floatingIdle.translation() + Eigen::Vector3d(step.x(), step.y(), 0.);
|
|
138
|
+
new_step.linear() = Eigen::AngleAxisd(step[2], Eigen::Vector3d::UnitZ()).toRotationMatrix();
|
|
132
139
|
|
|
133
140
|
// Going to next step
|
|
134
141
|
Footstep footstep = create_footstep(HumanoidRobot::other_side(current_support_side), T_world_support * new_step);
|
|
@@ -15,7 +15,9 @@ Eigen::Vector3d SwingFootCubic::Trajectory::vel(double t)
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
SwingFootCubic::Trajectory SwingFootCubic::make_trajectory(double t_start, double virt_duration, double height,
|
|
18
|
-
|
|
18
|
+
double rise_ratio, Eigen::Vector3d start,
|
|
19
|
+
Eigen::Vector3d target, double elapsed_ratio,
|
|
20
|
+
Eigen::Vector3d start_vel)
|
|
19
21
|
{
|
|
20
22
|
SwingFootCubic::Trajectory trajectory;
|
|
21
23
|
|
|
@@ -346,7 +346,6 @@ void WalkPatternGenerator::plan_sgl_support(Trajectory& trajectory, int part_ind
|
|
|
346
346
|
Eigen::Affine3d T_world_end = trajectory.parts[part_index + 1].support.footstep_frame(flying_side);
|
|
347
347
|
|
|
348
348
|
double virt_duration = support_default_duration(part.support) * part.support.time_ratio;
|
|
349
|
-
|
|
350
349
|
if (part_index == 0 && old_trajectory != nullptr)
|
|
351
350
|
{
|
|
352
351
|
Eigen::Vector3d start = old_trajectory->get_T_world_foot(flying_side, trajectory.t_start).translation();
|
|
@@ -554,9 +553,10 @@ WalkPatternGenerator::Trajectory WalkPatternGenerator::replan(std::vector<Footst
|
|
|
554
553
|
Eigen::Vector2d initial_acc = old_trajectory.get_a_world_CoM(t_replan).head(2);
|
|
555
554
|
bool planned_com = plan_com(trajectory, supports, initial_pos, initial_vel, initial_acc);
|
|
556
555
|
|
|
556
|
+
// If we can't plan the CoM, we return the trimmed old trajectory
|
|
557
557
|
if (!planned_com)
|
|
558
558
|
{
|
|
559
|
-
return old_trajectory;
|
|
559
|
+
return trim_old_trajectory(old_trajectory, t_replan);
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
plan_feet_trajectories(trajectory, &old_trajectory);
|
|
@@ -579,17 +579,6 @@ bool WalkPatternGenerator::can_replan_supports(Trajectory& trajectory, double t_
|
|
|
579
579
|
return false;
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
// XXX: Need to move to a branch
|
|
583
|
-
// We can't replan if more than 1/2 of the support phase has passed
|
|
584
|
-
// if (trajectory.get_support(t_replan).elapsed_ratio > 0.8)
|
|
585
|
-
// {
|
|
586
|
-
// return false;
|
|
587
|
-
// }
|
|
588
|
-
// if (t_replan - trajectory.get_support(t_replan).t_start < 0.005)
|
|
589
|
-
// {
|
|
590
|
-
// return false;
|
|
591
|
-
// }
|
|
592
|
-
|
|
593
582
|
return true;
|
|
594
583
|
}
|
|
595
584
|
|
|
@@ -766,7 +755,7 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(
|
|
|
766
755
|
}
|
|
767
756
|
|
|
768
757
|
// LIPM Dynamics (expressed in the world frame)
|
|
769
|
-
double duration = std::max(
|
|
758
|
+
double duration = std::max(1e-5, T - elapsed_time);
|
|
770
759
|
Eigen::Vector2d world_virtual_zmp =
|
|
771
760
|
get_optimal_zmp(world_measured_dcm, current_support.target_world_dcm, duration, current_support);
|
|
772
761
|
// Eigen::Vector2d world_virtual_zmp = flatten_on_floor(current_support.frame()).translation().head(2);
|
|
@@ -779,13 +768,12 @@ std::vector<FootstepsPlanner::Support> WalkPatternGenerator::update_supports(
|
|
|
779
768
|
problem.solve();
|
|
780
769
|
|
|
781
770
|
// Updating next support position
|
|
782
|
-
// XXX: Problème de transform T qui s'applique ?
|
|
783
771
|
Eigen::Vector2d world_next_zmp_val = p_world_support + R_world_support * support_next_zmp->value;
|
|
784
772
|
supports[1].footsteps[0].frame.translation().x() = world_next_zmp_val(0);
|
|
785
773
|
supports[1].footsteps[0].frame.translation().y() = world_next_zmp_val(1);
|
|
786
774
|
|
|
787
775
|
// Updating current support remaining duration
|
|
788
|
-
double support_remaining_time = log(tau->value(0)) / omega - elapsed_time;
|
|
776
|
+
double support_remaining_time = std::max(1e-3, log(tau->value(0)) / omega - elapsed_time);
|
|
789
777
|
supports[0].time_ratio =
|
|
790
778
|
support_remaining_time / (support_default_duration(current_support) * (1 - current_support.elapsed_ratio));
|
|
791
779
|
|
|
@@ -817,4 +805,40 @@ Eigen::Vector2d WalkPatternGenerator::get_optimal_zmp(Eigen::Vector2d world_dcm_
|
|
|
817
805
|
problem.solve();
|
|
818
806
|
return world_zmp->value;
|
|
819
807
|
}
|
|
808
|
+
|
|
809
|
+
WalkPatternGenerator::Trajectory WalkPatternGenerator::trim_old_trajectory(Trajectory& old_trajectory, double t_replan)
|
|
810
|
+
{
|
|
811
|
+
Trajectory trajectory = old_trajectory;
|
|
812
|
+
trajectory.t_start = t_replan;
|
|
813
|
+
trajectory.replan_success = false;
|
|
814
|
+
|
|
815
|
+
// Remove the parts before the replan time
|
|
816
|
+
std::vector<WalkPatternGenerator::TrajectoryPart> new_parts;
|
|
817
|
+
for (auto part : old_trajectory.parts)
|
|
818
|
+
{
|
|
819
|
+
if (t_replan >= part.t_start)
|
|
820
|
+
{
|
|
821
|
+
if (t_replan < part.t_end)
|
|
822
|
+
{
|
|
823
|
+
TrajectoryPart new_part = part;
|
|
824
|
+
new_part.t_start = t_replan;
|
|
825
|
+
|
|
826
|
+
// Updating the elapsed ratio of the support
|
|
827
|
+
double elapsed_duration = t_replan - std::max(old_trajectory.t_start, new_part.support.t_start);
|
|
828
|
+
new_part.support.elapsed_ratio =
|
|
829
|
+
new_part.support.elapsed_ratio +
|
|
830
|
+
elapsed_duration / (support_default_duration(new_part.support) * new_part.support.time_ratio);
|
|
831
|
+
|
|
832
|
+
new_parts.push_back(new_part);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
else
|
|
836
|
+
{
|
|
837
|
+
new_parts.push_back(part);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
trajectory.parts = new_parts;
|
|
841
|
+
|
|
842
|
+
return trajectory;
|
|
843
|
+
}
|
|
820
844
|
} // 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);
|
|
@@ -252,5 +253,13 @@ protected:
|
|
|
252
253
|
void plan_dbl_support(Trajectory& trajectory, int part_index);
|
|
253
254
|
void plan_sgl_support(Trajectory& trajectory, int part_index, Trajectory* old_trajectory);
|
|
254
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);
|
|
255
264
|
};
|
|
256
265
|
} // namespace placo::humanoid
|
|
@@ -58,7 +58,8 @@ void WalkTasks::reach_initial_pose(Eigen::Affine3d T_world_left, double feet_spa
|
|
|
58
58
|
double trunk_pitch)
|
|
59
59
|
{
|
|
60
60
|
Eigen::Affine3d T_world_right = T_world_left;
|
|
61
|
-
T_world_right.translation() =
|
|
61
|
+
T_world_right.translation() =
|
|
62
|
+
T_world_left.translation() + T_world_left.rotation() * Eigen::Vector3d(0, -feet_spacing, 0);
|
|
62
63
|
|
|
63
64
|
Eigen::Vector3d com_world = interpolate_frames(T_world_left, T_world_right, .5).translation();
|
|
64
65
|
com_world.z() = com_height;
|
|
@@ -68,7 +69,7 @@ void WalkTasks::reach_initial_pose(Eigen::Affine3d T_world_left, double feet_spa
|
|
|
68
69
|
trunk_orientation_task->R_world_frame = R_world_trunk;
|
|
69
70
|
|
|
70
71
|
update_tasks(T_world_left, T_world_right, com_world, R_world_trunk);
|
|
71
|
-
|
|
72
|
+
|
|
72
73
|
for (int i = 0; i < 100; i++)
|
|
73
74
|
{
|
|
74
75
|
if (i <= 10)
|
|
@@ -129,7 +130,8 @@ void WalkTasks::remove_tasks()
|
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
|
|
132
|
-
void WalkTasks::update_tasks_and_pid(WalkPatternGenerator::Trajectory& trajectory, double t, Eigen::Vector2d dcm,
|
|
133
|
+
void WalkTasks::update_tasks_and_pid(WalkPatternGenerator::Trajectory& trajectory, double t, Eigen::Vector2d dcm,
|
|
134
|
+
double omega, double elapsed)
|
|
133
135
|
{
|
|
134
136
|
Eigen::Vector2d error = dcm - trajectory.get_p_world_DCM(t + com_delay, omega);
|
|
135
137
|
integral = (1.0 - lambda) * integral + error * elapsed;
|
|
@@ -139,7 +141,7 @@ void WalkTasks::update_tasks_and_pid(WalkPatternGenerator::Trajectory& trajector
|
|
|
139
141
|
Eigen::Vector2d com_offset = K_p * error + K_i * integral + K_d * derivative;
|
|
140
142
|
|
|
141
143
|
update_tasks(trajectory.get_T_world_left(t), trajectory.get_T_world_right(t),
|
|
142
|
-
trajectory.get_p_world_CoM(t + com_delay) + Eigen::Vector3d(com_offset[0], com_offset[1], 0.),
|
|
144
|
+
trajectory.get_p_world_CoM(t + com_delay) + Eigen::Vector3d(com_offset[0], com_offset[1], 0.),
|
|
143
145
|
trajectory.get_R_world_trunk(t));
|
|
144
146
|
}
|
|
145
147
|
|
|
@@ -40,7 +40,8 @@ public:
|
|
|
40
40
|
double com_y = 0.;
|
|
41
41
|
|
|
42
42
|
// DCM error PID
|
|
43
|
-
void update_tasks_and_pid(WalkPatternGenerator::Trajectory& trajectory, double t, Eigen::Vector2d dcm, double omega,
|
|
43
|
+
void update_tasks_and_pid(WalkPatternGenerator::Trajectory& trajectory, double t, Eigen::Vector2d dcm, double omega,
|
|
44
|
+
double elapsed);
|
|
44
45
|
|
|
45
46
|
double K_p = 0.;
|
|
46
47
|
double K_i = 0.;
|
|
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
|