mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
feat: control wrist yaw and roll at same time
Also made start_rosbag.sh actually executable ._.
This commit is contained in:
0
auto_start/start_rosbag.sh
Normal file → Executable file
0
auto_start/start_rosbag.sh
Normal file → Executable file
@@ -237,15 +237,13 @@ class SerialRelay(Node):
|
||||
command += "can_relay_tovic,arm,39," + str(axis0) + "," + str(axis1) + "," + str(axis2) + "," + str(axis3) + "\n"
|
||||
|
||||
#Send controls for end effector
|
||||
command += "can_relay_tovic,digit,35," + str(msg.effector_roll) + "\n"
|
||||
|
||||
|
||||
command += "can_relay_tovic,digit,36,0," + str(msg.effector_yaw) + "\n"
|
||||
|
||||
# command += "can_relay_tovic,digit,35," + str(msg.effector_roll) + "\n"
|
||||
# command += "can_relay_tovic,digit,36,0," + str(msg.effector_yaw) + "\n"
|
||||
command += "can_relay_tovic,digit,39," + str(msg.effector_yaw) + "," + str(msg.effector_roll) + "\n"
|
||||
|
||||
command += "can_relay_tovic,digit,26," + str(msg.gripper) + "\n"
|
||||
|
||||
|
||||
command += "can_relay_tovic,digit,28," + str(msg.laser) + "\n"
|
||||
|
||||
command += "can_relay_tovic,digit,34," + str(msg.linear_actuator) + "\n"
|
||||
@@ -260,7 +258,7 @@ class SerialRelay(Node):
|
||||
output.data = msg
|
||||
self.anchor_pub.publish(output)
|
||||
elif self.launch_mode == 'arm': #if in standalone mode, send to MCU directly
|
||||
self.get_logger().info(f"[Arm to MCU] {msg.data}")
|
||||
self.get_logger().info(f"[Arm to MCU] {msg}")
|
||||
self.ser.write(bytes(msg, "utf8"))
|
||||
|
||||
def anchor_feedback(self, msg: String):
|
||||
@@ -286,6 +284,7 @@ class SerialRelay(Node):
|
||||
parts = msg.data.split(",")
|
||||
if len(parts) >= 4:
|
||||
self.digit_feedback.wrist_angle = float(parts[3])
|
||||
# self.digit_feedback.wrist_roll = float(parts[4])
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user