mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
Update arm node message types for anchor
This commit is contained in:
@@ -142,12 +142,13 @@ class SerialRelay(Node):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def send_cmd(self, cmd):
|
def send_cmd(self, msg):
|
||||||
if self.launch_mode == 'anchor': #if in anchor mode, send to anchor node to relay
|
if self.launch_mode == 'anchor': #if in anchor mode, send to anchor node to relay
|
||||||
self.anchor_pub.publish(cmd)
|
output = String()
|
||||||
|
output.data = msg
|
||||||
|
self.anchor_pub.publish(output)
|
||||||
elif self.launch_mode == 'arm': #if in standalone mode, send to MCU directly
|
elif self.launch_mode == 'arm': #if in standalone mode, send to MCU directly
|
||||||
self.ser.write(bytes(cmd, "utf8"))
|
self.ser.write(bytes(msg, "utf8"))
|
||||||
#print(f"[Arm Wrote] {cmd}", end="")
|
|
||||||
|
|
||||||
def anchor_feedback(self, msg):
|
def anchor_feedback(self, msg):
|
||||||
self.get_logger.info(f"[Arm Anchor] {msg.data}", end="")
|
self.get_logger.info(f"[Arm Anchor] {msg.data}", end="")
|
||||||
|
|||||||
Reference in New Issue
Block a user