Adds slcan setup script and saltybot_can_bridge ROS2 package implementing
full CAN bus integration between the Orin and the Mamba motor controller /
VESC motor controllers via a CANable 2.0 USB dongle (slcan interface).
- jetson/scripts/setup_can.sh: slcand-based bring-up/tear-down for slcan0
at 500 kbps with error handling (already up, device missing, retry)
- saltybot_can_bridge/mamba_protocol.py: CAN message ID constants and
encode/decode helpers for velocity, mode, e-stop, IMU, battery, VESC state
- saltybot_can_bridge/can_bridge_node.py: ROS2 node subscribing to /cmd_vel
and /estop, publishing /can/imu, /can/battery, /can/vesc/{left,right}/state
and /can/connection_status; background reader thread, watchdog zero-vel,
auto-reconnect every 5 s on CAN error
- config/can_bridge_params.yaml: default params (slcan0, VESC IDs 56/68,
Mamba ID 1, 0.5 s command timeout)
- test/test_can_bridge.py: 30 unit tests covering encode/decode round-trips
and edge cases — all pass without ROS2 or CAN hardware
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
1.3 KiB
XML
36 lines
1.3 KiB
XML
<?xml version="1.0"?>
|
|
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
|
<package format="3">
|
|
<name>saltybot_can_bridge</name>
|
|
<version>0.1.0</version>
|
|
<description>
|
|
CAN bus bridge for SaltyBot Orin — interfaces with the Mamba motor
|
|
controller and VESC motor controllers via CANable 2.0 (slcan interface).
|
|
Publishes IMU, battery, and VESC telemetry to ROS2 topics and forwards
|
|
cmd_vel / estop commands to the CAN bus.
|
|
|
|
System dependency: python3-can (apt: python3-can or pip: python-can)
|
|
</description>
|
|
<maintainer email="sl-controls@saltylab.local">sl-controls</maintainer>
|
|
<license>MIT</license>
|
|
|
|
<exec_depend>rclpy</exec_depend>
|
|
<exec_depend>std_msgs</exec_depend>
|
|
<exec_depend>geometry_msgs</exec_depend>
|
|
<exec_depend>sensor_msgs</exec_depend>
|
|
|
|
<!-- python-can: install via apt install python3-can or pip install python-can -->
|
|
<exec_depend>python3-can</exec_depend>
|
|
|
|
<buildtool_depend>ament_python</buildtool_depend>
|
|
|
|
<test_depend>ament_copyright</test_depend>
|
|
<test_depend>ament_flake8</test_depend>
|
|
<test_depend>ament_pep257</test_depend>
|
|
<test_depend>python3-pytest</test_depend>
|
|
|
|
<export>
|
|
<build_type>ament_python</build_type>
|
|
</export>
|
|
</package>
|