Skip to content

Commit

Permalink
fix: ignore untyped functions
Browse files Browse the repository at this point in the history
  • Loading branch information
engnadeau committed Aug 23, 2022
1 parent e138e6d commit 866c42c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pybotics/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def vector_2_matrix(
transform_matrix = np.eye(4)
for axis, value in zip(convention, rotation_component):
current_rotation = globals()[f"rotation_matrix_{axis}"](value)
transform_matrix = np.dot(transform_matrix, current_rotation)
transform_matrix = np.dot(transform_matrix, current_rotation) # type: ignore

# add translation component
transform_matrix[:-1, -1] = translation_component
Expand Down
10 changes: 5 additions & 5 deletions pybotics/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def fk(self, q: npt.NDArray[np.float64] = None) -> npt.NDArray[np.float64]:
# matrix multiply through transforms
pose = np.eye(4, dtype=float)
for t in transforms:
pose = np.dot(pose, t)
pose = np.dot(pose, t) # type: ignore

return pose

Expand Down Expand Up @@ -151,7 +151,7 @@ def jacobian_world(
j_tr = np.zeros((6, 6), dtype=float)
j_tr[:3, :3] = rotation
j_tr[3:, 3:] = rotation
j_w = np.dot(j_tr, j_fl)
j_w = np.dot(j_tr, j_fl) # type: ignore

return j_w

Expand Down Expand Up @@ -183,7 +183,7 @@ def jacobian_flange(
current_link = self.kinematic_chain.links[i]
p = q[i]
current_link_transform = current_link.transform(p)
current_transform = np.dot(current_link_transform, current_transform)
current_transform = np.dot(current_link_transform, current_transform) # type: ignore

return jacobian_flange

Expand Down Expand Up @@ -224,11 +224,11 @@ def compute_joint_torques(

# calculate force applied to current link
rotation = transform[:3, :3]
force = np.dot(rotation, force)
force = np.dot(rotation, force) # type: ignore

# calculate moment applied to current link
q = transform[:3, -1]
moment = np.dot(rotation, moment) + np.cross(q, force)
moment = np.dot(rotation, moment) + np.cross(q, force) # type: ignore

# append z-component as joint torque
joint_torques.append(moment[-1])
Expand Down

0 comments on commit 866c42c

Please sign in to comment.