|
7 | 7 | import time
|
8 | 8 |
|
9 | 9 | from datetime import timedelta
|
10 |
| -from typing import Optional, Tuple, Union |
| 10 | +from typing import Optional, Tuple |
11 | 11 |
|
12 | 12 | import numpy as np
|
13 | 13 |
|
@@ -188,8 +188,7 @@ def extract_numeric_data_matrix_autodiff(
|
188 | 188 | plant_components (ArmPlantComponents): This must contain the plant. Optionally,
|
189 | 189 | it can also contain the plant's context.
|
190 | 190 | joint_data (JointData): The joint data. Only the joint positions, velocities,
|
191 |
| - and accelerations are used for the data matrix computation. The joint |
192 |
| - torques are flattened and returned. |
| 191 | + and accelerations are used for the data matrix computation. |
193 | 192 | add_rotor_inertia (bool): Whether to add rotor inertia as a parameter.
|
194 | 193 | add_reflected_inertia (bool): Whether to add reflected inertia as a parameter.
|
195 | 194 | NOTE: This is mutually exclusive with add_rotor_inertia.
|
@@ -276,9 +275,9 @@ def extract_numeric_data_matrix_autodiff(
|
276 | 275 | ad_plant_components.plant_context, forces
|
277 | 276 | )
|
278 | 277 | ad_torques = ad_plant_components.plant.CalcInverseDynamics(
|
279 |
| - ad_plant_components.plant_context, |
280 |
| - joint_data.joint_accelerations[i], |
281 |
| - forces, |
| 278 | + context=ad_plant_components.plant_context, |
| 279 | + known_vdot=joint_data.joint_accelerations[i], |
| 280 | + external_forces=forces, |
282 | 281 | )
|
283 | 282 |
|
284 | 283 | if not payload_only:
|
|
0 commit comments