placo 0.3.6__tar.gz → 0.3.8__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.3.6 → placo-0.3.8}/PKG-INFO +2 -1
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-robot-wrapper.cpp +2 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-tools.cpp +0 -1
- {placo-0.3.6 → placo-0.3.8}/placo.pyi +56 -15
- {placo-0.3.6 → placo-0.3.8}/pyproject.toml +2 -1
- {placo-0.3.6 → placo-0.3.8}/python/placo_utils/visualization.py +88 -55
- {placo-0.3.6 → placo-0.3.8}/src/placo/model/robot_wrapper.cpp +10 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/model/robot_wrapper.h +16 -1
- {placo-0.3.6 → placo-0.3.8}/src/placo/tools/utils.cpp +0 -8
- {placo-0.3.6 → placo-0.3.8}/src/placo/tools/utils.h +0 -7
- {placo-0.3.6 → placo-0.3.8}/.clang-format +0 -0
- {placo-0.3.6 → placo-0.3.8}/.gitattributes +0 -0
- {placo-0.3.6 → placo-0.3.8}/.gitignore +0 -0
- {placo-0.3.6 → placo-0.3.8}/.readthedocs.yaml +0 -0
- {placo-0.3.6 → placo-0.3.8}/CMakeLists.txt +0 -0
- {placo-0.3.6 → placo-0.3.8}/Doxyfile +0 -0
- {placo-0.3.6 → placo-0.3.8}/LICENSE +0 -0
- {placo-0.3.6 → placo-0.3.8}/Makefile +0 -0
- {placo-0.3.6 → placo-0.3.8}/README.md +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-dynamics.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-eigen.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-footsteps.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-kinematics.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-parameters.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-problem.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-trajectory.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-utils.hpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/expose-walk-pattern-generator.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/module.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/module.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/registry.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/bindings/registry.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/doxygen_parse.py +0 -0
- {placo-0.3.6 → placo-0.3.8}/python/Makefile +0 -0
- {placo-0.3.6 → placo-0.3.8}/python/placo_utils/__init__.py +0 -0
- {placo-0.3.6 → placo-0.3.8}/python/placo_utils/tf.py +0 -0
- {placo-0.3.6 → placo-0.3.8}/python/run_tests.sh +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/com_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/com_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/contacts.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/contacts.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/dynamics_solver.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/dynamics_solver.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/frame_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/frame_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/gear_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/gear_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/joints_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/joints_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/orientation_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/orientation_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/position_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/position_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/reaction_ratio_constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/reaction_ratio_constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/relative_frame_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/relative_frame_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/relative_orientation_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/relative_position_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/relative_position_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/dynamics/task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/footsteps/footsteps_planner.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/footsteps/footsteps_planner.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/footsteps/footsteps_planner_naive.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/footsteps/footsteps_planner_naive.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/footsteps/footsteps_planner_repetitive.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/footsteps/footsteps_planner_repetitive.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/com_polygon_constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/com_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/com_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/distance_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/distance_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/frame_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/frame_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/gear_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/gear_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/joints_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/joints_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/kinematics_solver.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/kinematics_solver.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/orientation_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/orientation_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/position_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/position_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/regularization_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/regularization_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/relative_frame_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/relative_frame_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/relative_orientation_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/relative_position_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/relative_position_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/wheel_task.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/kinematics/wheel_task.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/model/humanoid_parameters.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/model/humanoid_parameters.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/model/humanoid_robot.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/model/humanoid_robot.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/planning/lipm.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/planning/lipm.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/planning/walk_pattern_generator.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/planning/walk_pattern_generator.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/planning/walk_tasks.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/planning/walk_tasks.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/expression.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/expression.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/integrator.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/integrator.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/polygon_constraint.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/polygon_constraint.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/problem.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/problem.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/qp_error.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/qp_error.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/sparsity.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/sparsity.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/variable.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/problem/variable.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/tools/axises_mask.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/tools/axises_mask.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/tools/prioritized.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/tools/prioritized.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/cubic_spline.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/cubic_spline.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/cubic_spline_3d.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/cubic_spline_3d.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/foot_trajectory.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/foot_trajectory.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/kick.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/kick.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/swing_foot.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/swing_foot.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/swing_foot_cubic.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/swing_foot_cubic.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/swing_foot_quintic.cpp +0 -0
- {placo-0.3.6 → placo-0.3.8}/src/placo/trajectory/swing_foot_quintic.h +0 -0
- {placo-0.3.6 → placo-0.3.8}/stubs.py +0 -0
- {placo-0.3.6 → placo-0.3.8}/tweak_sdist.sh +0 -0
- {placo-0.3.6 → placo-0.3.8}/wks.yml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: placo
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: PlaCo: Rhoban Planning and Control
|
|
5
5
|
Requires-Python: >= 3.8
|
|
6
6
|
License-Expression: MIT
|
|
@@ -14,6 +14,7 @@ Requires-Dist: pin >= 2.6.18, < 3
|
|
|
14
14
|
Requires-Dist: rhoban-cmeel-jsoncpp
|
|
15
15
|
Requires-Dist: meshcat
|
|
16
16
|
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: ischedule
|
|
17
18
|
Provides-Extra: build
|
|
18
19
|
Requires-Dist: pin[build] >= 2.6.18, < 3 ; extra == "build"
|
|
19
20
|
Requires-Dist: cmeel-urdfdom[build] ; extra == "build"
|
|
@@ -33,6 +33,8 @@ void exposeRobotType(class_<RobotType, W1>& type)
|
|
|
33
33
|
.def("get_joint", &RobotType::get_joint)
|
|
34
34
|
.def("set_joint_velocity", &RobotType::set_joint_velocity)
|
|
35
35
|
.def("get_joint_velocity", &RobotType::get_joint_velocity)
|
|
36
|
+
.def("set_joint_acceleration", &RobotType::set_joint_acceleration)
|
|
37
|
+
.def("get_joint_acceleration", &RobotType::get_joint_acceleration)
|
|
36
38
|
.def("set_velocity_limit", &RobotType::set_velocity_limit)
|
|
37
39
|
.def("set_velocity_limits", &RobotType::set_velocity_limits)
|
|
38
40
|
.def("set_torque_limit", &RobotType::set_torque_limit)
|
|
@@ -3615,6 +3615,19 @@ class HumanoidRobot:
|
|
|
3615
3615
|
:return: the joint current (inner state) value (e.g rad for revolute or meters for prismatic)"""
|
|
3616
3616
|
...
|
|
3617
3617
|
|
|
3618
|
+
def get_joint_acceleration(
|
|
3619
|
+
self: HumanoidRobot,
|
|
3620
|
+
name: str, # const std::string &
|
|
3621
|
+
|
|
3622
|
+
) -> float:
|
|
3623
|
+
"""Gets the joint acceleration from state.qd.
|
|
3624
|
+
|
|
3625
|
+
|
|
3626
|
+
:param name: joint name
|
|
3627
|
+
|
|
3628
|
+
:return: joint acceleration"""
|
|
3629
|
+
...
|
|
3630
|
+
|
|
3618
3631
|
def get_joint_offset(
|
|
3619
3632
|
self: HumanoidRobot,
|
|
3620
3633
|
name: str, # const std::string &
|
|
@@ -3797,6 +3810,20 @@ class HumanoidRobot:
|
|
|
3797
3810
|
:param value: joint value (e.g rad for revolute or meters for prismatic)"""
|
|
3798
3811
|
...
|
|
3799
3812
|
|
|
3813
|
+
def set_joint_acceleration(
|
|
3814
|
+
self: HumanoidRobot,
|
|
3815
|
+
name: str, # const std::string &
|
|
3816
|
+
value: float, # double
|
|
3817
|
+
|
|
3818
|
+
) -> None:
|
|
3819
|
+
"""Sets the joint acceleration in state.qd.
|
|
3820
|
+
|
|
3821
|
+
|
|
3822
|
+
:param name: joint name
|
|
3823
|
+
|
|
3824
|
+
:param value: joint acceleration"""
|
|
3825
|
+
...
|
|
3826
|
+
|
|
3800
3827
|
def set_joint_limits(
|
|
3801
3828
|
self: HumanoidRobot,
|
|
3802
3829
|
name: str, # const std::string &
|
|
@@ -3926,7 +3953,7 @@ class HumanoidRobot:
|
|
|
3926
3953
|
self: HumanoidRobot,
|
|
3927
3954
|
|
|
3928
3955
|
) -> None:
|
|
3929
|
-
"""Update
|
|
3956
|
+
"""Update internal computation for kinematics (frames, jacobian). This method should be called when the robot state has changed."""
|
|
3930
3957
|
...
|
|
3931
3958
|
|
|
3932
3959
|
def update_support_side(
|
|
@@ -6007,6 +6034,19 @@ class RobotWrapper:
|
|
|
6007
6034
|
:return: the joint current (inner state) value (e.g rad for revolute or meters for prismatic)"""
|
|
6008
6035
|
...
|
|
6009
6036
|
|
|
6037
|
+
def get_joint_acceleration(
|
|
6038
|
+
self: RobotWrapper,
|
|
6039
|
+
name: str, # const std::string &
|
|
6040
|
+
|
|
6041
|
+
) -> float:
|
|
6042
|
+
"""Gets the joint acceleration from state.qd.
|
|
6043
|
+
|
|
6044
|
+
|
|
6045
|
+
:param name: joint name
|
|
6046
|
+
|
|
6047
|
+
:return: joint acceleration"""
|
|
6048
|
+
...
|
|
6049
|
+
|
|
6010
6050
|
def get_joint_offset(
|
|
6011
6051
|
self: RobotWrapper,
|
|
6012
6052
|
name: str, # const std::string &
|
|
@@ -6176,6 +6216,20 @@ class RobotWrapper:
|
|
|
6176
6216
|
:param value: joint value (e.g rad for revolute or meters for prismatic)"""
|
|
6177
6217
|
...
|
|
6178
6218
|
|
|
6219
|
+
def set_joint_acceleration(
|
|
6220
|
+
self: RobotWrapper,
|
|
6221
|
+
name: str, # const std::string &
|
|
6222
|
+
value: float, # double
|
|
6223
|
+
|
|
6224
|
+
) -> None:
|
|
6225
|
+
"""Sets the joint acceleration in state.qd.
|
|
6226
|
+
|
|
6227
|
+
|
|
6228
|
+
:param name: joint name
|
|
6229
|
+
|
|
6230
|
+
:param value: joint acceleration"""
|
|
6231
|
+
...
|
|
6232
|
+
|
|
6179
6233
|
def set_joint_limits(
|
|
6180
6234
|
self: RobotWrapper,
|
|
6181
6235
|
name: str, # const std::string &
|
|
@@ -6301,7 +6355,7 @@ class RobotWrapper:
|
|
|
6301
6355
|
self: RobotWrapper,
|
|
6302
6356
|
|
|
6303
6357
|
) -> None:
|
|
6304
|
-
"""Update
|
|
6358
|
+
"""Update internal computation for kinematics (frames, jacobian). This method should be called when the robot state has changed."""
|
|
6305
6359
|
...
|
|
6306
6360
|
|
|
6307
6361
|
visual_model: any # pinocchio::GeometryModel
|
|
@@ -7191,19 +7245,6 @@ def flatten_on_floor(
|
|
|
7191
7245
|
...
|
|
7192
7246
|
|
|
7193
7247
|
|
|
7194
|
-
def frame(
|
|
7195
|
-
matrix: any, # Eigen::Matrix4d
|
|
7196
|
-
|
|
7197
|
-
) -> numpy.ndarray:
|
|
7198
|
-
"""Makes an Affine3d from a 4x4 matrix (for python bindings)
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
:param matrix: the 4x4 matrix
|
|
7202
|
-
|
|
7203
|
-
:return: The Affine3d"""
|
|
7204
|
-
...
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
7248
|
def frame_yaw(
|
|
7208
7249
|
rotation: numpy.ndarray, # Eigen::Matrix3d
|
|
7209
7250
|
|
|
@@ -17,12 +17,13 @@ dependencies = [
|
|
|
17
17
|
"rhoban-cmeel-jsoncpp",
|
|
18
18
|
"meshcat",
|
|
19
19
|
"numpy",
|
|
20
|
+
"ischedule"
|
|
20
21
|
]
|
|
21
22
|
description = "PlaCo: Rhoban Planning and Control"
|
|
22
23
|
license = "MIT"
|
|
23
24
|
name = "placo"
|
|
24
25
|
requires-python = ">= 3.8"
|
|
25
|
-
version = "0.3.
|
|
26
|
+
version = "0.3.8"
|
|
26
27
|
|
|
27
28
|
[project.urls]
|
|
28
29
|
changelog = "https://github.com/rhoban/placo/blob/main/CHANGELOG.md"
|
|
@@ -18,12 +18,15 @@ def get_viewer() -> meshcat.Visualizer:
|
|
|
18
18
|
|
|
19
19
|
if viewer is None:
|
|
20
20
|
viewer = meshcat.Visualizer()
|
|
21
|
+
|
|
21
22
|
print(f"Viewer URL: {viewer.url()}")
|
|
22
23
|
|
|
23
24
|
return viewer
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
def robot_viz(
|
|
27
|
+
def robot_viz(
|
|
28
|
+
robot: placo.RobotWrapper, name: str = "robot"
|
|
29
|
+
) -> pin.visualize.MeshcatVisualizer:
|
|
27
30
|
"""
|
|
28
31
|
Builds an instance of pinocchio MeshcatVisualizer, which allows to push the model to the meshcat
|
|
29
32
|
visualizer passed as parameter
|
|
@@ -31,14 +34,13 @@ def robot_viz(robot: placo.RobotWrapper, name: str = "robot") -> pin.visualize.M
|
|
|
31
34
|
The robot can further be displayed using:
|
|
32
35
|
|
|
33
36
|
> viz.display(q)
|
|
34
|
-
|
|
35
|
-
:param robot: robot instance
|
|
36
|
-
:param name: name of the robot
|
|
37
37
|
"""
|
|
38
38
|
global robot_names
|
|
39
39
|
|
|
40
40
|
robot_names[robot] = name
|
|
41
|
-
viz = pin.visualize.MeshcatVisualizer(
|
|
41
|
+
viz = pin.visualize.MeshcatVisualizer(
|
|
42
|
+
robot.model, robot.collision_model, robot.visual_model
|
|
43
|
+
)
|
|
42
44
|
viz.initViewer(viewer=get_viewer())
|
|
43
45
|
viz.loadViewerModel(name)
|
|
44
46
|
|
|
@@ -51,10 +53,6 @@ cylinders: dict = {}
|
|
|
51
53
|
def frame_viz(name: str, T: np.ndarray, opacity: float = 1.0) -> None:
|
|
52
54
|
"""
|
|
53
55
|
Visualizes a given frame
|
|
54
|
-
|
|
55
|
-
:param name: name of the frame
|
|
56
|
-
:param T: transformation of the frame to the world
|
|
57
|
-
:param opacity: opacity of the frame
|
|
58
56
|
"""
|
|
59
57
|
global cylinders
|
|
60
58
|
vis = get_viewer()
|
|
@@ -76,30 +74,60 @@ def frame_viz(name: str, T: np.ndarray, opacity: float = 1.0) -> None:
|
|
|
76
74
|
)
|
|
77
75
|
obj = cylinders[node_name]
|
|
78
76
|
|
|
79
|
-
obj.set_transform(
|
|
77
|
+
obj.set_transform(
|
|
78
|
+
T @ tf.rotation_matrix(*rotate) @ tf.translation_matrix([0, 0.05, 0])
|
|
79
|
+
)
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
def point_viz(
|
|
82
|
+
def point_viz(
|
|
83
|
+
name: str,
|
|
84
|
+
point: np.ndarray,
|
|
85
|
+
radius: float = 0.01,
|
|
86
|
+
color: float = 0xFF0000,
|
|
87
|
+
opacity: float = 1.0,
|
|
88
|
+
) -> None:
|
|
83
89
|
"""
|
|
84
90
|
Prints a point (sphere)
|
|
91
|
+
"""
|
|
92
|
+
vis = get_viewer()
|
|
93
|
+
vis["point"][name].set_object(
|
|
94
|
+
g.Sphere(radius), g.MeshPhongMaterial(color=color, opacity=opacity)
|
|
95
|
+
)
|
|
96
|
+
vis["point"][name].set_transform(tf.translation_matrix(point))
|
|
97
|
+
|
|
85
98
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
:
|
|
99
|
+
points_sizes = {}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def points_viz(
|
|
103
|
+
name: str,
|
|
104
|
+
points: np.ndarray,
|
|
105
|
+
radius: float = 0.01,
|
|
106
|
+
color: float = 0xFF0000,
|
|
107
|
+
opacity: float = 1.0,
|
|
108
|
+
) -> None:
|
|
109
|
+
"""
|
|
110
|
+
Prints a point (sphere)
|
|
91
111
|
"""
|
|
112
|
+
global points_sizes
|
|
92
113
|
vis = get_viewer()
|
|
93
|
-
|
|
94
|
-
|
|
114
|
+
k = 0
|
|
115
|
+
for point in points:
|
|
116
|
+
entry = f"{name}_{k}"
|
|
117
|
+
k += 1
|
|
118
|
+
vis["points"][name][entry].set_object(
|
|
119
|
+
g.Sphere(radius), g.MeshPhongMaterial(color=color, opacity=opacity)
|
|
120
|
+
)
|
|
121
|
+
vis["points"][name][entry].set_transform(tf.translation_matrix(point))
|
|
122
|
+
while k < points_sizes.get(name, 0):
|
|
123
|
+
vis["points"][name][f"{name}_{k}"].delete()
|
|
124
|
+
k += 1
|
|
125
|
+
points_sizes[name] = len(points)
|
|
95
126
|
|
|
96
127
|
|
|
97
128
|
def robot_frame_viz(robot: placo.RobotWrapper, frame: str) -> None:
|
|
98
129
|
"""
|
|
99
|
-
Draw a frame
|
|
100
|
-
|
|
101
|
-
:param robot: robot instance
|
|
102
|
-
:param frame: frame name
|
|
130
|
+
Draw a frame from the robot
|
|
103
131
|
"""
|
|
104
132
|
node_name = f"{robot_names[robot]}_{frame}"
|
|
105
133
|
frame_viz(node_name, robot.get_T_world_frame(frame))
|
|
@@ -109,12 +137,6 @@ steps: int = 0
|
|
|
109
137
|
|
|
110
138
|
|
|
111
139
|
def footsteps_viz(footsteps: placo.Footsteps, T: np.ndarray = np.eye(4)) -> None:
|
|
112
|
-
"""
|
|
113
|
-
Visualizes humanoid footsteps
|
|
114
|
-
|
|
115
|
-
:param footsteps: footsteps to visualize
|
|
116
|
-
:param T: left transformation to apply to the footsteps
|
|
117
|
-
"""
|
|
118
140
|
global steps
|
|
119
141
|
vis = get_viewer()
|
|
120
142
|
|
|
@@ -132,23 +154,25 @@ def footsteps_viz(footsteps: placo.Footsteps, T: np.ndarray = np.eye(4)) -> None
|
|
|
132
154
|
if len(footstep.footsteps) >= 2:
|
|
133
155
|
color = 0x1111AA
|
|
134
156
|
else:
|
|
135
|
-
color =
|
|
157
|
+
color = (
|
|
158
|
+
0xFF3333 if str(footstep.footsteps[0].side) == "left" else 0x33FF33
|
|
159
|
+
)
|
|
136
160
|
else:
|
|
137
161
|
color = 0xFF3333 if str(footstep.side) == "left" else 0x33FF33
|
|
138
162
|
|
|
139
|
-
vis["footsteps"][str(k)].set_object(
|
|
163
|
+
vis["footsteps"][str(k)].set_object(
|
|
164
|
+
g.LineLoop(g.PointsGeometry(polygon.T), g.MeshBasicMaterial(color=color))
|
|
165
|
+
)
|
|
140
166
|
|
|
141
167
|
|
|
142
168
|
def line_viz(name: str, points: np.ndarray, color: float = 0xFF0000) -> None:
|
|
143
169
|
"""
|
|
144
170
|
Prints a line
|
|
145
|
-
|
|
146
|
-
:param name: name of the line
|
|
147
|
-
:param points: points of the line
|
|
148
|
-
:param color: color of the line
|
|
149
171
|
"""
|
|
150
172
|
vis = get_viewer()
|
|
151
|
-
vis["lines"][name].set_object(
|
|
173
|
+
vis["lines"][name].set_object(
|
|
174
|
+
g.LineSegments(g.PointsGeometry(points.T), g.LineBasicMaterial(color=color))
|
|
175
|
+
)
|
|
152
176
|
|
|
153
177
|
|
|
154
178
|
def arrow_viz(
|
|
@@ -160,14 +184,8 @@ def arrow_viz(
|
|
|
160
184
|
) -> None:
|
|
161
185
|
"""
|
|
162
186
|
Prints an arrow
|
|
163
|
-
|
|
164
|
-
:param name: name of the arrow
|
|
165
|
-
:param point_from: origin of the arrow
|
|
166
|
-
:param point_to: end of the arrow
|
|
167
|
-
:param color: color of the arrow
|
|
168
|
-
:param radius: radius of the arrow
|
|
169
187
|
"""
|
|
170
|
-
head_length = radius*3
|
|
188
|
+
head_length = radius * 3
|
|
171
189
|
vis = get_viewer()
|
|
172
190
|
length = np.linalg.norm(point_to - point_from)
|
|
173
191
|
length = max(1e-3, length - head_length)
|
|
@@ -189,43 +207,58 @@ def arrow_viz(
|
|
|
189
207
|
T_cylinder = T @ tf.translation_matrix(np.array([0, length / 2.0, 0.0]))
|
|
190
208
|
T_head = T @ tf.translation_matrix(np.array([0, length + head_length / 2.0, 0.0]))
|
|
191
209
|
|
|
192
|
-
vis["arrows"][name]["cylinder"].set_object(
|
|
210
|
+
vis["arrows"][name]["cylinder"].set_object(
|
|
211
|
+
cylinder, g.MeshBasicMaterial(color=color)
|
|
212
|
+
)
|
|
193
213
|
vis["arrows"][name]["cylinder"].set_transform(T_cylinder)
|
|
194
214
|
vis["arrows"][name]["head"].set_object(head, g.MeshBasicMaterial(color=color))
|
|
195
215
|
vis["arrows"][name]["head"].set_transform(T_head)
|
|
196
216
|
|
|
217
|
+
|
|
197
218
|
previous_contacts: int = 0
|
|
198
219
|
|
|
199
|
-
def contacts_viz(solver: placo.DynamicsSolver, ratio=0.1, radius=0.005):
|
|
200
|
-
"""
|
|
201
|
-
Draws the contacts produced by a dynamics solver
|
|
202
220
|
|
|
203
|
-
|
|
204
|
-
:param ratio: ratio of the wrench to display
|
|
205
|
-
:param radius: radius of the arrows
|
|
206
|
-
"""
|
|
221
|
+
def contacts_viz(solver: placo.DynamicsSolver, ratio=0.1, radius=0.005):
|
|
207
222
|
global previous_contacts
|
|
208
223
|
robot = solver.robot
|
|
209
224
|
frames = robot.frame_names()
|
|
210
|
-
|
|
225
|
+
|
|
211
226
|
for k in range(solver.count_contacts()):
|
|
212
227
|
contact = solver.get_contact(k)
|
|
213
228
|
|
|
214
229
|
if isinstance(contact, placo.PointContact):
|
|
215
230
|
frame_name = frames[contact.position_task().frame_index]
|
|
216
231
|
T_world_frame = robot.get_T_world_frame(frame_name)
|
|
217
|
-
arrow_viz(
|
|
232
|
+
arrow_viz(
|
|
233
|
+
f"contact_{k}",
|
|
234
|
+
T_world_frame[:3, 3],
|
|
235
|
+
T_world_frame[:3, 3] + contact.wrench * ratio,
|
|
236
|
+
color=0x00FF00,
|
|
237
|
+
radius=radius,
|
|
238
|
+
)
|
|
218
239
|
elif isinstance(contact, placo.Contact6D):
|
|
219
240
|
frame_name = frames[contact.position_task().frame_index]
|
|
220
241
|
T_world_frame = robot.get_T_world_frame(frame_name)
|
|
221
242
|
wrench = T_world_frame[:3, :3] @ contact.wrench[:3]
|
|
222
243
|
origin = T_world_frame[:3, 3] + T_world_frame[:3, :3] @ contact.zmp()
|
|
223
|
-
arrow_viz(
|
|
244
|
+
arrow_viz(
|
|
245
|
+
f"contact_{k}",
|
|
246
|
+
origin,
|
|
247
|
+
origin + wrench * ratio,
|
|
248
|
+
color=0x00FFAA,
|
|
249
|
+
radius=radius,
|
|
250
|
+
)
|
|
224
251
|
elif isinstance(contact, placo.ExternalWrenchContact):
|
|
225
252
|
frame_name = frames[contact.frame_index]
|
|
226
253
|
T_world_frame = robot.get_T_world_frame(frame_name)
|
|
227
|
-
arrow_viz(
|
|
228
|
-
|
|
254
|
+
arrow_viz(
|
|
255
|
+
f"contact_{k}",
|
|
256
|
+
T_world_frame[:3, 3],
|
|
257
|
+
T_world_frame[:3, 3] + contact.w_ext[:3] * ratio,
|
|
258
|
+
color=0xFF2222,
|
|
259
|
+
radius=radius,
|
|
260
|
+
)
|
|
261
|
+
|
|
229
262
|
vis = get_viewer()
|
|
230
263
|
while k < previous_contacts:
|
|
231
264
|
k += 1
|
|
@@ -170,6 +170,16 @@ double RobotWrapper::get_joint_velocity(const std::string& name)
|
|
|
170
170
|
return state.qd[get_joint_v_offset(name)];
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
void RobotWrapper::set_joint_acceleration(const std::string& name, double value)
|
|
174
|
+
{
|
|
175
|
+
state.qdd[get_joint_v_offset(name)] = value;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
double RobotWrapper::get_joint_acceleration(const std::string& name)
|
|
179
|
+
{
|
|
180
|
+
return state.qdd[get_joint_v_offset(name)];
|
|
181
|
+
}
|
|
182
|
+
|
|
173
183
|
void RobotWrapper::set_joint_velocity(const std::string& name, double value)
|
|
174
184
|
{
|
|
175
185
|
state.qd[get_joint_v_offset(name)] = value;
|
|
@@ -139,6 +139,20 @@ public:
|
|
|
139
139
|
*/
|
|
140
140
|
double get_joint_velocity(const std::string& name);
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* @brief Sets the joint acceleration in state.qd
|
|
144
|
+
* @param name joint name
|
|
145
|
+
* @param value joint acceleration
|
|
146
|
+
*/
|
|
147
|
+
void set_joint_acceleration(const std::string& name, double value);
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @brief Gets the joint acceleration from state.qd
|
|
151
|
+
* @param name joint name
|
|
152
|
+
* @return joint acceleration
|
|
153
|
+
*/
|
|
154
|
+
double get_joint_acceleration(const std::string& name);
|
|
155
|
+
|
|
142
156
|
/**
|
|
143
157
|
* @brief Gets the offset for a given joint in the \ref state (in \ref State.q)
|
|
144
158
|
* @param name joint name
|
|
@@ -205,7 +219,8 @@ public:
|
|
|
205
219
|
State neutral_state();
|
|
206
220
|
|
|
207
221
|
/**
|
|
208
|
-
* @brief Update
|
|
222
|
+
* @brief Update internal computation for kinematics (frames, jacobian). This method should be called when
|
|
223
|
+
* the robot state has changed.
|
|
209
224
|
*/
|
|
210
225
|
void update_kinematics();
|
|
211
226
|
|
|
@@ -73,14 +73,6 @@ Eigen::Matrix3d rotation_from_axis(std::string axis, Eigen::Vector3d vector)
|
|
|
73
73
|
return pinocchio::exp3(w * theta);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
Eigen::Affine3d frame(Eigen::Matrix4d matrix)
|
|
77
|
-
{
|
|
78
|
-
Eigen::Affine3d result;
|
|
79
|
-
result.matrix() = matrix;
|
|
80
|
-
|
|
81
|
-
return result;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
76
|
Eigen::Affine3d flatten_on_floor(const Eigen::Affine3d& transformation)
|
|
85
77
|
{
|
|
86
78
|
Eigen::Affine3d flattened = transformation;
|
|
@@ -34,13 +34,6 @@ double frame_yaw(Eigen::Matrix3d rotation);
|
|
|
34
34
|
*/
|
|
35
35
|
Eigen::Matrix3d rotation_from_axis(std::string axis, Eigen::Vector3d vector);
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* @brief Makes an Affine3d from a 4x4 matrix (for python bindings)
|
|
39
|
-
* @param matrix the 4x4 matrix
|
|
40
|
-
* @return The Affine3d
|
|
41
|
-
*/
|
|
42
|
-
Eigen::Affine3d frame(Eigen::Matrix4d matrix);
|
|
43
|
-
|
|
44
37
|
/**
|
|
45
38
|
* @brief Takes a 3D transformation and ensure it is "flat" on the floor
|
|
46
39
|
* (setting z to 0 and keeping only yaw)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|