mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-04-20 11:51:16 -05:00
refactor: formalize Arm URDF joint and link names
This commit is contained in:
@@ -87,13 +87,13 @@ class ArmNode(Node):
|
|||||||
)
|
)
|
||||||
self.saved_joint_state = JointState()
|
self.saved_joint_state = JointState()
|
||||||
self.saved_joint_state.name = [
|
self.saved_joint_state.name = [
|
||||||
"Axis_0_Joint",
|
"axis_0_joint",
|
||||||
"Axis_1_Joint",
|
"axis_1_joint",
|
||||||
"Axis_2_Joint",
|
"axis_2_joint",
|
||||||
"Axis_3_Joint",
|
"axis_3_joint",
|
||||||
"Wrist_Differential_Joint",
|
"wrist_yaw_joint",
|
||||||
"Wrist-EF_Roll_Joint",
|
"wrist_roll_joint",
|
||||||
"Gripper_Slider_Left",
|
"ef_gripper_left_joint",
|
||||||
]
|
]
|
||||||
self.saved_joint_state.position = [0.0] * len(
|
self.saved_joint_state.position = [0.0] * len(
|
||||||
self.saved_joint_state.name
|
self.saved_joint_state.name
|
||||||
@@ -133,7 +133,7 @@ class ArmNode(Node):
|
|||||||
return # command needs either position or velocity for all 7 joints
|
return # command needs either position or velocity for all 7 joints
|
||||||
|
|
||||||
# Assumed order: Axis0, Axis1, Axis2, Axis3, Wrist_Yaw, Wrist_Roll, Gripper
|
# Assumed order: Axis0, Axis1, Axis2, Axis3, Wrist_Yaw, Wrist_Roll, Gripper
|
||||||
# TODO: formalize joint names in URDF, refactor here to depend on joint names
|
# TODO: refactor to depend on joint names
|
||||||
# Embedded takes deg*10, ROS2 uses Radians
|
# Embedded takes deg*10, ROS2 uses Radians
|
||||||
velocities = [
|
velocities = [
|
||||||
math.degrees(vel) * 10 if abs(vel) > 0.05 else 0.0 for vel in msg.velocity
|
math.degrees(vel) * 10 if abs(vel) > 0.05 else 0.0 for vel in msg.velocity
|
||||||
|
|||||||
Submodule src/astra_descriptions updated: add9e47469...72d3c223af
@@ -474,7 +474,7 @@ class Headless(Node):
|
|||||||
# Triggers: EF Grippers
|
# Triggers: EF Grippers
|
||||||
if left_trigger > 0 or right_trigger > 0:
|
if left_trigger > 0 or right_trigger > 0:
|
||||||
arm_jointjog.joint_names.append(
|
arm_jointjog.joint_names.append(
|
||||||
"Gripper_Slider_Left" # TODO: Update joint name
|
"ef_gripper_left_joint"
|
||||||
)
|
)
|
||||||
arm_jointjog.velocities.append(float(right_trigger - left_trigger))
|
arm_jointjog.velocities.append(float(right_trigger - left_trigger))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user