This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import rclpy | |
| from rclpy.action import ActionServer | |
| from rclpy.node import Node | |
| import time | |
| import os | |
| import zmq | |
| import tempfile | |
| import functools | |
| from std_msgs.msg import String | |
| from shr_msgs.action import QuestionResponseRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import zmq, time, json, threading | |
| # βββ CONFIG βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # You already bind on the PC; keep it this way: | |
| IP = "0.0.0.0" | |
| PUB_ENDPOINT = f"tcp://{IP}:5556" # Android SUB.connects here | |
| PULL_ENDPOINT = f"tcp://{IP}:5557" # Android PUSH.connects here | |
| COMMANDS = [ | |
| "TURN_OFF", |