mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-04-20 03:41:17 -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.name = [
|
||||
"Axis_0_Joint",
|
||||
"Axis_1_Joint",
|
||||
"Axis_2_Joint",
|
||||
"Axis_3_Joint",
|
||||
"Wrist_Differential_Joint",
|
||||
"Wrist-EF_Roll_Joint",
|
||||
"Gripper_Slider_Left",
|
||||
"axis_0_joint",
|
||||
"axis_1_joint",
|
||||
"axis_2_joint",
|
||||
"axis_3_joint",
|
||||
"wrist_yaw_joint",
|
||||
"wrist_roll_joint",
|
||||
"ef_gripper_left_joint",
|
||||
]
|
||||
self.saved_joint_state.position = [0.0] * len(
|
||||
self.saved_joint_state.name
|
||||
@@ -133,7 +133,7 @@ class ArmNode(Node):
|
||||
return # command needs either position or velocity for all 7 joints
|
||||
|
||||
# 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
|
||||
velocities = [
|
||||
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
|
||||
if left_trigger > 0 or right_trigger > 0:
|
||||
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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user