Skip to content

Commit 33a2b18

Browse files
committed
Clean up documentation
1 parent 30d8035 commit 33a2b18

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

robot_payload_id/data/data_matrix_numeric.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import time
88

99
from datetime import timedelta
10-
from typing import Optional, Tuple, Union
10+
from typing import Optional, Tuple
1111

1212
import numpy as np
1313

@@ -188,8 +188,7 @@ def extract_numeric_data_matrix_autodiff(
188188
plant_components (ArmPlantComponents): This must contain the plant. Optionally,
189189
it can also contain the plant's context.
190190
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.
193192
add_rotor_inertia (bool): Whether to add rotor inertia as a parameter.
194193
add_reflected_inertia (bool): Whether to add reflected inertia as a parameter.
195194
NOTE: This is mutually exclusive with add_rotor_inertia.
@@ -276,9 +275,9 @@ def extract_numeric_data_matrix_autodiff(
276275
ad_plant_components.plant_context, forces
277276
)
278277
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,
282281
)
283282

284283
if not payload_only:

robot_payload_id/optimization/inertial_param_sdp.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ def solve_inertial_param_sdp(
7979
8080
Args:
8181
num_links (int): The number of links in the robot.
82-
W_data (np.ndarray): The data matrix.
83-
tau_data (np.ndarray): The joint torque data.
82+
W_data (np.ndarray): The data matrix of shape (N * num_links, 10) where N is the
83+
number of data points.
84+
tau_data (np.ndarray): The joint torque data of shape (N * num_links,) where N
85+
is the number of data points.
8486
base_param_mapping (np.ndarray, optional): The base parameter mapping matrix
8587
that maps the full parameters to the identifiable parameters. It corresponds
8688
to the part of V in the SVD that corresponds to non-zero singular values. If

0 commit comments

Comments
 (0)