STM32 firmware: - safety.h/c: EstopSource enum, safety_remote_estop/clear/get/active() CDC 'E'=ESTOP_REMOTE, 'F'=ESTOP_CELLULAR_TIMEOUT, 'Z'=clear latch - usbd_cdc_if: cdc_estop_request/cdc_estop_clear_request volatile flags - status: status_update() +remote_estop param; both LEDs fast-blink 200ms - main.c: immediate motor cutoff highest-priority; arming gated by !safety_remote_estop_active(); motor estop auto-clear gated; telemetry 'es' field 0-4; status_update() updated to 5 args Safety: IMMEDIATE motor cutoff, latched until explicit Z + DISARMED, cannot re-arm via MQTT alone (requires RC arm hold). IWDG-safe. Jetson bridge: - remote_estop_node.py: paho-mqtt + pyserial, cellular watchdog 5s - estop_params.yaml, remote_estop.launch.py - setup.py / package.xml: register node + paho-mqtt dep - docker-compose.yml: remote-estop service - test_remote_estop.py: kill/clear/watchdog/latency unit tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
from setuptools import setup
|
|
|
|
package_name = "saltybot_bridge"
|
|
|
|
setup(
|
|
name=package_name,
|
|
version="0.1.0",
|
|
packages=[package_name],
|
|
data_files=[
|
|
("share/ament_index/resource_index/packages", [f"resource/{package_name}"]),
|
|
(f"share/{package_name}", ["package.xml"]),
|
|
(f"share/{package_name}/launch", [
|
|
"launch/bridge.launch.py",
|
|
"launch/cmd_vel_bridge.launch.py",
|
|
"launch/remote_estop.launch.py",
|
|
]),
|
|
(f"share/{package_name}/config", [
|
|
"config/bridge_params.yaml",
|
|
"config/cmd_vel_bridge_params.yaml",
|
|
"config/estop_params.yaml",
|
|
]),
|
|
],
|
|
install_requires=["setuptools", "pyserial"],
|
|
zip_safe=True,
|
|
maintainer="sl-jetson",
|
|
maintainer_email="sl-jetson@saltylab.local",
|
|
description="STM32 USB CDC → ROS2 serial bridge for saltybot",
|
|
license="MIT",
|
|
tests_require=["pytest"],
|
|
entry_points={
|
|
"console_scripts": [
|
|
# RX-only telemetry bridge (does not send commands)
|
|
"serial_bridge_node = saltybot_bridge.serial_bridge_node:main",
|
|
# Full bidirectional bridge: telemetry RX + /cmd_vel TX + heartbeat
|
|
"saltybot_cmd_node = saltybot_bridge.saltybot_cmd_node:main",
|
|
# Nav2 cmd_vel bridge: velocity limits + ramp + deadman + mode gate
|
|
"cmd_vel_bridge_node = saltybot_bridge.cmd_vel_bridge_node:main",
|
|
"remote_estop_node = saltybot_bridge.remote_estop_node:main",
|
|
],
|
|
},
|
|
)
|