placo 0.9.4__tar.gz → 0.9.5__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.4 → placo-0.9.5}/CMakeLists.txt +1 -0
- {placo-0.9.4 → placo-0.9.5}/PKG-INFO +1 -1
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-kinematics.cpp +6 -3
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-walk-pattern-generator.cpp +22 -0
- {placo-0.9.4 → placo-0.9.5}/pyproject.toml +1 -1
- placo-0.9.5/src/placo/humanoid/dummy_walk.cpp +130 -0
- placo-0.9.5/src/placo/humanoid/dummy_walk.h +114 -0
- {placo-0.9.4 → placo-0.9.5}/.clang-format +0 -0
- {placo-0.9.4 → placo-0.9.5}/.gitattributes +0 -0
- {placo-0.9.4 → placo-0.9.5}/.github/workflows/wheels.yml +0 -0
- {placo-0.9.4 → placo-0.9.5}/.gitignore +0 -0
- {placo-0.9.4 → placo-0.9.5}/.readthedocs.yaml +0 -0
- {placo-0.9.4 → placo-0.9.5}/Doxyfile +0 -0
- {placo-0.9.4 → placo-0.9.5}/LICENSE +0 -0
- {placo-0.9.4 → placo-0.9.5}/README.md +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/doxystub.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-eigen.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-footsteps.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-parameters.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-problem.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-robot-wrapper.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-tools.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/expose-utils.hpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/module.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/bindings/module.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/.vscode/settings.json +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/Makefile +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/placo_utils/__init__.py +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/placo_utils/tf.py +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/placo_utils/view.py +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/placo_utils/visualization.py +0 -0
- {placo-0.9.4 → placo-0.9.5}/python/run_tests.sh +0 -0
- {placo-0.9.4 → placo-0.9.5}/scripts/requirements.sh +0 -0
- {placo-0.9.4 → placo-0.9.5}/scripts/robotpkg.sh +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/footsteps_planner.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/humanoid_parameters.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/humanoid_robot.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/humanoid_robot.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/kick.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/lipm.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/walk_pattern_generator.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/walk_pattern_generator.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/walk_tasks.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/humanoid/walk_tasks.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/distance_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/distance_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/joint_space_half_spaces_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/kinematics_solver.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/manipulability_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/manipulability_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/yaw_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/kinematics/yaw_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/model/robot_wrapper.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/model/robot_wrapper.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/expression.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/expression.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/integrator.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/problem.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/problem.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/problem_polynom.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/problem_polynom.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/qp_error.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/sparsity.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/variable.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/problem/variable.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/cubic_spline.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/directions.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/directions.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/polynom.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/polynom.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/prioritized.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/segment.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/segment.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/utils.cpp +0 -0
- {placo-0.9.4 → placo-0.9.5}/src/placo/tools/utils.h +0 -0
- {placo-0.9.4 → placo-0.9.5}/wks.yml +0 -0
|
@@ -24,8 +24,10 @@ void exposeKinematics()
|
|
|
24
24
|
.add_property("dt", &KinematicsSolver::dt, &KinematicsSolver::dt)
|
|
25
25
|
.add_property("N", &KinematicsSolver::N)
|
|
26
26
|
.add_property("scale", &KinematicsSolver::scale)
|
|
27
|
-
.add_property(
|
|
28
|
-
|
|
27
|
+
.add_property("robot",
|
|
28
|
+
make_function(
|
|
29
|
+
+[](const KinematicsSolver& solver) -> model::RobotWrapper& { return solver.robot; },
|
|
30
|
+
return_value_policy<reference_existing_object>()))
|
|
29
31
|
|
|
30
32
|
// Position and CoM task
|
|
31
33
|
.def<PositionTask& (KinematicsSolver::*)(std::string, Eigen::Vector3d)>(
|
|
@@ -211,7 +213,8 @@ void exposeKinematics()
|
|
|
211
213
|
.add_property("joint", &WheelTask::joint)
|
|
212
214
|
.add_property("radius", &WheelTask::radius)
|
|
213
215
|
.add_property("omniwheel", &WheelTask::omniwheel)
|
|
214
|
-
.
|
|
216
|
+
.add_property("T_world_surface", make_getter(&WheelTask::T_world_surface, return_value_policy<return_by_value>()),
|
|
217
|
+
make_setter(&WheelTask::T_world_surface));
|
|
215
218
|
|
|
216
219
|
class__<DistanceTask, bases<Task>>("DistanceTask", init<RobotWrapper::FrameIndex, RobotWrapper::FrameIndex, double>())
|
|
217
220
|
.add_property("frame_a", &DistanceTask::frame_a)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
#include "placo/humanoid/swing_foot_cubic.h"
|
|
12
12
|
#include "placo/humanoid/walk_tasks.h"
|
|
13
13
|
#include "placo/humanoid/lipm.h"
|
|
14
|
+
#include "placo/humanoid/dummy_walk.h"
|
|
14
15
|
#include <Eigen/Dense>
|
|
15
16
|
#include <boost/python.hpp>
|
|
16
17
|
#include <eigenpy/eigen-to-python.hpp>
|
|
@@ -180,4 +181,25 @@ void exposeWalkPatternGenerator()
|
|
|
180
181
|
.add_property("y_var", &LIPM::y_var, &LIPM::y_var)
|
|
181
182
|
.add_property("x", &LIPM::x, &LIPM::x)
|
|
182
183
|
.add_property("y", &LIPM::y, &LIPM::y);
|
|
184
|
+
|
|
185
|
+
class__<DummyWalk>("DummyWalk", init<model::RobotWrapper&>())
|
|
186
|
+
.def("reset", &DummyWalk::reset, (arg("support_left") = false))
|
|
187
|
+
.def("update", &DummyWalk::update)
|
|
188
|
+
.def("next_step", &DummyWalk::next_step)
|
|
189
|
+
.def("update_T_world_support", &DummyWalk::update_T_world_support)
|
|
190
|
+
.add_property("robot", make_function(
|
|
191
|
+
+[](DummyWalk& walk) -> model::RobotWrapper& { return walk.robot; },
|
|
192
|
+
return_value_policy<reference_existing_object>()))
|
|
193
|
+
.add_property("solver", &DummyWalk::solver)
|
|
194
|
+
.def_readwrite("feet_spacing", &DummyWalk::feet_spacing)
|
|
195
|
+
.def_readwrite("trunk_height", &DummyWalk::trunk_height)
|
|
196
|
+
.def_readwrite("trunk_pitch", &DummyWalk::trunk_pitch)
|
|
197
|
+
.def_readwrite("support_left", &DummyWalk::support_left)
|
|
198
|
+
.def_readwrite("lift_height", &DummyWalk::lift_height)
|
|
199
|
+
.add_property("T_world_left", make_getter(&DummyWalk::T_world_left, return_value_policy<return_by_value>()),
|
|
200
|
+
make_setter(&DummyWalk::T_world_left))
|
|
201
|
+
.add_property("T_world_right", make_getter(&DummyWalk::T_world_right, return_value_policy<return_by_value>()),
|
|
202
|
+
make_setter(&DummyWalk::T_world_right))
|
|
203
|
+
.add_property("T_world_next", make_getter(&DummyWalk::T_world_next, return_value_policy<return_by_value>()),
|
|
204
|
+
make_setter(&DummyWalk::T_world_next));
|
|
183
205
|
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#include "placo/humanoid/dummy_walk.h"
|
|
2
|
+
|
|
3
|
+
namespace placo::humanoid
|
|
4
|
+
{
|
|
5
|
+
DummyWalk::DummyWalk(model::RobotWrapper& robot) : robot(robot), solver(robot)
|
|
6
|
+
{
|
|
7
|
+
// Initializing solver
|
|
8
|
+
solver.enable_velocity_limits(true);
|
|
9
|
+
solver.dt = 0.1;
|
|
10
|
+
|
|
11
|
+
left_foot_task = solver.add_frame_task("left_foot");
|
|
12
|
+
left_foot_task.configure("left_foot", "soft", 1.0, 1.0);
|
|
13
|
+
|
|
14
|
+
right_foot_task = solver.add_frame_task("right_foot");
|
|
15
|
+
right_foot_task.configure("right_foot", "soft", 1.0, 1.0);
|
|
16
|
+
|
|
17
|
+
trunk_task = solver.add_frame_task("trunk");
|
|
18
|
+
trunk_task.configure("trunk", "soft", 1.0, 1.0);
|
|
19
|
+
|
|
20
|
+
reset();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
void DummyWalk::reset(bool support_left_)
|
|
24
|
+
{
|
|
25
|
+
// Initializing lift trajectory
|
|
26
|
+
lift_spline.clear();
|
|
27
|
+
lift_spline.add_point(0, 0, 0);
|
|
28
|
+
lift_spline.add_point(0.3, lift_height, 0);
|
|
29
|
+
lift_spline.add_point(0.7, lift_height, 0);
|
|
30
|
+
lift_spline.add_point(1, 0, 0);
|
|
31
|
+
|
|
32
|
+
robot.reset();
|
|
33
|
+
robot.update_kinematics();
|
|
34
|
+
|
|
35
|
+
support_left = support_left_;
|
|
36
|
+
|
|
37
|
+
T_world_left = translation(0, feet_spacing / 2, 0);
|
|
38
|
+
T_world_right = translation(0, -feet_spacing / 2, 0);
|
|
39
|
+
|
|
40
|
+
compute_next_support(0.0, 0.0, 0.0);
|
|
41
|
+
update(0.0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
void DummyWalk::next_step(double dx, double dy, double dtheta)
|
|
45
|
+
{
|
|
46
|
+
if (support_left)
|
|
47
|
+
{
|
|
48
|
+
T_world_right = T_world_next;
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
{
|
|
52
|
+
T_world_left = T_world_next;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
support_left = !support_left;
|
|
56
|
+
compute_next_support(dx, dy, dtheta);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
void DummyWalk::update(double t)
|
|
60
|
+
{
|
|
61
|
+
Eigen::Affine3d T_world_left_ = T_world_left;
|
|
62
|
+
Eigen::Affine3d T_world_right_ = T_world_right;
|
|
63
|
+
|
|
64
|
+
if (support_left)
|
|
65
|
+
{
|
|
66
|
+
T_world_right_ = tools::interpolate_frames(T_world_right, T_world_next, t);
|
|
67
|
+
T_world_right_.translation().z() = lift_spline.pos(t);
|
|
68
|
+
}
|
|
69
|
+
else
|
|
70
|
+
{
|
|
71
|
+
T_world_left_ = tools::interpolate_frames(T_world_left, T_world_next, t);
|
|
72
|
+
T_world_left_.translation().z() = lift_spline.pos(t);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Eigen::Affine3d T_world_mid = placo::tools::interpolate_frames(T_world_left_, T_world_right_, 0.5);
|
|
76
|
+
Eigen::Affine3d T_world_trunk = T_world_mid * translation(0, 0, trunk_height) *
|
|
77
|
+
Eigen::AngleAxisd(trunk_pitch, Eigen::Vector3d::UnitX()) *
|
|
78
|
+
translation(trunk_x_offset, 0, 0);
|
|
79
|
+
|
|
80
|
+
left_foot_task.set_T_world_frame(T_world_left_);
|
|
81
|
+
right_foot_task.set_T_world_frame(T_world_right_);
|
|
82
|
+
trunk_task.set_T_world_frame(T_world_trunk);
|
|
83
|
+
|
|
84
|
+
solve();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
void DummyWalk::update_T_world_support(Eigen::Affine3d T_world_support)
|
|
88
|
+
{
|
|
89
|
+
Eigen::Affine3d T_world_currentSupport = support_left ? T_world_left : T_world_right;
|
|
90
|
+
Eigen::Affine3d T = tools::flatten_on_floor(T_world_support * T_world_currentSupport.inverse());
|
|
91
|
+
|
|
92
|
+
T_world_left = tools::flatten_on_floor(T * T_world_left);
|
|
93
|
+
T_world_right = tools::flatten_on_floor(T * T_world_right);
|
|
94
|
+
T_world_next = tools::flatten_on_floor(T * T_world_next);
|
|
95
|
+
|
|
96
|
+
if (support_left)
|
|
97
|
+
{
|
|
98
|
+
robot.set_T_world_frame("left_foot", T_world_left);
|
|
99
|
+
}
|
|
100
|
+
else
|
|
101
|
+
{
|
|
102
|
+
robot.set_T_world_frame("right_foot", T_world_right);
|
|
103
|
+
}
|
|
104
|
+
robot.update_kinematics();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
void DummyWalk::compute_next_support(double dx, double dy, double dtheta)
|
|
108
|
+
{
|
|
109
|
+
double spacing = support_left ? -feet_spacing : feet_spacing;
|
|
110
|
+
T_world_next = support_left ? T_world_left : T_world_right;
|
|
111
|
+
T_world_next = T_world_next * translation(dx, spacing + dy, 0) * Eigen::AngleAxisd(dtheta, Eigen::Vector3d::UnitZ());
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
Eigen::Affine3d DummyWalk::translation(double x, double y, double z) const
|
|
115
|
+
{
|
|
116
|
+
Eigen::Affine3d T = Eigen::Affine3d::Identity();
|
|
117
|
+
T.translation() = Eigen::Vector3d(x, y, z);
|
|
118
|
+
return T;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
void DummyWalk::solve()
|
|
122
|
+
{
|
|
123
|
+
for (int k = 0; k < 4; k++)
|
|
124
|
+
{
|
|
125
|
+
robot.add_q_noise(1e-3);
|
|
126
|
+
robot.update_kinematics();
|
|
127
|
+
solver.solve(true);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
} // namespace placo::humanoid
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <Eigen/Dense>
|
|
4
|
+
#include "placo/kinematics/kinematics_solver.h"
|
|
5
|
+
#include "placo/tools/cubic_spline.h"
|
|
6
|
+
|
|
7
|
+
namespace placo::humanoid
|
|
8
|
+
{
|
|
9
|
+
class DummyWalk
|
|
10
|
+
{
|
|
11
|
+
public:
|
|
12
|
+
DummyWalk(model::RobotWrapper& robot);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @brief Reset the robot with a given support
|
|
16
|
+
* @param support_left whether the first support is left
|
|
17
|
+
*/
|
|
18
|
+
void reset(bool support_left = false);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @brief Produce the next step, change support foot
|
|
22
|
+
* @param dx dx
|
|
23
|
+
* @param dy dy
|
|
24
|
+
* @param dtheta dtheta
|
|
25
|
+
*/
|
|
26
|
+
void next_step(double dx, double dy, double dtheta);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @brief Updates the internal IK
|
|
30
|
+
* @param t phase in step from 0 to 1
|
|
31
|
+
*/
|
|
32
|
+
void update(double t);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @brief Update the support to a given world pose
|
|
36
|
+
* @param T_world_support
|
|
37
|
+
*/
|
|
38
|
+
void update_T_world_support(Eigen::Affine3d T_world_support);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @brief Robot wrapper
|
|
42
|
+
*/
|
|
43
|
+
model::RobotWrapper& robot;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @brief Kinematics solver
|
|
47
|
+
*/
|
|
48
|
+
kinematics::KinematicsSolver solver;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @brief Feet spacing [m]
|
|
52
|
+
*/
|
|
53
|
+
double feet_spacing = 0.12;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @brief Trunk height [m]
|
|
57
|
+
*/
|
|
58
|
+
double trunk_height = 0.4;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @brief Trunk pitch angle [rad]
|
|
62
|
+
*/
|
|
63
|
+
double trunk_pitch = 0.0;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @brief Trunk x-offset [m]
|
|
67
|
+
*/
|
|
68
|
+
double trunk_x_offset = 0.05;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @brief Lift height [m]
|
|
72
|
+
*/
|
|
73
|
+
double lift_height = 0.04;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @brief Whether the current support is left or right
|
|
77
|
+
*/
|
|
78
|
+
bool support_left;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @brief Cubic splines for the lift trajectory
|
|
82
|
+
*/
|
|
83
|
+
tools::CubicSpline lift_spline;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @brief left foot in world, at begining of current step
|
|
87
|
+
*/
|
|
88
|
+
Eigen::Affine3d T_world_left;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @brief right foot in world, at begining of current step
|
|
92
|
+
*/
|
|
93
|
+
Eigen::Affine3d T_world_right;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @brief Target for the current flying foot (given by support_left)
|
|
97
|
+
*/
|
|
98
|
+
Eigen::Affine3d T_world_next;
|
|
99
|
+
|
|
100
|
+
// Internal tasks
|
|
101
|
+
kinematics::FrameTask left_foot_task;
|
|
102
|
+
kinematics::FrameTask right_foot_task;
|
|
103
|
+
kinematics::FrameTask trunk_task;
|
|
104
|
+
|
|
105
|
+
protected:
|
|
106
|
+
void compute_next_support(double dx, double dy, double dtheta);
|
|
107
|
+
Eigen::Affine3d translation(double x, double y, double z) const;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @brief Solve the internal kinematics problem
|
|
111
|
+
*/
|
|
112
|
+
void solve();
|
|
113
|
+
};
|
|
114
|
+
} // namespace placo::humanoid
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|