placo 0.4.8__tar.gz → 0.5.0__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.4.8 → placo-0.5.0}/PKG-INFO +1 -1
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-eigen.cpp +3 -3
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-kinematics.cpp +2 -2
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-problem.cpp +5 -2
- {placo-0.4.8 → placo-0.5.0}/placo.pyi +13 -6
- {placo-0.4.8 → placo-0.5.0}/pyproject.toml +1 -1
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/humanoid_robot.cpp +13 -17
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/lipm.cpp +2 -2
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/walk_tasks.cpp +8 -10
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/com_polygon_constraint.cpp +0 -1
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/gear_task.cpp +0 -1
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/kinematics_solver.cpp +20 -24
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/kinematics_solver.h +6 -5
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/expression.cpp +7 -5
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/expression.h +1 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/integrator.cpp +11 -5
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/integrator.h +3 -3
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/problem.cpp +1 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/variable.h +7 -0
- {placo-0.4.8 → placo-0.5.0}/.clang-format +0 -0
- {placo-0.4.8 → placo-0.5.0}/.gitattributes +0 -0
- {placo-0.4.8 → placo-0.5.0}/.gitignore +0 -0
- {placo-0.4.8 → placo-0.5.0}/.readthedocs.yaml +0 -0
- {placo-0.4.8 → placo-0.5.0}/CMakeLists.txt +0 -0
- {placo-0.4.8 → placo-0.5.0}/Doxyfile +0 -0
- {placo-0.4.8 → placo-0.5.0}/LICENSE +0 -0
- {placo-0.4.8 → placo-0.5.0}/Makefile +0 -0
- {placo-0.4.8 → placo-0.5.0}/README.md +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-footsteps.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-parameters.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-robot-wrapper.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-tools.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-utils.hpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/expose-walk-pattern-generator.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/module.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/module.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/registry.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/bindings/registry.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/doxygen_parse.py +0 -0
- {placo-0.4.8 → placo-0.5.0}/python/.vscode/settings.json +0 -0
- {placo-0.4.8 → placo-0.5.0}/python/Makefile +0 -0
- {placo-0.4.8 → placo-0.5.0}/python/placo_utils/__init__.py +0 -0
- {placo-0.4.8 → placo-0.5.0}/python/placo_utils/tf.py +0 -0
- {placo-0.4.8 → placo-0.5.0}/python/placo_utils/visualization.py +0 -0
- {placo-0.4.8 → placo-0.5.0}/python/run_tests.sh +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/reaction_ratio_constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/reaction_ratio_constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/torque_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/dynamics/torque_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/foot_trajectory.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/foot_trajectory.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/footsteps_planner.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/footsteps_planner.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/humanoid_parameters.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/humanoid_robot.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/kick.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/kick.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/lipm.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/swing_foot.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/swing_foot.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/swing_foot_cubic.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/swing_foot_quintic.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/walk_pattern_generator.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/walk_pattern_generator.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/humanoid/walk_tasks.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/axis_align_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/axis_align_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/cone_constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/cone_constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/model/robot_wrapper.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/model/robot_wrapper.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/problem.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/qp_error.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/sparsity.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/problem/variable.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/cubic_spline.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/cubic_spline.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/cubic_spline_3d.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/cubic_spline_3d.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/prioritized.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/utils.cpp +0 -0
- {placo-0.4.8 → placo-0.5.0}/src/placo/tools/utils.h +0 -0
- {placo-0.4.8 → placo-0.5.0}/stubs.py +0 -0
- {placo-0.4.8 → placo-0.5.0}/tweak_sdist.sh +0 -0
- {placo-0.4.8 → placo-0.5.0}/wks.yml +0 -0
|
@@ -34,9 +34,9 @@ void exposeEigen()
|
|
|
34
34
|
eigenpy::enableEigenPy();
|
|
35
35
|
|
|
36
36
|
// Ensuring types are exposed
|
|
37
|
-
eigenpy::exposeType<Eigen::Vector2d>();
|
|
38
|
-
eigenpy::exposeType<Eigen::Vector3d>();
|
|
39
|
-
eigenpy::exposeType<Eigen::VectorXd>();
|
|
37
|
+
// eigenpy::exposeType<Eigen::Vector2d>();
|
|
38
|
+
// eigenpy::exposeType<Eigen::Vector3d>();
|
|
39
|
+
// eigenpy::exposeType<Eigen::VectorXd>();
|
|
40
40
|
|
|
41
41
|
// Enables eigen for specific matrix sizes
|
|
42
42
|
eigenpy::enableEigenPySpecific<Eigen::Matrix<double, 4, 1>>();
|
|
@@ -20,7 +20,6 @@ void exposeKinematics()
|
|
|
20
20
|
class_<KinematicsSolver> solver_class =
|
|
21
21
|
class__<KinematicsSolver>("KinematicsSolver", init<RobotWrapper&>())
|
|
22
22
|
.add_property("problem", &KinematicsSolver::problem)
|
|
23
|
-
.add_property("noise", &KinematicsSolver::noise, &KinematicsSolver::noise)
|
|
24
23
|
.add_property("dt", &KinematicsSolver::dt, &KinematicsSolver::dt)
|
|
25
24
|
.add_property("N", &KinematicsSolver::N)
|
|
26
25
|
.add_property("scale", &KinematicsSolver::scale)
|
|
@@ -111,7 +110,8 @@ void exposeKinematics()
|
|
|
111
110
|
.def<void (KinematicsSolver::*)(Task&)>("remove_task", &KinematicsSolver::remove_task)
|
|
112
111
|
.def<void (KinematicsSolver::*)(FrameTask&)>("remove_task", &KinematicsSolver::remove_task)
|
|
113
112
|
.def("remove_constraint", &KinematicsSolver::remove_constraint)
|
|
114
|
-
.def("solve", &KinematicsSolver::solve)
|
|
113
|
+
.def("solve", &KinematicsSolver::solve)
|
|
114
|
+
.def("add_q_noise", &KinematicsSolver::add_q_noise);
|
|
115
115
|
|
|
116
116
|
class__<Task, bases<tools::Prioritized>, boost::noncopyable>("Task", no_init)
|
|
117
117
|
.add_property(
|
|
@@ -22,6 +22,7 @@ using namespace placo;
|
|
|
22
22
|
using namespace placo::problem;
|
|
23
23
|
|
|
24
24
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(expr_overloads, expr, 0, 2);
|
|
25
|
+
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(integrator_expr_overloads, expr, 1, 2);
|
|
25
26
|
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(configure_overloads, configure, 1, 2);
|
|
26
27
|
|
|
27
28
|
void exposeProblem()
|
|
@@ -78,7 +79,7 @@ void exposeProblem()
|
|
|
78
79
|
.def("in_polygon_xy", &PolygonConstraint::in_polygon_xy)
|
|
79
80
|
.staticmethod("in_polygon_xy");
|
|
80
81
|
|
|
81
|
-
class__<Integrator>("Integrator", init<Variable&,
|
|
82
|
+
class__<Integrator>("Integrator", init<Variable&, Expression, int, double>())
|
|
82
83
|
.def(init<Variable&, Eigen::VectorXd, Eigen::MatrixXd, double>())
|
|
83
84
|
.def("upper_shift_matrix", &Integrator::upper_shift_matrix)
|
|
84
85
|
.staticmethod("upper_shift_matrix")
|
|
@@ -91,7 +92,7 @@ void exposeProblem()
|
|
|
91
92
|
"B", +[](const Integrator& i) { return i.B; })
|
|
92
93
|
.add_property(
|
|
93
94
|
"final_transition_matrix", +[](const Integrator& i) { return i.final_transition_matrix; })
|
|
94
|
-
.def("expr", &Integrator::expr)
|
|
95
|
+
.def("expr", &Integrator::expr, integrator_expr_overloads())
|
|
95
96
|
.def("expr_t", &Integrator::expr_t)
|
|
96
97
|
.def("value", &Integrator::value)
|
|
97
98
|
.def("get_trajectory", &Integrator::get_trajectory);
|
|
@@ -177,4 +178,6 @@ void exposeProblem()
|
|
|
177
178
|
// Aggregation
|
|
178
179
|
.def("sum", &Expression::sum)
|
|
179
180
|
.def("mean", &Expression::mean);
|
|
181
|
+
|
|
182
|
+
implicitly_convertible<Eigen::VectorXd, Expression>();
|
|
180
183
|
}
|
|
@@ -2383,7 +2383,7 @@ class Expression:
|
|
|
2383
2383
|
|
|
2384
2384
|
def __init__(
|
|
2385
2385
|
self: Expression,
|
|
2386
|
-
|
|
2386
|
+
v: numpy.ndarray, # const Eigen::VectorXd &
|
|
2387
2387
|
|
|
2388
2388
|
) -> any:
|
|
2389
2389
|
...
|
|
@@ -3917,7 +3917,7 @@ class Integrator:
|
|
|
3917
3917
|
def __init__(
|
|
3918
3918
|
self: Integrator,
|
|
3919
3919
|
variable: Variable, # placo::problem::Variable
|
|
3920
|
-
X0:
|
|
3920
|
+
X0: Expression, # placo::problem::Expression
|
|
3921
3921
|
order: int, # int
|
|
3922
3922
|
dt: float, # double
|
|
3923
3923
|
|
|
@@ -4383,6 +4383,17 @@ class KinematicsSolver:
|
|
|
4383
4383
|
:return: position task"""
|
|
4384
4384
|
...
|
|
4385
4385
|
|
|
4386
|
+
def add_q_noise(
|
|
4387
|
+
self: KinematicsSolver,
|
|
4388
|
+
noise: float = 1e-5, # double
|
|
4389
|
+
|
|
4390
|
+
) -> None:
|
|
4391
|
+
"""Adds some noise on the configuration of the robot (q)
|
|
4392
|
+
|
|
4393
|
+
|
|
4394
|
+
:param noise: noise level, expressed in ratio of the joint limits"""
|
|
4395
|
+
...
|
|
4396
|
+
|
|
4386
4397
|
def add_regularization_task(
|
|
4387
4398
|
self: KinematicsSolver,
|
|
4388
4399
|
magnitude: float = 1e-6, # double
|
|
@@ -4532,10 +4543,6 @@ class KinematicsSolver:
|
|
|
4532
4543
|
"""Decides if the floating base should be masked."""
|
|
4533
4544
|
...
|
|
4534
4545
|
|
|
4535
|
-
noise: float # double
|
|
4536
|
-
"""Some configuration noise added before solving.
|
|
4537
|
-
"""
|
|
4538
|
-
|
|
4539
4546
|
problem: Problem # placo::problem::Problem
|
|
4540
4547
|
"""The underlying QP problem.
|
|
4541
4548
|
"""
|
|
@@ -158,15 +158,16 @@ Eigen::VectorXd HumanoidRobot::get_torques(Eigen::VectorXd acc_a, Eigen::VectorX
|
|
|
158
158
|
|
|
159
159
|
// Mass matrix and non linear effects
|
|
160
160
|
Eigen::MatrixXd M = mass_matrix();
|
|
161
|
-
Eigen::MatrixXd
|
|
161
|
+
Eigen::MatrixXd M_bf = M.topLeftCorner(6, 6);
|
|
162
|
+
Eigen::MatrixXd M_a = M.topRightCorner(6, model.nv - 6);
|
|
162
163
|
|
|
163
164
|
Eigen::VectorXd h = use_non_linear_effects ? non_linear_effects() : generalized_gravity();
|
|
164
|
-
Eigen::VectorXd
|
|
165
|
+
Eigen::VectorXd h_bf = h.head(6);
|
|
165
166
|
|
|
166
167
|
// Unactuated DoFs acceleration (floating base)
|
|
167
|
-
Eigen::VectorXd
|
|
168
|
-
Eigen::VectorXd acc(
|
|
169
|
-
acc <<
|
|
168
|
+
Eigen::VectorXd acc_bf = M_bf.inverse() * ((J_c * contact_forces).head(6) - h_bf - M_a * acc_a);
|
|
169
|
+
Eigen::VectorXd acc(acc_bf.size() + acc_a.size());
|
|
170
|
+
acc << acc_bf, acc_a;
|
|
170
171
|
|
|
171
172
|
return M * acc + h - J_c * contact_forces;
|
|
172
173
|
}
|
|
@@ -259,23 +260,18 @@ void HumanoidRobot::read_from_histories(rhoban_utils::HistoryCollection& histori
|
|
|
259
260
|
// Setting the floating base velocity (TODO : check if it is correct)
|
|
260
261
|
if (qd_joints.size() > 1)
|
|
261
262
|
{
|
|
262
|
-
std::cout << "Setting floating base velocity" << std::endl;
|
|
263
|
-
std::cout << "NOT TESTED !!!" << std::endl;
|
|
264
|
-
|
|
265
|
-
Eigen::Matrix3d R_support_trunk = get_T_a_b(support_frame(), trunk).linear();
|
|
266
263
|
Eigen::Vector3d omega_trunk = Eigen::Vector3d(histories.number("gyro_x")->interpolate(timestamp),
|
|
267
264
|
histories.number("gyro_y")->interpolate(timestamp),
|
|
268
265
|
histories.number("gyro_z")->interpolate(timestamp));
|
|
269
|
-
Eigen::
|
|
266
|
+
Eigen::VectorXd b(6);
|
|
267
|
+
b << Eigen::Vector3d::Zero(), omega_trunk;
|
|
270
268
|
|
|
271
|
-
Eigen::
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
Eigen::MatrixXd
|
|
275
|
-
Eigen::MatrixXd J_support_bf = J_support.leftCols(6);
|
|
276
|
-
Eigen::MatrixXd J_support_a = J_support.rightCols(model.nv - 6);
|
|
269
|
+
Eigen::MatrixXd J(6, model.nv);
|
|
270
|
+
J << frame_jacobian(support_frame(), pinocchio::ReferenceFrame::LOCAL).topRows(3), frame_jacobian("trunk", "local").bottomRows(3);
|
|
271
|
+
Eigen::MatrixXd J_bf = J.leftCols(6);
|
|
272
|
+
Eigen::MatrixXd J_a = J.rightCols(model.nv - 6);
|
|
277
273
|
|
|
278
|
-
Eigen::VectorXd qd_bf =
|
|
274
|
+
Eigen::VectorXd qd_bf = J_bf.inverse() * (b - J_a * qd_joints);
|
|
279
275
|
for (int i=0; i<6; i++)
|
|
280
276
|
{
|
|
281
277
|
state.qd[i] = qd_bf[i];
|
|
@@ -47,8 +47,8 @@ LIPM::LIPM(Problem& problem, int timesteps, double dt, Eigen::Vector2d initial_p
|
|
|
47
47
|
x_var = &problem.add_variable(timesteps);
|
|
48
48
|
y_var = &problem.add_variable(timesteps);
|
|
49
49
|
|
|
50
|
-
x = Integrator(*x_var, Eigen::Vector3d(initial_pos.x(), initial_vel.x(), initial_acc.x()), 3, dt);
|
|
51
|
-
y = Integrator(*y_var, Eigen::Vector3d(initial_pos.y(), initial_vel.y(), initial_acc.y()), 3, dt);
|
|
50
|
+
x = Integrator(*x_var, Eigen::VectorXd(Eigen::Vector3d(initial_pos.x(), initial_vel.x(), initial_acc.x())), 3, dt);
|
|
51
|
+
y = Integrator(*y_var, Eigen::VectorXd(Eigen::Vector3d(initial_pos.y(), initial_vel.y(), initial_acc.y())), 3, dt);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
Expression LIPM::pos(int timestep)
|
|
@@ -6,20 +6,19 @@ namespace placo::humanoid
|
|
|
6
6
|
using namespace placo::kinematics;
|
|
7
7
|
using namespace placo::tools;
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
void WalkTasks::initialize_tasks(KinematicsSolver* solver_, HumanoidRobot* robot_)
|
|
11
10
|
{
|
|
12
11
|
robot = robot_;
|
|
13
12
|
solver = solver_;
|
|
14
13
|
|
|
15
14
|
left_foot_task = solver->add_frame_task("left_foot", robot->get_T_world_left());
|
|
16
|
-
left_foot_task.configure("left_foot", scaled?"scaled":"soft", 1., 1.);
|
|
15
|
+
left_foot_task.configure("left_foot", scaled ? "scaled" : "soft", 1., 1.);
|
|
17
16
|
|
|
18
17
|
right_foot_task = solver->add_frame_task("right_foot", robot->get_T_world_right());
|
|
19
|
-
right_foot_task.configure("right_foot", scaled?"scaled":"soft", 1., 1.);
|
|
18
|
+
right_foot_task.configure("right_foot", scaled ? "scaled" : "soft", 1., 1.);
|
|
20
19
|
|
|
21
20
|
trunk_orientation_task = &solver->add_orientation_task("trunk", robot->get_T_world_trunk().rotation());
|
|
22
|
-
trunk_orientation_task->configure("trunk", scaled?"scaled":"soft", 1.);
|
|
21
|
+
trunk_orientation_task->configure("trunk", scaled ? "scaled" : "soft", 1.);
|
|
23
22
|
|
|
24
23
|
update_com_task();
|
|
25
24
|
}
|
|
@@ -36,7 +35,7 @@ void WalkTasks::update_com_task()
|
|
|
36
35
|
if (trunk_task == nullptr)
|
|
37
36
|
{
|
|
38
37
|
trunk_task = &solver->add_position_task("trunk", robot->get_T_world_frame("trunk").translation());
|
|
39
|
-
trunk_task->configure("trunk", scaled?"scaled":"soft", 1.);
|
|
38
|
+
trunk_task->configure("trunk", scaled ? "scaled" : "soft", 1.);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
else
|
|
@@ -49,7 +48,7 @@ void WalkTasks::update_com_task()
|
|
|
49
48
|
if (com_task == nullptr)
|
|
50
49
|
{
|
|
51
50
|
com_task = &solver->add_com_task(robot->com_world());
|
|
52
|
-
com_task->configure("com", scaled?"scaled":"soft", 1.);
|
|
51
|
+
com_task->configure("com", scaled ? "scaled" : "soft", 1.);
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
}
|
|
@@ -69,13 +68,12 @@ void WalkTasks::reach_initial_pose(Eigen::Affine3d T_world_left, double feet_spa
|
|
|
69
68
|
|
|
70
69
|
update_tasks(T_world_left, T_world_right, com_world, R_world_trunk);
|
|
71
70
|
|
|
72
|
-
// Adding strong noise to avoid singularities
|
|
73
|
-
solver->noise = 0.1;
|
|
74
71
|
for (int i = 0; i < 100; i++)
|
|
75
72
|
{
|
|
76
|
-
if (i
|
|
73
|
+
if (i <= 10)
|
|
77
74
|
{
|
|
78
|
-
|
|
75
|
+
// Adding strong noise to avoid singularities
|
|
76
|
+
solver->add_q_noise(0.1);
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
robot->update_kinematics();
|
|
@@ -28,7 +28,6 @@ void CoMPolygonConstraint::add_constraint(placo::problem::Problem& problem)
|
|
|
28
28
|
// Future DCM is c + J dq + J dq / (dt * w)
|
|
29
29
|
// = c + J dq (1 + 1 / (dt * w))
|
|
30
30
|
com_xy.A *= (1. + 1. / (solver->dt * omega));
|
|
31
|
-
std::cout << "Coef: " << (1. + 1. / (solver->dt * omega)) << std::endl;
|
|
32
31
|
}
|
|
33
32
|
com_xy.b = com;
|
|
34
33
|
|
|
@@ -244,6 +244,23 @@ void KinematicsSolver::compute_limits_inequalities()
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
void KinematicsSolver::add_q_noise(double noise)
|
|
248
|
+
{
|
|
249
|
+
auto q_random = pinocchio::randomConfiguration(robot.model);
|
|
250
|
+
|
|
251
|
+
// Adding some noise in direction of a random configuration (except floating base)
|
|
252
|
+
for (int k = 7; k < robot.model.nq; k++)
|
|
253
|
+
{
|
|
254
|
+
if (robot.model.lowerPositionLimit(k) == std::numeric_limits<double>::lowest() ||
|
|
255
|
+
robot.model.upperPositionLimit(k) == std::numeric_limits<double>::max())
|
|
256
|
+
{
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
robot.state.q(k) += (q_random(k) - robot.state.q(k)) * noise;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
247
264
|
Eigen::VectorXd KinematicsSolver::solve(bool apply)
|
|
248
265
|
{
|
|
249
266
|
// Ensure variable is created
|
|
@@ -255,26 +272,6 @@ Eigen::VectorXd KinematicsSolver::solve(bool apply)
|
|
|
255
272
|
// Clear previously created constraints
|
|
256
273
|
problem.clear_constraints();
|
|
257
274
|
|
|
258
|
-
// Adding some random noise
|
|
259
|
-
auto q_save = robot.state.q;
|
|
260
|
-
|
|
261
|
-
if (noise > 0)
|
|
262
|
-
{
|
|
263
|
-
auto q_random = pinocchio::randomConfiguration(robot.model);
|
|
264
|
-
|
|
265
|
-
// Adding some noise in direction of a random configuration (except floating base)
|
|
266
|
-
for (int k = 7; k < robot.model.nq; k++)
|
|
267
|
-
{
|
|
268
|
-
if (robot.model.lowerPositionLimit(k) == std::numeric_limits<double>::lowest() ||
|
|
269
|
-
robot.model.upperPositionLimit(k) == std::numeric_limits<double>::max())
|
|
270
|
-
{
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
robot.state.q(k) += (q_random(k) - robot.state.q(k)) * noise;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
275
|
has_scaling = false;
|
|
279
276
|
|
|
280
277
|
// Updating all the task matrices
|
|
@@ -359,6 +356,9 @@ Eigen::VectorXd KinematicsSolver::solve(bool apply)
|
|
|
359
356
|
|
|
360
357
|
if (apply)
|
|
361
358
|
{
|
|
359
|
+
// Initial robot configuration
|
|
360
|
+
auto q_save = robot.state.q;
|
|
361
|
+
|
|
362
362
|
robot.state.q = pinocchio::integrate(robot.model, robot.state.q, qd_sol);
|
|
363
363
|
if (dt > 0)
|
|
364
364
|
{
|
|
@@ -367,10 +367,6 @@ Eigen::VectorXd KinematicsSolver::solve(bool apply)
|
|
|
367
367
|
robot.state.qdd = (robot.state.qd - qd_save) / dt;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
else
|
|
371
|
-
{
|
|
372
|
-
robot.state.q = q_save;
|
|
373
|
-
}
|
|
374
370
|
|
|
375
371
|
return qd_sol;
|
|
376
372
|
}
|
|
@@ -299,6 +299,12 @@ public:
|
|
|
299
299
|
*/
|
|
300
300
|
Eigen::VectorXd solve(bool apply = false);
|
|
301
301
|
|
|
302
|
+
/**
|
|
303
|
+
* @brief Adds some noise on the configuration of the robot (q)
|
|
304
|
+
* @param noise noise level, expressed in ratio of the joint limits
|
|
305
|
+
*/
|
|
306
|
+
void add_q_noise(double noise = 1e-5);
|
|
307
|
+
|
|
302
308
|
/**
|
|
303
309
|
* @brief Masks (disables a DoF) from being used by the QP solver (it can't provide speed)
|
|
304
310
|
* @param dof the dof name
|
|
@@ -379,11 +385,6 @@ public:
|
|
|
379
385
|
*/
|
|
380
386
|
int N;
|
|
381
387
|
|
|
382
|
-
/**
|
|
383
|
-
* @brief Some configuration noise added before solving
|
|
384
|
-
*/
|
|
385
|
-
double noise = 1e-5;
|
|
386
|
-
|
|
387
388
|
/**
|
|
388
389
|
* @brief solver dt (for speeds limiting)
|
|
389
390
|
*/
|
|
@@ -12,11 +12,7 @@ Expression::Expression()
|
|
|
12
12
|
|
|
13
13
|
Expression Expression::from_vector(const Eigen::VectorXd& v)
|
|
14
14
|
{
|
|
15
|
-
Expression
|
|
16
|
-
e.A = Eigen::MatrixXd(v.rows(), 0);
|
|
17
|
-
e.b = v;
|
|
18
|
-
|
|
19
|
-
return e;
|
|
15
|
+
return Expression(v);
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
Expression Expression::from_double(const double& value)
|
|
@@ -35,6 +31,12 @@ Expression::Expression(const Expression& other)
|
|
|
35
31
|
b = other.b;
|
|
36
32
|
}
|
|
37
33
|
|
|
34
|
+
Expression::Expression(const Eigen::VectorXd& v)
|
|
35
|
+
{
|
|
36
|
+
A = Eigen::MatrixXd(v.rows(), 0);
|
|
37
|
+
b = v;
|
|
38
|
+
}
|
|
39
|
+
|
|
38
40
|
bool Expression::is_scalar() const
|
|
39
41
|
{
|
|
40
42
|
return rows() == 1 && cols() == 0;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <iostream>
|
|
3
3
|
#include <unsupported/Eigen/MatrixFunctions>
|
|
4
4
|
#include "placo/problem/integrator.h"
|
|
5
|
+
#include "placo/problem/problem.h"
|
|
5
6
|
|
|
6
7
|
namespace placo::problem
|
|
7
8
|
{
|
|
@@ -46,7 +47,7 @@ Integrator::Integrator()
|
|
|
46
47
|
{
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
Integrator::Integrator(Variable& variable_,
|
|
50
|
+
Integrator::Integrator(Variable& variable_, Expression X0, Eigen::MatrixXd system_matrix, double dt)
|
|
50
51
|
: variable(&variable_), X0(X0), dt(dt), M(system_matrix)
|
|
51
52
|
{
|
|
52
53
|
order = system_matrix.rows() - 1;
|
|
@@ -73,9 +74,13 @@ Integrator::Integrator(Variable& variable_, Eigen::VectorXd X0, Eigen::MatrixXd
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
Integrator::Integrator(Variable& variable_,
|
|
77
|
+
Integrator::Integrator(Variable& variable_, Expression X0, int order, double dt)
|
|
77
78
|
: Integrator(variable_, X0, upper_shift_matrix(order), dt)
|
|
78
79
|
{
|
|
80
|
+
if (X0.rows() != order)
|
|
81
|
+
{
|
|
82
|
+
throw std::runtime_error("Integrator: X0 should have " + std::to_string(order) + " rows (same as order)");
|
|
83
|
+
}
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
Integrator::~Integrator()
|
|
@@ -140,16 +145,17 @@ Expression Integrator::expr(int step, int diff)
|
|
|
140
145
|
e.A = Eigen::MatrixXd(rows, variable->k_end);
|
|
141
146
|
e.A.setZero();
|
|
142
147
|
e.b = Eigen::VectorXd(rows);
|
|
148
|
+
e.b.setZero();
|
|
143
149
|
|
|
144
150
|
if (diff == -1)
|
|
145
151
|
{
|
|
146
152
|
e.A.block(0, variable->k_start, rows, step) = final_transition_matrix.block(0, N - step, rows, step);
|
|
147
|
-
e
|
|
153
|
+
e = e + a_powers[step] * X0;
|
|
148
154
|
}
|
|
149
155
|
else
|
|
150
156
|
{
|
|
151
157
|
e.A.block(0, variable->k_start, 1, step) = final_transition_matrix.block(diff, N - step, 1, step);
|
|
152
|
-
e
|
|
158
|
+
e = e + (a_powers[step] * X0).slice(diff, 1);
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
return e;
|
|
@@ -222,7 +228,7 @@ void Integrator::update_trajectory()
|
|
|
222
228
|
trajectory.variable_value = variable->value;
|
|
223
229
|
|
|
224
230
|
// Updating keyframes
|
|
225
|
-
Eigen::VectorXd X = X0;
|
|
231
|
+
Eigen::VectorXd X = X0.value(variable->problem->x);
|
|
226
232
|
trajectory.keyframes[0] = X;
|
|
227
233
|
|
|
228
234
|
for (int k = 1; k <= variable->size(); k++)
|
|
@@ -75,7 +75,7 @@ public:
|
|
|
75
75
|
* @param order order
|
|
76
76
|
* @param dt delta time
|
|
77
77
|
*/
|
|
78
|
-
Integrator(Variable& variable,
|
|
78
|
+
Integrator(Variable& variable, Expression X0, int order, double dt);
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* @brief Creates an integrator able to build expressions and values over a decision variable. A custom continuous
|
|
@@ -90,7 +90,7 @@ public:
|
|
|
90
90
|
* @param dt delta time
|
|
91
91
|
* @pyignore
|
|
92
92
|
*/
|
|
93
|
-
Integrator(Variable& variable,
|
|
93
|
+
Integrator(Variable& variable, Expression X0, Eigen::MatrixXd system_matrix, double dt);
|
|
94
94
|
|
|
95
95
|
virtual ~Integrator();
|
|
96
96
|
|
|
@@ -173,7 +173,7 @@ public:
|
|
|
173
173
|
/**
|
|
174
174
|
* @brief Initial state
|
|
175
175
|
*/
|
|
176
|
-
|
|
176
|
+
Expression X0;
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
179
|
* @brief Caching the discrete matrix for the last step
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
namespace placo::problem
|
|
7
7
|
{
|
|
8
|
+
class Problem;
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* @brief Represents a variable in a \ref Problem
|
|
10
12
|
*/
|
|
@@ -44,5 +46,10 @@ public:
|
|
|
44
46
|
* @brief Variable version, incremented by \ref Problem after a solve
|
|
45
47
|
*/
|
|
46
48
|
int version = 0;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @brief Variable's problem
|
|
52
|
+
*/
|
|
53
|
+
Problem* problem = nullptr;
|
|
47
54
|
};
|
|
48
55
|
}; // namespace placo::problem
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|