placo 0.5.5__0-cp310-cp310-manylinux_2_35_x86_64.whl → 0.5.9__0-cp310-cp310-manylinux_2_35_x86_64.whl

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.

Binary file
@@ -22,7 +22,6 @@ DynamicsGearTask = typing.NewType("DynamicsGearTask", None)
22
22
  DynamicsJointsTask = typing.NewType("DynamicsJointsTask", None)
23
23
  DynamicsOrientationTask = typing.NewType("DynamicsOrientationTask", None)
24
24
  DynamicsPositionTask = typing.NewType("DynamicsPositionTask", None)
25
- DynamicsReactionRatioConstraint = typing.NewType("DynamicsReactionRatioConstraint", None)
26
25
  DynamicsRelativeFrameTask = typing.NewType("DynamicsRelativeFrameTask", None)
27
26
  DynamicsRelativeOrientationTask = typing.NewType("DynamicsRelativeOrientationTask", None)
28
27
  DynamicsRelativePositionTask = typing.NewType("DynamicsRelativePositionTask", None)
@@ -63,10 +62,8 @@ ProblemConstraint = typing.NewType("ProblemConstraint", None)
63
62
  PuppetContact = typing.NewType("PuppetContact", None)
64
63
  QPError = typing.NewType("QPError", None)
65
64
  RegularizationTask = typing.NewType("RegularizationTask", None)
66
- Relative6DContact = typing.NewType("Relative6DContact", None)
67
65
  RelativeFrameTask = typing.NewType("RelativeFrameTask", None)
68
66
  RelativeOrientationTask = typing.NewType("RelativeOrientationTask", None)
69
- RelativePointContact = typing.NewType("RelativePointContact", None)
70
67
  RelativePositionTask = typing.NewType("RelativePositionTask", None)
71
68
  RobotWrapper = typing.NewType("RobotWrapper", None)
72
69
  RobotWrapper_State = typing.NewType("RobotWrapper_State", None)
@@ -266,7 +263,7 @@ class AxisesMask:
266
263
  """Used to mask some task axises.
267
264
  """
268
265
  R_custom_world: numpy.ndarray # Eigen::Matrix3d
269
- """ROtation from world to custom rotation (provided by the user)
266
+ """Rotation from world to custom rotation (provided by the user)
270
267
  """
271
268
 
272
269
  R_local_world: numpy.ndarray # Eigen::Matrix3d
@@ -718,6 +715,19 @@ class CubicSpline:
718
715
  ) -> any:
719
716
  ...
720
717
 
718
+ def acc(
719
+ self: CubicSpline,
720
+ x: float, # double
721
+
722
+ ) -> float:
723
+ """Retrieve acceleration at a given time.
724
+
725
+
726
+ :param t: time
727
+
728
+ :return: acceleration"""
729
+ ...
730
+
721
731
  def add_point(
722
732
  self: CubicSpline,
723
733
  t: float, # double
@@ -786,6 +796,19 @@ class CubicSpline3D:
786
796
  ) -> None:
787
797
  ...
788
798
 
799
+ def acc(
800
+ self: CubicSpline3D,
801
+ t: float, # double
802
+
803
+ ) -> numpy.ndarray:
804
+ """Returns the spline accleeration at time t.
805
+
806
+
807
+ :param t: time
808
+
809
+ :return: acceleration (3D vector)"""
810
+ ...
811
+
789
812
  def add_point(
790
813
  self: CubicSpline3D,
791
814
  t: float, # double
@@ -1002,10 +1025,6 @@ class DynamicsCoMTask:
1002
1025
  :param weight: task weight"""
1003
1026
  ...
1004
1027
 
1005
- critically_damped: bool # bool
1006
- """If this is true, kd will be computed from kp to have a critically damped system.
1007
- """
1008
-
1009
1028
  ddtarget_world: numpy.ndarray # Eigen::Vector3d
1010
1029
  """Target acceleration in the world.
1011
1030
  """
@@ -1023,7 +1042,7 @@ class DynamicsCoMTask:
1023
1042
  """
1024
1043
 
1025
1044
  kd: float # double
1026
- """D gain for position control.
1045
+ """D gain for position control (if negative, will be critically damped)
1027
1046
  """
1028
1047
 
1029
1048
  kp: float # double
@@ -1170,10 +1189,6 @@ class DynamicsGearTask:
1170
1189
  :param weight: task weight"""
1171
1190
  ...
1172
1191
 
1173
- critically_damped: bool # bool
1174
- """If this is true, kd will be computed from kp to have a critically damped system.
1175
- """
1176
-
1177
1192
  derror: numpy.ndarray # Eigen::MatrixXd
1178
1193
  """Current velocity error vector.
1179
1194
  """
@@ -1183,7 +1198,7 @@ class DynamicsGearTask:
1183
1198
  """
1184
1199
 
1185
1200
  kd: float # double
1186
- """D gain for position control.
1201
+ """D gain for position control (if negative, will be critically damped)
1187
1202
  """
1188
1203
 
1189
1204
  kp: float # double
@@ -1248,10 +1263,6 @@ class DynamicsJointsTask:
1248
1263
  :param weight: task weight"""
1249
1264
  ...
1250
1265
 
1251
- critically_damped: bool # bool
1252
- """If this is true, kd will be computed from kp to have a critically damped system.
1253
- """
1254
-
1255
1266
  derror: numpy.ndarray # Eigen::MatrixXd
1256
1267
  """Current velocity error vector.
1257
1268
  """
@@ -1261,7 +1272,7 @@ class DynamicsJointsTask:
1261
1272
  """
1262
1273
 
1263
1274
  kd: float # double
1264
- """D gain for position control.
1275
+ """D gain for position control (if negative, will be critically damped)
1265
1276
  """
1266
1277
 
1267
1278
  kp: float # double
@@ -1349,10 +1360,6 @@ class DynamicsOrientationTask:
1349
1360
  :param weight: task weight"""
1350
1361
  ...
1351
1362
 
1352
- critically_damped: bool # bool
1353
- """If this is true, kd will be computed from kp to have a critically damped system.
1354
- """
1355
-
1356
1363
  derror: numpy.ndarray # Eigen::MatrixXd
1357
1364
  """Current velocity error vector.
1358
1365
  """
@@ -1366,7 +1373,7 @@ class DynamicsOrientationTask:
1366
1373
  """
1367
1374
 
1368
1375
  kd: float # double
1369
- """D gain for position control.
1376
+ """D gain for position control (if negative, will be critically damped)
1370
1377
  """
1371
1378
 
1372
1379
  kp: float # double
@@ -1424,8 +1431,8 @@ class DynamicsPositionTask:
1424
1431
  :param weight: task weight"""
1425
1432
  ...
1426
1433
 
1427
- critically_damped: bool # bool
1428
- """If this is true, kd will be computed from kp to have a critically damped system.
1434
+ ddtarget_world: numpy.ndarray # Eigen::Vector3d
1435
+ """Target acceleration in the world.
1429
1436
  """
1430
1437
 
1431
1438
  derror: numpy.ndarray # Eigen::MatrixXd
@@ -1445,7 +1452,7 @@ class DynamicsPositionTask:
1445
1452
  """
1446
1453
 
1447
1454
  kd: float # double
1448
- """D gain for position control.
1455
+ """D gain for position control (if negative, will be critically damped)
1449
1456
  """
1450
1457
 
1451
1458
  kp: float # double
@@ -1469,45 +1476,6 @@ class DynamicsPositionTask:
1469
1476
  """
1470
1477
 
1471
1478
 
1472
- class DynamicsReactionRatioConstraint:
1473
- def __init__(
1474
- arg1: object,
1475
- arg2: Contact,
1476
- arg3: float,
1477
-
1478
- ) -> None:
1479
- ...
1480
-
1481
- def configure(
1482
- self: DynamicsReactionRatioConstraint,
1483
- name: str, # std::string
1484
- priority: any, # placo::kinematics::ConeConstraint::Priority
1485
- weight: float = 1.0, # double
1486
-
1487
- ) -> None:
1488
- """Configures the object.
1489
-
1490
-
1491
- :param name: task name
1492
-
1493
- :param priority: task priority (hard, soft or scaled)
1494
-
1495
- :param weight: task weight"""
1496
- ...
1497
-
1498
- name: str # std::string
1499
- """Object name.
1500
- """
1501
-
1502
- priority: any # placo::kinematics::ConeConstraint::Priority
1503
- """Object priority.
1504
- """
1505
-
1506
- reaction_ratio: float # double
1507
- """Reaction ratio to be enforced.
1508
- """
1509
-
1510
-
1511
1479
  class DynamicsRelativeFrameTask:
1512
1480
  T_a_b: any
1513
1481
 
@@ -1591,10 +1559,6 @@ class DynamicsRelativeOrientationTask:
1591
1559
  :param weight: task weight"""
1592
1560
  ...
1593
1561
 
1594
- critically_damped: bool # bool
1595
- """If this is true, kd will be computed from kp to have a critically damped system.
1596
- """
1597
-
1598
1562
  derror: numpy.ndarray # Eigen::MatrixXd
1599
1563
  """Current velocity error vector.
1600
1564
  """
@@ -1608,7 +1572,7 @@ class DynamicsRelativeOrientationTask:
1608
1572
  """
1609
1573
 
1610
1574
  kd: float # double
1611
- """D gain for position control.
1575
+ """D gain for position control (if negative, will be critically damped)
1612
1576
  """
1613
1577
 
1614
1578
  kp: float # double
@@ -1667,12 +1631,8 @@ class DynamicsRelativePositionTask:
1667
1631
  :param weight: task weight"""
1668
1632
  ...
1669
1633
 
1670
- critically_damped: bool # bool
1671
- """If this is true, kd will be computed from kp to have a critically damped system.
1672
- """
1673
-
1674
1634
  ddtarget: numpy.ndarray # Eigen::Vector3d
1675
- """Target relative velocity.
1635
+ """Target relative acceleration.
1676
1636
  """
1677
1637
 
1678
1638
  derror: numpy.ndarray # Eigen::MatrixXd
@@ -1688,7 +1648,7 @@ class DynamicsRelativePositionTask:
1688
1648
  """
1689
1649
 
1690
1650
  kd: float # double
1691
- """D gain for position control.
1651
+ """D gain for position control (if negative, will be critically damped)
1692
1652
  """
1693
1653
 
1694
1654
  kp: float # double
@@ -1759,6 +1719,7 @@ class DynamicsSolver:
1759
1719
  def add_external_wrench_contact(
1760
1720
  self: DynamicsSolver,
1761
1721
  frame_name: str, # std::string
1722
+ reference: str = "world", # std::string
1762
1723
 
1763
1724
  ) -> ExternalWrenchContact:
1764
1725
  """Adds an external wrench.
@@ -1766,6 +1727,8 @@ class DynamicsSolver:
1766
1727
 
1767
1728
  :param frame_name: frame
1768
1729
 
1730
+ :param reference: reference frame (world or local)
1731
+
1769
1732
  :return: external wrench contact"""
1770
1733
  ...
1771
1734
 
@@ -1886,35 +1849,6 @@ class DynamicsSolver:
1886
1849
  :return: puppet contact"""
1887
1850
  ...
1888
1851
 
1889
- def add_reaction_ratio_constraint(
1890
- self: DynamicsSolver,
1891
- contact: Contact, # placo::dynamics::Contact
1892
- reaction_ratio: float, # double
1893
-
1894
- ) -> DynamicsReactionRatioConstraint:
1895
- """Adds a constraint enforce reaction ratio.
1896
-
1897
-
1898
- :param contact: contact
1899
-
1900
- :param reaction_ratio: reaction ratio to enforce
1901
-
1902
- :return: reaction ratio constraint"""
1903
- ...
1904
-
1905
- def add_relative_fixed_contact(
1906
- self: DynamicsSolver,
1907
- frame_task: DynamicsRelativeFrameTask, # placo::dynamics::RelativeFrameTask
1908
-
1909
- ) -> Relative6DContact:
1910
- """Adds a relative fixed contact, can be used for fixed closed loops.
1911
-
1912
-
1913
- :param frame_task: the associated relative frame task
1914
-
1915
- :return: relative fixed contact"""
1916
- ...
1917
-
1918
1852
  def add_relative_frame_task(
1919
1853
  self: DynamicsSolver,
1920
1854
  frame_a_name: str, # std::string
@@ -1953,19 +1887,6 @@ class DynamicsSolver:
1953
1887
  :return: relative orientation task"""
1954
1888
  ...
1955
1889
 
1956
- def add_relative_point_contact(
1957
- self: DynamicsSolver,
1958
- position_task: DynamicsRelativePositionTask, # placo::dynamics::RelativePositionTask
1959
-
1960
- ) -> RelativePointContact:
1961
- """Adds a relative point contact, which can be typically used for internal forces like loop-closing.
1962
-
1963
-
1964
- :param position_task: associated relative position task
1965
-
1966
- :return: relative point contact"""
1967
- ...
1968
-
1969
1890
  def add_relative_position_task(
1970
1891
  self: DynamicsSolver,
1971
1892
  frame_a_name: str, # std::string
@@ -2047,6 +1968,10 @@ class DynamicsSolver:
2047
1968
  ) -> int:
2048
1969
  ...
2049
1970
 
1971
+ damping: float # double
1972
+ """Global damping that is added to all the joints.
1973
+ """
1974
+
2050
1975
  dt: float # double
2051
1976
  """Solver dt (seconds)
2052
1977
  """
@@ -2090,10 +2015,6 @@ class DynamicsSolver:
2090
2015
  """Enables the velocity vs torque inequalities."""
2091
2016
  ...
2092
2017
 
2093
- friction: float # double
2094
- """Global friction that is added to all the joints.
2095
- """
2096
-
2097
2018
  def get_contact(
2098
2019
  arg1: DynamicsSolver,
2099
2020
  arg2: int,
@@ -2117,10 +2038,6 @@ class DynamicsSolver:
2117
2038
  """Instance of the problem.
2118
2039
  """
2119
2040
 
2120
- qdd_safe: float # double
2121
- """The value of qdd safe.
2122
- """
2123
-
2124
2041
  def remove_constraint(
2125
2042
  self: DynamicsSolver,
2126
2043
  constraint: DynamicsConstraint, # placo::dynamics::Constraint
@@ -2154,50 +2071,56 @@ class DynamicsSolver:
2154
2071
  :param task: frame task"""
2155
2072
  ...
2156
2073
 
2157
- def reset_joint(
2074
+ robot: RobotWrapper # placo::model::RobotWrapper
2075
+
2076
+ def set_kd(
2158
2077
  self: DynamicsSolver,
2159
- joint_name: str, # const std::string &
2078
+ kd: float, # double
2160
2079
 
2161
2080
  ) -> None:
2162
- """Resets a given joint so that its torque is no longer overriden.
2081
+ """Set the kp for all tasks.
2163
2082
 
2164
2083
 
2165
- :param joint_name: the joint"""
2084
+ :param kpd:"""
2166
2085
  ...
2167
2086
 
2168
- robot: RobotWrapper # placo::model::RobotWrapper
2169
-
2170
- def set_passive(
2087
+ def set_kp(
2171
2088
  self: DynamicsSolver,
2172
- joint_name: str, # const std::string &
2173
- kp: float = 0., # double
2174
- kd: float = 0., # double
2089
+ kp: float, # double
2175
2090
 
2176
2091
  ) -> None:
2177
- """Sets a DoF as passive, the corresponding tau will be fixed in the equation of motion it can be purely passive joint or a spring-like behaviour.
2092
+ """Set the kp for all tasks.
2178
2093
 
2179
2094
 
2180
- :param joint_name: the joint
2095
+ :param kp:"""
2096
+ ...
2097
+
2098
+ def set_qdd_safe(
2099
+ self: DynamicsSolver,
2100
+ joint: str, # std::string
2101
+ qdd: float, # double
2181
2102
 
2182
- :param is_passive: true if the should the joint be passive
2103
+ ) -> None:
2104
+ """Sets the "safe" Qdd acceptable for a given joint (used by joint limits)
2105
+
2183
2106
 
2184
- :param kp: kp gain if the joint is a spring (0 by default)
2107
+ :param joint:
2185
2108
 
2186
- :param kd: kd gain if the joint is a spring (0 by default)"""
2109
+ :param qdd:"""
2187
2110
  ...
2188
2111
 
2189
- def set_tau(
2112
+ def set_torque_limit(
2190
2113
  self: DynamicsSolver,
2191
- joint_name: str, # const std::string &
2192
- tau: float, # double
2114
+ joint: str, # std::string
2115
+ limit: float, # double
2193
2116
 
2194
2117
  ) -> None:
2195
- """Sets a custom torque to be applied by a given joint.
2118
+ """Sets the allowed torque limit by the solver for a given joint. This will not affect the robot's model effort limit. When computing the velocity vs torque limit, the robot's model effort will still be used. You can see this limit as a continuous limit allowable for the robot, while the robot's model limit is the maximum possible torque.
2196
2119
 
2197
2120
 
2198
- :param joint_name: the joint
2121
+ :param joint:
2199
2122
 
2200
- :param tau: torque"""
2123
+ :param limit:"""
2201
2124
  ...
2202
2125
 
2203
2126
  def solve(
@@ -2208,7 +2131,7 @@ class DynamicsSolver:
2208
2131
  ...
2209
2132
 
2210
2133
  torque_cost: float # double
2211
- """Cost for torque regularization.
2134
+ """Cost for torque regularization (1e-3 by default)
2212
2135
  """
2213
2136
 
2214
2137
 
@@ -2266,10 +2189,6 @@ class DynamicsTask:
2266
2189
  :param weight: task weight"""
2267
2190
  ...
2268
2191
 
2269
- critically_damped: bool # bool
2270
- """If this is true, kd will be computed from kp to have a critically damped system.
2271
- """
2272
-
2273
2192
  derror: numpy.ndarray # Eigen::MatrixXd
2274
2193
  """Current velocity error vector.
2275
2194
  """
@@ -2279,7 +2198,7 @@ class DynamicsTask:
2279
2198
  """
2280
2199
 
2281
2200
  kd: float # double
2282
- """D gain for position control.
2201
+ """D gain for position control (if negative, will be critically damped)
2283
2202
  """
2284
2203
 
2285
2204
  kp: float # double
@@ -2327,10 +2246,6 @@ class DynamicsTorqueTask:
2327
2246
  :param weight: task weight"""
2328
2247
  ...
2329
2248
 
2330
- critically_damped: bool # bool
2331
- """If this is true, kd will be computed from kp to have a critically damped system.
2332
- """
2333
-
2334
2249
  derror: numpy.ndarray # Eigen::MatrixXd
2335
2250
  """Current velocity error vector.
2336
2251
  """
@@ -2340,7 +2255,7 @@ class DynamicsTorqueTask:
2340
2255
  """
2341
2256
 
2342
2257
  kd: float # double
2343
- """D gain for position control.
2258
+ """D gain for position control (if negative, will be critically damped)
2344
2259
  """
2345
2260
 
2346
2261
  kp: float # double
@@ -2355,10 +2270,23 @@ class DynamicsTorqueTask:
2355
2270
  """Object priority.
2356
2271
  """
2357
2272
 
2273
+ def reset_torque(
2274
+ self: DynamicsTorqueTask,
2275
+ joint: str, # std::string
2276
+
2277
+ ) -> None:
2278
+ """Removes a joint from this task.
2279
+
2280
+
2281
+ :param joint: joint namle"""
2282
+ ...
2283
+
2358
2284
  def set_torque(
2359
2285
  self: DynamicsTorqueTask,
2360
2286
  joint: str, # std::string
2361
2287
  torque: float, # double
2288
+ kp: float = 0.0, # double
2289
+ kd: float = 0.0, # double
2362
2290
 
2363
2291
  ) -> None:
2364
2292
  """Sets the target for a given joint.
@@ -2366,7 +2294,11 @@ class DynamicsTorqueTask:
2366
2294
 
2367
2295
  :param joint: joint name
2368
2296
 
2369
- :param torque: target torque"""
2297
+ :param torque: target torque
2298
+
2299
+ :param kp: proportional gain (optional)
2300
+
2301
+ :param kd: derivative gain (optional)"""
2370
2302
  ...
2371
2303
 
2372
2304
 
@@ -2535,6 +2467,7 @@ class ExternalWrenchContact:
2535
2467
  def __init__(
2536
2468
  self: ExternalWrenchContact,
2537
2469
  frame_index: any, # pinocchio::FrameIndex
2470
+ reference: any, # pinocchio::ReferenceFrame
2538
2471
 
2539
2472
  ) -> any:
2540
2473
  """see DynamicsSolver::add_external_wrench_contact"""
@@ -3232,6 +3165,24 @@ class HumanoidRobot:
3232
3165
  ) -> any:
3233
3166
  ...
3234
3167
 
3168
+ def add_q_noise(
3169
+ self: HumanoidRobot,
3170
+ noise: float, # double
3171
+
3172
+ ) -> None:
3173
+ """Adds some noise to the configuration."""
3174
+ ...
3175
+
3176
+ def centroidal_map(
3177
+ self: HumanoidRobot,
3178
+
3179
+ ) -> numpy.ndarray:
3180
+ """Centroidal map.
3181
+
3182
+
3183
+ :return: jacobian (6 x n matrix)"""
3184
+ ...
3185
+
3235
3186
  collision_model: any # pinocchio::GeometryModel
3236
3187
  """Pinocchio collision model.
3237
3188
  """
@@ -4423,17 +4374,6 @@ class KinematicsSolver:
4423
4374
  :return: position task"""
4424
4375
  ...
4425
4376
 
4426
- def add_q_noise(
4427
- self: KinematicsSolver,
4428
- noise: float = 1e-5, # double
4429
-
4430
- ) -> None:
4431
- """Adds some noise on the configuration of the robot (q)
4432
-
4433
-
4434
- :param noise: noise level, expressed in ratio of the joint limits"""
4435
- ...
4436
-
4437
4377
  def add_regularization_task(
4438
4378
  self: KinematicsSolver,
4439
4379
  magnitude: float = 1e-6, # double
@@ -5028,6 +4968,10 @@ class OrientationTask:
5028
4968
 
5029
4969
 
5030
4970
  class PointContact:
4971
+ R_world_surface: numpy.ndarray # Eigen::Matrix3d
4972
+ """rotation matrix expressing the surface frame in the world frame (for unilateral contact)
4973
+ """
4974
+
5031
4975
  def __init__(
5032
4976
  self: PointContact,
5033
4977
  position_task: DynamicsPositionTask, # placo::dynamics::PositionTask
@@ -5486,36 +5430,6 @@ class RegularizationTask:
5486
5430
  ...
5487
5431
 
5488
5432
 
5489
- class Relative6DContact:
5490
- def __init__(
5491
- self: Relative6DContact,
5492
- frame_task: DynamicsRelativeFrameTask, # placo::dynamics::RelativeFrameTask
5493
-
5494
- ) -> any:
5495
- """see DynamicsSolver::add_relative_fixed_contact"""
5496
- ...
5497
-
5498
- active: bool # bool
5499
- """true if the contact is active (ignored by the solver else, this allow to enable/disable a contact without removing it from the solver)
5500
- """
5501
-
5502
- mu: float # double
5503
- """Coefficient of friction (if relevant)
5504
- """
5505
-
5506
- weight_forces: float # double
5507
- """Weight of forces for the optimization (if relevant)
5508
- """
5509
-
5510
- weight_moments: float # double
5511
- """Weight of moments for optimization (if relevant)
5512
- """
5513
-
5514
- wrench: numpy.ndarray # Eigen::VectorXd
5515
- """Wrench populated after the DynamicsSolver::solve call.
5516
- """
5517
-
5518
-
5519
5433
  class RelativeFrameTask:
5520
5434
  T_a_b: any
5521
5435
 
@@ -5651,36 +5565,6 @@ class RelativeOrientationTask:
5651
5565
  ...
5652
5566
 
5653
5567
 
5654
- class RelativePointContact:
5655
- def __init__(
5656
- self: RelativePointContact,
5657
- position_task: DynamicsRelativePositionTask, # placo::dynamics::RelativePositionTask
5658
-
5659
- ) -> any:
5660
- """see DynamicsSolver::add_relative_point_contact"""
5661
- ...
5662
-
5663
- active: bool # bool
5664
- """true if the contact is active (ignored by the solver else, this allow to enable/disable a contact without removing it from the solver)
5665
- """
5666
-
5667
- mu: float # double
5668
- """Coefficient of friction (if relevant)
5669
- """
5670
-
5671
- weight_forces: float # double
5672
- """Weight of forces for the optimization (if relevant)
5673
- """
5674
-
5675
- weight_moments: float # double
5676
- """Weight of moments for optimization (if relevant)
5677
- """
5678
-
5679
- wrench: numpy.ndarray # Eigen::VectorXd
5680
- """Wrench populated after the DynamicsSolver::solve call.
5681
- """
5682
-
5683
-
5684
5568
  class RelativePositionTask:
5685
5569
  A: numpy.ndarray # Eigen::MatrixXd
5686
5570
  """Matrix A in the task Ax = b, where x are the joint delta positions.
@@ -5789,6 +5673,24 @@ class RobotWrapper:
5789
5673
  :param urdf_content: if it is not empty, it will be used as the URDF content instead of loading it from the file"""
5790
5674
  ...
5791
5675
 
5676
+ def add_q_noise(
5677
+ self: RobotWrapper,
5678
+ noise: float, # double
5679
+
5680
+ ) -> None:
5681
+ """Adds some noise to the configuration."""
5682
+ ...
5683
+
5684
+ def centroidal_map(
5685
+ self: RobotWrapper,
5686
+
5687
+ ) -> numpy.ndarray:
5688
+ """Centroidal map.
5689
+
5690
+
5691
+ :return: jacobian (6 x n matrix)"""
5692
+ ...
5693
+
5792
5694
  collision_model: any # pinocchio::GeometryModel
5793
5695
  """Pinocchio collision model.
5794
5696
  """
@@ -7154,12 +7056,6 @@ def frame_yaw(
7154
7056
  ...
7155
7057
 
7156
7058
 
7157
- def getNumpyType(
7158
-
7159
- ) -> any:
7160
- ...
7161
-
7162
-
7163
7059
  def get_classes_registry(
7164
7060
 
7165
7061
  ) -> any:
@@ -7213,6 +7109,15 @@ class map_string_double:
7213
7109
  ...
7214
7110
 
7215
7111
 
7112
+ def optimal_transformation(
7113
+ points_in_A: numpy.ndarray, # Eigen::MatrixXd
7114
+ points_in_B: numpy.ndarray, # Eigen::MatrixXd
7115
+
7116
+ ) -> numpy.ndarray:
7117
+ """Finds the optimal transformation T_a_b that minimizes the sum of squared distances between the (same) points with coordinates expressed in A and B. Points are stacked in lines (columns are x, y and z) in the matrices."""
7118
+ ...
7119
+
7120
+
7216
7121
  def rotation_from_axis(
7217
7122
  axis: str, # std::string
7218
7123
  vector: numpy.ndarray, # Eigen::Vector3d
@@ -7236,13 +7141,6 @@ def seed(
7236
7141
  ...
7237
7142
 
7238
7143
 
7239
- def setNumpyType(
7240
- numpy_type: object,
7241
-
7242
- ) -> None:
7243
- ...
7244
-
7245
-
7246
7144
  def sharedMemory(
7247
7145
  value: bool,
7248
7146
 
@@ -7250,18 +7148,6 @@ def sharedMemory(
7250
7148
  ...
7251
7149
 
7252
7150
 
7253
- def switchToNumpyArray(
7254
-
7255
- ) -> any:
7256
- ...
7257
-
7258
-
7259
- def switchToNumpyMatrix(
7260
-
7261
- ) -> any:
7262
- ...
7263
-
7264
-
7265
7151
  class vector_Collision:
7266
7152
  def __init__(
7267
7153
  arg1: object,
@@ -7446,4 +7332,4 @@ def wrap_angle(
7446
7332
  ...
7447
7333
 
7448
7334
 
7449
- __groups__ = {'placo::dynamics': ['AvoidSelfCollisionsDynamicsConstraint', 'Contact', 'Contact6D', 'DynamicsCoMTask', 'DynamicsConstraint', 'DynamicsFrameTask', 'DynamicsGearTask', 'DynamicsJointsTask', 'DynamicsOrientationTask', 'DynamicsPositionTask', 'DynamicsReactionRatioConstraint', 'DynamicsRelativeFrameTask', 'DynamicsRelativeOrientationTask', 'DynamicsRelativePositionTask', 'DynamicsSolver', 'DynamicsSolverResult', 'DynamicsTask', 'DynamicsTorqueTask', 'ExternalWrenchContact', 'PointContact', 'PuppetContact', 'Relative6DContact', 'RelativePointContact', 'TaskContact'], 'placo::kinematics': ['AvoidSelfCollisionsKinematicsConstraint', 'AxisAlignTask', 'CentroidalMomentumTask', 'CoMPolygonConstraint', 'CoMTask', 'ConeConstraint', 'DistanceTask', 'FrameTask', 'GearTask', 'JointsTask', 'KinematicsConstraint', 'KinematicsSolver', 'KineticEnergyRegularizationTask', 'ManipulabilityTask', 'OrientationTask', 'PositionTask', 'RegularizationTask', 'RelativeFrameTask', 'RelativeOrientationTask', 'RelativePositionTask', 'Task', 'WheelTask'], 'placo::tools': ['AxisesMask', 'CubicSpline', 'CubicSpline3D', 'Prioritized'], 'placo::model': ['Collision', 'Distance', 'RobotWrapper', 'RobotWrapper_State'], 'placo::problem': ['Expression', 'Integrator', 'IntegratorTrajectory', 'PolygonConstraint', 'Problem', 'ProblemConstraint', 'QPError', 'Sparsity', 'SparsityInterval', 'Variable'], 'placo::humanoid': ['Footstep', 'FootstepsPlanner', 'FootstepsPlannerNaive', 'FootstepsPlannerRepetitive', 'HumanoidParameters', 'HumanoidRobot', 'LIPM', 'LIPMTrajectory', 'Support', 'SwingFoot', 'SwingFootCubic', 'SwingFootCubicTrajectory', 'SwingFootQuintic', 'SwingFootQuinticTrajectory', 'SwingFootTrajectory', 'WalkPatternGenerator', 'WalkTasks', 'WalkTrajectory']}
7335
+ __groups__ = {'placo::dynamics': ['AvoidSelfCollisionsDynamicsConstraint', 'Contact', 'Contact6D', 'DynamicsCoMTask', 'DynamicsConstraint', 'DynamicsFrameTask', 'DynamicsGearTask', 'DynamicsJointsTask', 'DynamicsOrientationTask', 'DynamicsPositionTask', 'DynamicsRelativeFrameTask', 'DynamicsRelativeOrientationTask', 'DynamicsRelativePositionTask', 'DynamicsSolver', 'DynamicsSolverResult', 'DynamicsTask', 'DynamicsTorqueTask', 'ExternalWrenchContact', 'PointContact', 'PuppetContact', 'TaskContact'], 'placo::kinematics': ['AvoidSelfCollisionsKinematicsConstraint', 'AxisAlignTask', 'CentroidalMomentumTask', 'CoMPolygonConstraint', 'CoMTask', 'ConeConstraint', 'DistanceTask', 'FrameTask', 'GearTask', 'JointsTask', 'KinematicsConstraint', 'KinematicsSolver', 'KineticEnergyRegularizationTask', 'ManipulabilityTask', 'OrientationTask', 'PositionTask', 'RegularizationTask', 'RelativeFrameTask', 'RelativeOrientationTask', 'RelativePositionTask', 'Task', 'WheelTask'], 'placo::tools': ['AxisesMask', 'CubicSpline', 'CubicSpline3D', 'Prioritized'], 'placo::model': ['Collision', 'Distance', 'RobotWrapper', 'RobotWrapper_State'], 'placo::problem': ['Expression', 'Integrator', 'IntegratorTrajectory', 'PolygonConstraint', 'Problem', 'ProblemConstraint', 'QPError', 'Sparsity', 'SparsityInterval', 'Variable'], 'placo::humanoid': ['Footstep', 'FootstepsPlanner', 'FootstepsPlannerNaive', 'FootstepsPlannerRepetitive', 'HumanoidParameters', 'HumanoidRobot', 'LIPM', 'LIPMTrajectory', 'Support', 'SwingFoot', 'SwingFootCubic', 'SwingFootCubicTrajectory', 'SwingFootQuintic', 'SwingFootQuinticTrajectory', 'SwingFootTrajectory', 'WalkPatternGenerator', 'WalkTasks', 'WalkTrajectory']}
@@ -0,0 +1,37 @@
1
+ import argparse
2
+ import placo
3
+ import time
4
+ from placo_utils.visualization import *
5
+
6
+ arg_parser = argparse.ArgumentParser()
7
+ arg_parser.add_argument("path", help="Path to the URDF")
8
+ arg_parser.add_argument("--frames", help="Frame to display", nargs="+")
9
+ arg_parser.add_argument("--animate", help="Animate the robot", action="store_true")
10
+ args = arg_parser.parse_args()
11
+
12
+ robot = placo.RobotWrapper(args.path, placo.Flags.ignore_collisions)
13
+ robot.update_kinematics()
14
+
15
+ print("Joint names:")
16
+ print(list(robot.joint_names()))
17
+
18
+ print("Frame names:")
19
+ print(list(robot.frame_names()))
20
+
21
+ viz = robot_viz(robot)
22
+ t = 0
23
+
24
+ while True:
25
+ viz.display(robot.state.q)
26
+
27
+ if args.frames:
28
+ for frame in args.frames:
29
+ robot_frame_viz(robot, frame)
30
+
31
+ if args.animate:
32
+ for joint in robot.joint_names():
33
+ robot.set_joint(joint, np.sin(t))
34
+ robot.update_kinematics()
35
+
36
+ t += 0.01
37
+ time.sleep(0.01)
@@ -238,7 +238,12 @@ def contacts_viz(solver: placo.DynamicsSolver, ratio=0.1, radius=0.005):
238
238
  frame_name = frames[contact.position_task().frame_index]
239
239
  T_world_frame = robot.get_T_world_frame(frame_name)
240
240
  wrench = T_world_frame[:3, :3] @ contact.wrench[:3]
241
- origin = T_world_frame[:3, 3] + T_world_frame[:3, :3] @ contact.zmp()
241
+
242
+ if np.linalg.norm(wrench) < 1e-6:
243
+ origin = T_world_frame[:3, 3]
244
+ else:
245
+ origin = T_world_frame[:3, 3] + T_world_frame[:3, :3] @ contact.zmp()
246
+
242
247
  arrow_viz(
243
248
  f"contact_{k}",
244
249
  origin,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: placo
3
- Version: 0.5.5
3
+ Version: 0.5.9
4
4
  Summary: PlaCo: Rhoban Planning and Control
5
5
  Requires-Python: >= 3.8
6
6
  License-Expression: MIT
@@ -0,0 +1,15 @@
1
+ cmeel.prefix/lib/liblibplaco.so,sha256=WWlXmXnUsCLqaf6U3l-sshqLSDTUQhif2YLhVzArT6M,2610192
2
+ cmeel.prefix/lib/python3.10/site-packages/placo.pyi,sha256=P04z_rb8U1RALIkaH-Woy9o_-hRWMXi63T4udnIAcKk,152347
3
+ cmeel.prefix/lib/python3.10/site-packages/placo.so,sha256=bTI_xH7yermgFU59QPhKHV4B18XVib9wa4pTgW3ifDw,7502000
4
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/__init__.py,sha256=UN-fc5KfBWQ-_qkm0Ajouh-T9tBGm5aUtuzBiH1tRtk,80
5
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/tf.py,sha256=fFRXNbeLlXzn5VOqYl7hcSuvOOtTDTiLi_Lpd9_l6wA,36
6
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/view.py,sha256=7KiLYGpTKaPJtFHZ6kjERdOzJiPSDUtkIKHbziHpkYk,928
7
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/visualization.py,sha256=1qoD-9wa7t-A3gCI54UJcKJfEQs9wmgeHe29J__H4Ao,7568
8
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/__pycache__/__init__.cpython-310.pyc,sha256=tJrTajdA7hNO9tZkE1oN49rU-61lCNUED-mQXdAvzAs,261
9
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/__pycache__/tf.cpython-310.pyc,sha256=APWQ5-zKgbEcMnkv6Hxgj_Q46jpnuOyL9YbSrj6Z5Vw,204
10
+ cmeel.prefix/lib/python3.10/site-packages/placo_utils/__pycache__/visualization.cpython-310.pyc,sha256=cRGElId-CuT5RIhbvnUArQV34lmiSNbpF0FbpvgAqis,6543
11
+ placo-0.5.9.dist-info/license/LICENSE,sha256=q2bBXvk4Eh7TmP11LoIOIGSUuJbR30JBI6ZZ37g52T4,1061
12
+ placo-0.5.9.dist-info/METADATA,sha256=DBZEU9k-p_sKts--vczx6MGjuV1DpmxFHGo0O7-CRiE,875
13
+ placo-0.5.9.dist-info/WHEEL,sha256=y7GzdFHC0qrZwnE2SqFjrXxL9NLtXflO9hVb0PhWwIU,115
14
+ placo-0.5.9.dist-info/top_level.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ placo-0.5.9.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- cmeel.prefix/lib/liblibplaco.so,sha256=gsPFTpY695yX8CwqX1lL3phEVnRhrpXbRlQxo9l-Rjw,2604920
2
- cmeel.prefix/lib/python3.10/site-packages/placo.pyi,sha256=ZlxhV1VATKxbobDkPmuk45_iHK11uEeof-9usUK3Wsk,155347
3
- cmeel.prefix/lib/python3.10/site-packages/placo.so,sha256=e5sJ8vV644INewGJ4movKPNSijHg9nFW8OkSDj_ocTQ,7593632
4
- cmeel.prefix/lib/python3.10/site-packages/placo_utils/__init__.py,sha256=UN-fc5KfBWQ-_qkm0Ajouh-T9tBGm5aUtuzBiH1tRtk,80
5
- cmeel.prefix/lib/python3.10/site-packages/placo_utils/tf.py,sha256=fFRXNbeLlXzn5VOqYl7hcSuvOOtTDTiLi_Lpd9_l6wA,36
6
- cmeel.prefix/lib/python3.10/site-packages/placo_utils/visualization.py,sha256=EOXNjYKiOSE2F4vbEXoFJ4UBbGBUvC5v4ANjYL3IUVo,7440
7
- cmeel.prefix/lib/python3.10/site-packages/placo_utils/__pycache__/__init__.cpython-310.pyc,sha256=tJrTajdA7hNO9tZkE1oN49rU-61lCNUED-mQXdAvzAs,261
8
- cmeel.prefix/lib/python3.10/site-packages/placo_utils/__pycache__/tf.cpython-310.pyc,sha256=APWQ5-zKgbEcMnkv6Hxgj_Q46jpnuOyL9YbSrj6Z5Vw,204
9
- cmeel.prefix/lib/python3.10/site-packages/placo_utils/__pycache__/visualization.cpython-310.pyc,sha256=csu-iQsBSz2cD40662EShITueJ9_KY5jhSLqDlItRew,6485
10
- placo-0.5.5.dist-info/license/LICENSE,sha256=q2bBXvk4Eh7TmP11LoIOIGSUuJbR30JBI6ZZ37g52T4,1061
11
- placo-0.5.5.dist-info/METADATA,sha256=oNpPzg8Ni3d_jxrf5_QBdDg6bsL-9vdbLpCIKk3sjSk,875
12
- placo-0.5.5.dist-info/WHEEL,sha256=y7GzdFHC0qrZwnE2SqFjrXxL9NLtXflO9hVb0PhWwIU,115
13
- placo-0.5.5.dist-info/top_level.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- placo-0.5.5.dist-info/RECORD,,
File without changes