placo 0.7.5__tar.gz → 0.7.6__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.

Files changed (173) hide show
  1. {placo-0.7.5 → placo-0.7.6}/PKG-INFO +3 -1
  2. {placo-0.7.5 → placo-0.7.6}/bindings/expose-robot-wrapper.cpp +9 -1
  3. {placo-0.7.5 → placo-0.7.6}/bindings/expose-tools.cpp +5 -8
  4. {placo-0.7.5 → placo-0.7.6}/placo.pyi +75 -37
  5. {placo-0.7.5 → placo-0.7.6}/pyproject.toml +3 -1
  6. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/segment.cpp +24 -35
  7. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/segment.h +19 -10
  8. {placo-0.7.5 → placo-0.7.6}/.clang-format +0 -0
  9. {placo-0.7.5 → placo-0.7.6}/.gitattributes +0 -0
  10. {placo-0.7.5 → placo-0.7.6}/.gitignore +0 -0
  11. {placo-0.7.5 → placo-0.7.6}/.readthedocs.yaml +0 -0
  12. {placo-0.7.5 → placo-0.7.6}/CMakeLists.txt +1 -1
  13. {placo-0.7.5 → placo-0.7.6}/Doxyfile +0 -0
  14. {placo-0.7.5 → placo-0.7.6}/LICENSE +0 -0
  15. {placo-0.7.5 → placo-0.7.6}/Makefile +0 -0
  16. {placo-0.7.5 → placo-0.7.6}/README.md +0 -0
  17. {placo-0.7.5 → placo-0.7.6}/bindings/doxystub.h +0 -0
  18. {placo-0.7.5 → placo-0.7.6}/bindings/expose-dynamics.cpp +0 -0
  19. {placo-0.7.5 → placo-0.7.6}/bindings/expose-eigen.cpp +0 -0
  20. {placo-0.7.5 → placo-0.7.6}/bindings/expose-footsteps.cpp +0 -0
  21. {placo-0.7.5 → placo-0.7.6}/bindings/expose-kinematics.cpp +0 -0
  22. {placo-0.7.5 → placo-0.7.6}/bindings/expose-parameters.cpp +0 -0
  23. {placo-0.7.5 → placo-0.7.6}/bindings/expose-problem.cpp +0 -0
  24. {placo-0.7.5 → placo-0.7.6}/bindings/expose-utils.hpp +0 -0
  25. {placo-0.7.5 → placo-0.7.6}/bindings/expose-walk-pattern-generator.cpp +0 -0
  26. {placo-0.7.5 → placo-0.7.6}/bindings/module.cpp +0 -0
  27. {placo-0.7.5 → placo-0.7.6}/bindings/module.h +0 -0
  28. {placo-0.7.5 → placo-0.7.6}/build_wheel.sh +0 -0
  29. {placo-0.7.5 → placo-0.7.6}/python/.vscode/settings.json +0 -0
  30. {placo-0.7.5 → placo-0.7.6}/python/Makefile +0 -0
  31. {placo-0.7.5 → placo-0.7.6}/python/placo_utils/__init__.py +0 -0
  32. {placo-0.7.5 → placo-0.7.6}/python/placo_utils/tf.py +0 -0
  33. {placo-0.7.5 → placo-0.7.6}/python/placo_utils/view.py +0 -0
  34. {placo-0.7.5 → placo-0.7.6}/python/placo_utils/visualization.py +0 -0
  35. {placo-0.7.5 → placo-0.7.6}/python/run_tests.sh +0 -0
  36. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/avoid_self_collisions_constraint.cpp +0 -0
  37. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/avoid_self_collisions_constraint.h +0 -0
  38. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/com_task.cpp +0 -0
  39. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/com_task.h +0 -0
  40. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/constraint.cpp +0 -0
  41. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/constraint.h +0 -0
  42. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/contacts.cpp +0 -0
  43. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/contacts.h +0 -0
  44. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/dynamics_solver.cpp +0 -0
  45. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/dynamics_solver.h +0 -0
  46. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/frame_task.cpp +0 -0
  47. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/frame_task.h +0 -0
  48. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/gear_task.cpp +0 -0
  49. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/gear_task.h +0 -0
  50. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/joints_task.cpp +0 -0
  51. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/joints_task.h +0 -0
  52. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/orientation_task.cpp +0 -0
  53. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/orientation_task.h +0 -0
  54. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/position_task.cpp +0 -0
  55. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/position_task.h +0 -0
  56. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/relative_frame_task.cpp +0 -0
  57. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/relative_frame_task.h +0 -0
  58. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/relative_orientation_task.cpp +0 -0
  59. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/relative_orientation_task.h +0 -0
  60. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/relative_position_task.cpp +0 -0
  61. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/relative_position_task.h +0 -0
  62. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/task.cpp +0 -0
  63. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/task.h +0 -0
  64. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/torque_task.cpp +0 -0
  65. {placo-0.7.5 → placo-0.7.6}/src/placo/dynamics/torque_task.h +0 -0
  66. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/foot_trajectory.cpp +0 -0
  67. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/foot_trajectory.h +0 -0
  68. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/footsteps_planner.cpp +0 -0
  69. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/footsteps_planner.h +0 -0
  70. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/footsteps_planner_naive.cpp +0 -0
  71. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/footsteps_planner_naive.h +0 -0
  72. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/footsteps_planner_repetitive.cpp +0 -0
  73. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/footsteps_planner_repetitive.h +0 -0
  74. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/humanoid_parameters.cpp +0 -0
  75. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/humanoid_parameters.h +0 -0
  76. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/humanoid_robot.cpp +0 -0
  77. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/humanoid_robot.h +0 -0
  78. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/kick.cpp +0 -0
  79. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/kick.h +0 -0
  80. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/lipm.cpp +0 -0
  81. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/lipm.h +0 -0
  82. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/swing_foot.cpp +0 -0
  83. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/swing_foot.h +0 -0
  84. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/swing_foot_cubic.cpp +0 -0
  85. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/swing_foot_cubic.h +0 -0
  86. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/swing_foot_quintic.cpp +0 -0
  87. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/swing_foot_quintic.h +0 -0
  88. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/walk_pattern_generator.cpp +0 -0
  89. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/walk_pattern_generator.h +0 -0
  90. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/walk_tasks.cpp +0 -0
  91. {placo-0.7.5 → placo-0.7.6}/src/placo/humanoid/walk_tasks.h +0 -0
  92. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/avoid_self_collisions_constraint.cpp +0 -0
  93. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/avoid_self_collisions_constraint.h +0 -0
  94. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/axis_align_task.cpp +0 -0
  95. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/axis_align_task.h +0 -0
  96. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/centroidal_momentum_task.cpp +0 -0
  97. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/centroidal_momentum_task.h +0 -0
  98. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/com_polygon_constraint.cpp +0 -0
  99. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/com_polygon_constraint.h +0 -0
  100. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/com_task.cpp +0 -0
  101. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/com_task.h +0 -0
  102. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/cone_constraint.cpp +0 -0
  103. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/cone_constraint.h +0 -0
  104. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/constraint.cpp +0 -0
  105. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/constraint.h +0 -0
  106. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/distance_task.cpp +0 -0
  107. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/distance_task.h +0 -0
  108. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/frame_task.cpp +0 -0
  109. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/frame_task.h +0 -0
  110. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/gear_task.cpp +0 -0
  111. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/gear_task.h +0 -0
  112. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/joint_space_half_spaces_constraint.cpp +0 -0
  113. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/joint_space_half_spaces_constraint.h +0 -0
  114. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/joints_task.cpp +0 -0
  115. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/joints_task.h +0 -0
  116. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/kinematics_solver.cpp +0 -0
  117. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/kinematics_solver.h +0 -0
  118. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/kinetic_energy_regularization_task.cpp +0 -0
  119. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/kinetic_energy_regularization_task.h +0 -0
  120. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/manipulability_task.cpp +0 -0
  121. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/manipulability_task.h +0 -0
  122. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/orientation_task.cpp +0 -0
  123. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/orientation_task.h +0 -0
  124. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/position_task.cpp +0 -0
  125. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/position_task.h +0 -0
  126. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/regularization_task.cpp +0 -0
  127. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/regularization_task.h +0 -0
  128. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/relative_frame_task.cpp +0 -0
  129. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/relative_frame_task.h +0 -0
  130. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/relative_orientation_task.cpp +0 -0
  131. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/relative_orientation_task.h +0 -0
  132. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/relative_position_task.cpp +0 -0
  133. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/relative_position_task.h +0 -0
  134. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/task.cpp +0 -0
  135. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/task.h +0 -0
  136. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/wheel_task.cpp +0 -0
  137. {placo-0.7.5 → placo-0.7.6}/src/placo/kinematics/wheel_task.h +0 -0
  138. {placo-0.7.5 → placo-0.7.6}/src/placo/model/robot_wrapper.cpp +0 -0
  139. {placo-0.7.5 → placo-0.7.6}/src/placo/model/robot_wrapper.h +0 -0
  140. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/constraint.cpp +0 -0
  141. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/constraint.h +0 -0
  142. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/expression.cpp +0 -0
  143. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/expression.h +0 -0
  144. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/integrator.cpp +0 -0
  145. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/integrator.h +0 -0
  146. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/polygon_constraint.cpp +0 -0
  147. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/polygon_constraint.h +0 -0
  148. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/problem.cpp +0 -0
  149. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/problem.h +0 -0
  150. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/problem_polynom.cpp +0 -0
  151. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/problem_polynom.h +0 -0
  152. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/qp_error.cpp +0 -0
  153. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/qp_error.h +0 -0
  154. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/sparsity.cpp +0 -0
  155. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/sparsity.h +0 -0
  156. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/variable.cpp +0 -0
  157. {placo-0.7.5 → placo-0.7.6}/src/placo/problem/variable.h +0 -0
  158. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/axises_mask.cpp +0 -0
  159. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/axises_mask.h +0 -0
  160. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/cubic_spline.cpp +0 -0
  161. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/cubic_spline.h +0 -0
  162. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/cubic_spline_3d.cpp +0 -0
  163. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/cubic_spline_3d.h +0 -0
  164. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/directions.cpp +0 -0
  165. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/directions.h +0 -0
  166. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/polynom.cpp +0 -0
  167. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/polynom.h +0 -0
  168. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/prioritized.cpp +0 -0
  169. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/prioritized.h +0 -0
  170. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/utils.cpp +0 -0
  171. {placo-0.7.5 → placo-0.7.6}/src/placo/tools/utils.h +0 -0
  172. {placo-0.7.5 → placo-0.7.6}/tweak_sdist.sh +0 -0
  173. {placo-0.7.5 → placo-0.7.6}/wks.yml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: placo
3
- Version: 0.7.5
3
+ Version: 0.7.6
4
4
  Summary: PlaCo: Rhoban Planning and Control
5
5
  Requires-Python: >= 3.9
6
6
  License-Expression: MIT
@@ -16,6 +16,8 @@ Requires-Dist: meshcat
16
16
  Requires-Dist: ischedule
17
17
  Provides-Extra: build
18
18
  Requires-Dist: pin[build] >= 3 ; extra == "build"
19
+ Requires-Dist: cmeel-eigen ; extra == "build"
20
+ Requires-Dist: eigenpy ; extra == "build"
19
21
  Requires-Dist: doxystub ; extra == "build"
20
22
  Description-Content-Type: text/markdown
21
23
 
@@ -43,6 +43,10 @@ void exposeRobotType(class_<RobotType, W1>& type)
43
43
  .def("set_velocity_limits", &RobotType::set_velocity_limits)
44
44
  .def("set_torque_limit", &RobotType::set_torque_limit)
45
45
  .def("set_joint_limits", &RobotType::set_joint_limits)
46
+ .def("get_joint_limits", +[](RobotType& robot, const std::string& joint) {
47
+ auto limits = robot.get_joint_limits(joint);
48
+ return Eigen::Vector2d(limits.first, limits.second);
49
+ })
46
50
  .def("update_kinematics", &RobotType::update_kinematics)
47
51
  .def("compute_hessians", &RobotType::compute_hessians)
48
52
  .def(
@@ -203,7 +207,11 @@ void exposeRobotWrapper()
203
207
  .def(
204
208
  "get_support_side", +[](const HumanoidRobot& robot) { return robot.support_side; })
205
209
  .add_property("support_is_both", &HumanoidRobot::support_is_both, &HumanoidRobot::support_is_both)
206
- .def_readwrite("T_world_support", &HumanoidRobot::T_world_support);
210
+ .add_property("support_side", &HumanoidRobot::support_side)
211
+ .def("get_T_world_support", +[](const HumanoidRobot& robot) { return robot.T_world_support; })
212
+ .def("set_T_world_support", +[](HumanoidRobot& robot, const Eigen::Affine3d& T_world_support) {
213
+ robot.T_world_support = T_world_support;
214
+ });
207
215
 
208
216
  exposeStdVector<RobotWrapper::Collision>("vector_Collision");
209
217
  exposeStdVector<RobotWrapper::Distance>("vector_Distance");
@@ -89,14 +89,11 @@ void exposeTools()
89
89
  class__<Segment>("Segment", init<Eigen::Vector2d, Eigen::Vector2d>())
90
90
  .add_property("start", &Segment::start, &Segment::start)
91
91
  .add_property("end", &Segment::end, &Segment::start)
92
- .def(
93
- "is_parallel", +[](Segment& s1, const Segment& s2) { return s1.is_parallel(s2); })
94
- .def(
95
- "is_point_aligned", +[](Segment& s, const Eigen::Vector2d& point) { return s.is_point_aligned(point); })
96
- .def(
97
- "is_collinear", +[](Segment& s1, const Segment& s2) { return s1.is_collinear(s2); })
98
- .def(
99
- "is_point_in_segment", +[](Segment& s, const Eigen::Vector2d& point) { return s.is_point_in_segment(point); })
92
+ .def("norm", &Segment::norm)
93
+ .def("is_parallel", &Segment::is_parallel)
94
+ .def("is_point_aligned", &Segment::is_point_aligned)
95
+ .def("is_segment_aligned", &Segment::is_segment_aligned)
96
+ .def("is_point_in_segment", &Segment::is_point_in_segment)
100
97
  .def("intersects", &Segment::intersects)
101
98
  .def("line_pass_through", &Segment::line_pass_through)
102
99
  .def("half_line_pass_through", &Segment::half_line_pass_through)
@@ -4133,15 +4133,6 @@ None( (placo.HumanoidParameters)arg1) -> float :
4133
4133
 
4134
4134
 
4135
4135
  class HumanoidRobot:
4136
- T_world_support: any
4137
- """
4138
-
4139
- None( (placo.HumanoidRobot)arg1) -> object :
4140
-
4141
- C++ signature :
4142
- Eigen::Transform<double, 3, 2, 0> {lvalue} None(placo::humanoid::HumanoidRobot {lvalue})
4143
- """
4144
-
4145
4136
  def HumanoidRobot(
4146
4137
  self,
4147
4138
  model_directory: str = "robot", # std::string
@@ -4228,7 +4219,7 @@ None( (placo.HumanoidRobot)arg1) -> object :
4228
4219
  """
4229
4220
  Computes all minimum distances between current collision pairs.
4230
4221
 
4231
- :return: <Element 'para' at 0x7f79e47dd760>
4222
+ :return: <Element 'para' at 0x7f73dbc4b6a0>
4232
4223
  """
4233
4224
  ...
4234
4225
 
@@ -4250,7 +4241,7 @@ None( (placo.HumanoidRobot)arg1) -> object :
4250
4241
 
4251
4242
  :param any frame: the frame for which we want the jacobian
4252
4243
 
4253
- :return: <Element 'para' at 0x7f79e47f44f0>
4244
+ :return: <Element 'para' at 0x7f73dbc49760>
4254
4245
  """
4255
4246
  ...
4256
4247
 
@@ -4264,7 +4255,7 @@ None( (placo.HumanoidRobot)arg1) -> object :
4264
4255
 
4265
4256
  :param any frame: the frame for which we want the jacobian time variation
4266
4257
 
4267
- :return: <Element 'para' at 0x7f79e4840540>
4258
+ :return: <Element 'para' at 0x7f73dbbb5490>
4268
4259
  """
4269
4260
  ...
4270
4261
 
@@ -4327,6 +4318,11 @@ None( (placo.HumanoidRobot)arg1) -> object :
4327
4318
  ) -> numpy.ndarray:
4328
4319
  ...
4329
4320
 
4321
+ def get_T_world_support(
4322
+ arg1: HumanoidRobot,
4323
+ ) -> object:
4324
+ ...
4325
+
4330
4326
  def get_T_world_trunk(
4331
4327
  self,
4332
4328
  ) -> numpy.ndarray:
@@ -4378,6 +4374,17 @@ None( (placo.HumanoidRobot)arg1) -> object :
4378
4374
  """
4379
4375
  ...
4380
4376
 
4377
+ def get_joint_limits(
4378
+ self,
4379
+ name: str, # const std::string &
4380
+ ) -> any:
4381
+ """
4382
+ Gets the limits for a given joint.
4383
+
4384
+ :param str name: joint name
4385
+ """
4386
+ ...
4387
+
4381
4388
  def get_joint_offset(
4382
4389
  self,
4383
4390
  name: str, # const std::string &
@@ -4560,7 +4567,7 @@ None( (placo.HumanoidRobot)arg1) -> object :
4560
4567
 
4561
4568
  :param bool stop_at_first: whether to stop at the first collision found
4562
4569
 
4563
- :return: <Element 'para' at 0x7f79e47dff10>
4570
+ :return: <Element 'para' at 0x7f73dbb2be70>
4564
4571
  """
4565
4572
  ...
4566
4573
 
@@ -4589,6 +4596,12 @@ None( (placo.HumanoidRobot)arg1) -> object :
4589
4596
  """
4590
4597
  ...
4591
4598
 
4599
+ def set_T_world_support(
4600
+ arg1: HumanoidRobot,
4601
+ arg2: numpy.ndarray,
4602
+ ) -> None:
4603
+ ...
4604
+
4592
4605
  def set_gear_ratio(
4593
4606
  self,
4594
4607
  joint_name: str, # const std::string &
@@ -4749,6 +4762,15 @@ None( (placo.HumanoidRobot)arg1) -> bool :
4749
4762
  bool {lvalue} None(placo::humanoid::HumanoidRobot {lvalue})
4750
4763
  """
4751
4764
 
4765
+ support_side: any
4766
+ """
4767
+
4768
+ None( (placo.HumanoidRobot)arg1) -> placo.HumanoidRobot_Side :
4769
+
4770
+ C++ signature :
4771
+ placo::humanoid::HumanoidRobot::Side {lvalue} None(placo::humanoid::HumanoidRobot {lvalue})
4772
+ """
4773
+
4752
4774
  def torques_from_acceleration_with_fixed_frame(
4753
4775
  self,
4754
4776
  qdd_a: numpy.ndarray, # Eigen::VectorXd
@@ -7441,7 +7463,7 @@ None( (placo.RobotWrapper)arg1) -> object :
7441
7463
  """
7442
7464
  Computes all minimum distances between current collision pairs.
7443
7465
 
7444
- :return: <Element 'para' at 0x7f79e48a8950>
7466
+ :return: <Element 'para' at 0x7f73dbcab3d0>
7445
7467
  """
7446
7468
  ...
7447
7469
 
@@ -7455,7 +7477,7 @@ None( (placo.RobotWrapper)arg1) -> object :
7455
7477
 
7456
7478
  :param any frame: the frame for which we want the jacobian
7457
7479
 
7458
- :return: <Element 'para' at 0x7f79e48aa930>
7480
+ :return: <Element 'para' at 0x7f73dbc09530>
7459
7481
  """
7460
7482
  ...
7461
7483
 
@@ -7469,7 +7491,7 @@ None( (placo.RobotWrapper)arg1) -> object :
7469
7491
 
7470
7492
  :param any frame: the frame for which we want the jacobian time variation
7471
7493
 
7472
- :return: <Element 'para' at 0x7f79e473f560>
7494
+ :return: <Element 'para' at 0x7f73dbdda980>
7473
7495
  """
7474
7496
  ...
7475
7497
 
@@ -7554,6 +7576,17 @@ None( (placo.RobotWrapper)arg1) -> object :
7554
7576
  """
7555
7577
  ...
7556
7578
 
7579
+ def get_joint_limits(
7580
+ self,
7581
+ name: str, # const std::string &
7582
+ ) -> any:
7583
+ """
7584
+ Gets the limits for a given joint.
7585
+
7586
+ :param str name: joint name
7587
+ """
7588
+ ...
7589
+
7557
7590
  def get_joint_offset(
7558
7591
  self,
7559
7592
  name: str, # const std::string &
@@ -7699,7 +7732,7 @@ None( (placo.RobotWrapper)arg1) -> object :
7699
7732
 
7700
7733
  :param bool stop_at_first: whether to stop at the first collision found
7701
7734
 
7702
- :return: <Element 'para' at 0x7f79e48a9210>
7735
+ :return: <Element 'para' at 0x7f73dbcabec0>
7703
7736
  """
7704
7737
  ...
7705
7738
 
@@ -7998,52 +8031,38 @@ None( (placo.Segment)arg1) -> object :
7998
8031
  """
7999
8032
  ...
8000
8033
 
8001
- def is_collinear(
8002
- self,
8003
- s: Segment, # placo::tools::Segment
8004
- epsilon: float = 1e-6, # double
8005
- ) -> bool:
8006
- """
8007
- Checks if this segment is collinear with another one.
8008
-
8009
- :param Segment s: The segment to check collinearity with.
8010
-
8011
- :param float epsilon: To account for floating point errors.
8012
- """
8013
- ...
8014
-
8015
8034
  def is_parallel(
8016
8035
  self,
8017
8036
  s: Segment, # placo::tools::Segment
8018
- epsilon: float = 1e-6, # double
8037
+ epsilon: float = 1e-5, # double
8019
8038
  ) -> bool:
8020
8039
  """
8021
8040
  Checks if this segment is parallel to another one.
8022
8041
 
8023
8042
  :param Segment s: The segment to check parallelism with.
8024
8043
 
8025
- :param float epsilon: To account for floating point errors.
8044
+ :param float epsilon: The sinus of the error angle accepted for 2 segments to be considered parallel.
8026
8045
  """
8027
8046
  ...
8028
8047
 
8029
8048
  def is_point_aligned(
8030
8049
  self,
8031
8050
  point: numpy.ndarray, # const Eigen::Vector2d &
8032
- epsilon: float = 1e-6, # double
8051
+ epsilon: float = 1e-5, # double
8033
8052
  ) -> bool:
8034
8053
  """
8035
- Checks if a point is aligned with this segment.
8054
+ Checks if a point is aligned with this segment by checking if the segment is parallel to the segment formed by the start of this segment and the point.
8036
8055
 
8037
8056
  :param numpy.ndarray point: The point to check alignment with.
8038
8057
 
8039
- :param float epsilon: To account for floating point errors.
8058
+ :param float epsilon: The sinus of the error angle accepted for 2 segments to be considered parallel.
8040
8059
  """
8041
8060
  ...
8042
8061
 
8043
8062
  def is_point_in_segment(
8044
8063
  self,
8045
8064
  point: numpy.ndarray, # const Eigen::Vector2d &
8046
- epsilon: float = 1e-6, # double
8065
+ epsilon: float = 1e-5, # double
8047
8066
  ) -> bool:
8048
8067
  """
8049
8068
  Checks if a point is in the segment.
@@ -8054,6 +8073,20 @@ None( (placo.Segment)arg1) -> object :
8054
8073
  """
8055
8074
  ...
8056
8075
 
8076
+ def is_segment_aligned(
8077
+ self,
8078
+ s: Segment, # placo::tools::Segment
8079
+ epsilon: float = 1e-5, # double
8080
+ ) -> bool:
8081
+ """
8082
+ Checks if this segment is aligned with another one.
8083
+
8084
+ :param Segment s: The segment to check alignment with.
8085
+
8086
+ :param float epsilon: To account for floating point errors.
8087
+ """
8088
+ ...
8089
+
8057
8090
  def line_pass_through(
8058
8091
  self,
8059
8092
  s: Segment, # placo::tools::Segment
@@ -8076,6 +8109,11 @@ None( (placo.Segment)arg1) -> object :
8076
8109
  """
8077
8110
  ...
8078
8111
 
8112
+ def norm(
8113
+ self,
8114
+ ) -> float:
8115
+ ...
8116
+
8079
8117
  start: any
8080
8118
  """
8081
8119
 
@@ -5,6 +5,8 @@ requires = [
5
5
  "eiquadprog >= 1.2.6, < 2",
6
6
  "pin[build] >= 3",
7
7
  "rhoban-cmeel-jsoncpp",
8
+ "cmeel-eigen",
9
+ "eigenpy",
8
10
  "doxystub"
9
11
  ]
10
12
 
@@ -22,7 +24,7 @@ description = "PlaCo: Rhoban Planning and Control"
22
24
  license = "MIT"
23
25
  name = "placo"
24
26
  requires-python = ">= 3.9"
25
- version = "0.7.5"
27
+ version = "0.7.6"
26
28
 
27
29
  [project.urls]
28
30
  changelog = "https://github.com/rhoban/placo/blob/main/CHANGELOG.md"
@@ -12,11 +12,16 @@ Segment::Segment(const Eigen::Vector2d& start, const Eigen::Vector2d& end)
12
12
  {
13
13
  }
14
14
 
15
+ double Segment::norm()
16
+ {
17
+ return (end - start).norm();
18
+ }
19
+
15
20
  bool Segment::is_parallel(const Segment& s, double epsilon)
16
21
  {
17
22
  Eigen::Vector2d v1 = end - start;
18
23
  Eigen::Vector2d v2 = s.end - s.start;
19
- return abs(v1.x() * v2.y() - v1.y() * v2.x()) < epsilon;
24
+ return abs(v1.x() * v2.y() - v1.y() * v2.x()) / (v1.norm() * v2.norm()) < epsilon;
20
25
  }
21
26
 
22
27
  bool Segment::is_point_aligned(const Eigen::Vector2d& point, double epsilon)
@@ -25,12 +30,10 @@ bool Segment::is_point_aligned(const Eigen::Vector2d& point, double epsilon)
25
30
  {
26
31
  return true;
27
32
  }
28
- double alpha_x = (point.x() - start.x()) / (end.x() - start.x());
29
- double alpha_y = (point.y() - start.y()) / (end.y() - start.y());
30
- return abs(alpha_x - alpha_y) < epsilon;
33
+ return is_parallel(Segment(start, point), epsilon);
31
34
  }
32
35
 
33
- bool Segment::is_collinear(const Segment& s, double epsilon)
36
+ bool Segment::is_segment_aligned(const Segment& s, double epsilon)
34
37
  {
35
38
  return is_point_aligned(s.start, epsilon) && is_point_aligned(s.end, epsilon);
36
39
  }
@@ -39,7 +42,7 @@ bool Segment::is_point_in_segment(const Eigen::Vector2d& point, double epsilon)
39
42
  {
40
43
  Eigen::Vector2d v1 = end - start;
41
44
  Eigen::Vector2d v2 = point - start;
42
- return is_collinear(Segment(start, point), epsilon) && v1.dot(v2) >= 0 && v1.dot(v2) <= v1.dot(v1);
45
+ return is_segment_aligned(Segment(start, point), epsilon) && v1.dot(v2) >= 0 && v1.dot(v2) <= v1.dot(v1);
43
46
  }
44
47
 
45
48
  bool Segment::intersects(Segment& s)
@@ -51,7 +54,7 @@ bool Segment::intersects(Segment& s)
51
54
  return line_pass_through(s) && s.line_pass_through(*this);
52
55
  }
53
56
 
54
- bool Segment::line_pass_through(const Segment& s)
57
+ std::pair<double, double> Segment::get_lambdas(const Segment& s)
55
58
  {
56
59
  if (is_parallel(s))
57
60
  {
@@ -63,41 +66,27 @@ bool Segment::line_pass_through(const Segment& s)
63
66
  Eigen::Vector2d p1 = start;
64
67
  Eigen::Vector2d p2 = s.start;
65
68
  double det = v1.x() * v2.y() - v1.y() * v2.x();
66
- double t = (v2.y() * (p2.x() - p1.x()) + v2.x() * (p1.y() - p2.y())) / det;
67
- return t >= 0 && t <= 1;
69
+ double l1 = (v2.y() * (p2.x() - p1.x()) + v2.x() * (p1.y() - p2.y())) / det;
70
+ double l2 = (v1.y() * (p2.x() - p1.x()) + v1.x() * (p1.y() - p2.y())) / det;
71
+ return std::make_pair(l1, l2);
68
72
  }
69
73
 
70
- bool Segment::half_line_pass_through(const Segment& s)
74
+ bool Segment::line_pass_through(const Segment& s)
71
75
  {
72
- if (is_parallel(s))
73
- {
74
- throw std::runtime_error("Can't compute intersection of parallels");
75
- }
76
+ auto lambdas = get_lambdas(s);
77
+ return lambdas.first >= 0 && lambdas.first <= 1;
78
+ }
76
79
 
77
- Eigen::Vector2d v1 = end - start;
78
- Eigen::Vector2d v2 = s.end - s.start;
79
- Eigen::Vector2d p1 = start;
80
- Eigen::Vector2d p2 = s.start;
81
- double det = v1.x() * v2.y() - v1.y() * v2.x();
82
- double t_1 = (v2.y() * (p2.x() - p1.x()) + v2.x() * (p1.y() - p2.y())) / det;
83
- double t_2 = (v1.y() * (p2.x() - p1.x()) + v1.x() * (p1.y() - p2.y())) / det;
84
- return t_1 >= 0 && t_1 <= 1 && t_2 >= 0;
80
+ bool Segment::half_line_pass_through(const Segment& s)
81
+ {
82
+ auto lambdas = get_lambdas(s);
83
+ return lambdas.first >= 0 && lambdas.first <= 1 && lambdas.second >= 0;
85
84
  }
86
85
 
87
86
  Eigen::Vector2d Segment::lines_intersection(const Segment& s)
88
87
  {
89
- if (is_parallel(s))
90
- {
91
- throw std::runtime_error("Can't compute intersection of parallels");
92
- }
93
-
94
- Eigen::Vector2d v1 = end - start;
95
- Eigen::Vector2d v2 = s.end - s.start;
96
- Eigen::Vector2d p1 = start;
97
- Eigen::Vector2d p2 = s.start;
98
- double det = v1.x() * v2.y() - v1.y() * v2.x();
99
- double t = (v2.y() * (p2.x() - p1.x()) + v2.x() * (p1.y() - p2.y())) / det;
100
- return p1 + t * v1;
88
+ auto lambdas = get_lambdas(s);
89
+ Eigen::Vector2d v = end - start;
90
+ return start + lambdas.first * v;
101
91
  }
102
92
  } // namespace placo::tools
103
-
@@ -12,30 +12,32 @@ public:
12
12
 
13
13
  Eigen::Vector2d start;
14
14
  Eigen::Vector2d end;
15
-
15
+ double norm();
16
+
16
17
  /**
17
18
  * @brief Checks if this segment is parallel to another one.
18
19
  * @param s The segment to check parallelism with.
19
- * @param epsilon To account for floating point errors.
20
+ * @param epsilon The sinus of the error angle accepted for 2 segments to be considered parallel.
20
21
  * @return True if the segments are parallel.
21
22
  */
22
- bool is_parallel(const Segment& s, double epsilon = 1e-6);
23
+ bool is_parallel(const Segment& s, double epsilon = 1e-5);
23
24
 
24
25
  /**
25
- * @brief Checks if a point is aligned with this segment.
26
+ * @brief Checks if a point is aligned with this segment by checking if the segment
27
+ * is parallel to the segment formed by the start of this segment and the point.
26
28
  * @param point The point to check alignment with.
27
- * @param epsilon To account for floating point errors.
29
+ * @param epsilon The sinus of the error angle accepted for 2 segments to be considered parallel.
28
30
  * @return True if the point is aligned with the segment.
29
31
  */
30
- bool is_point_aligned(const Eigen::Vector2d& point, double epsilon = 1e-6);
32
+ bool is_point_aligned(const Eigen::Vector2d& point, double epsilon = 1e-5);
31
33
 
32
34
  /**
33
- * @brief Checks if this segment is collinear with another one.
34
- * @param s The segment to check collinearity with.
35
+ * @brief Checks if this segment is aligned with another one.
36
+ * @param s The segment to check alignment with.
35
37
  * @param epsilon To account for floating point errors.
36
38
  * @return True if the segments are collinear.
37
39
  */
38
- bool is_collinear(const Segment& s, double epsilon = 1e-6);
40
+ bool is_segment_aligned(const Segment& s, double epsilon = 1e-5);
39
41
 
40
42
  /**
41
43
  * @brief Checks if a point is in the segment.
@@ -43,7 +45,7 @@ public:
43
45
  * @param epsilon To account for floating point errors.
44
46
  * @return True if the point is in the segment.
45
47
  */
46
- bool is_point_in_segment(const Eigen::Vector2d& point, double epsilon = 1e-6);
48
+ bool is_point_in_segment(const Eigen::Vector2d& point, double epsilon = 1e-5);
47
49
 
48
50
  /**
49
51
  * @brief Checks if there is an intersection between this segment and another one, i.e. if the
@@ -53,6 +55,13 @@ public:
53
55
  */
54
56
  bool intersects(Segment& s);
55
57
 
58
+ /**
59
+ * @brief Returns the lambda values of the intersection between this segment and another one.
60
+ * @param s The other segment.
61
+ * @return A pair of doubles containing the lambda values of the intersection.
62
+ */
63
+ std::pair<double, double> get_lambdas(const Segment& s);
64
+
56
65
  /**
57
66
  * @brief Checks if the guiding line of another segment pass through this segment, i.e. if the
58
67
  * intersection between the guiding lines of this segment and another one is a point of this segment.
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
- project(placo)
2
1
  cmake_minimum_required(VERSION 3.10)
2
+ project(placo)
3
3
 
4
4
  find_package(Threads)
5
5
  find_package(pinocchio REQUIRED)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes