How team-jax/can works
This repository controls six CubeMars AK45-36 actuators over Linux SocketCAN, with both a direct C++ CLI and a ROS 2 command/state interface. The ROS workflow accepts standard JointState commands, validates and stores targets in the ROS node, periodically sends position commands through the CAN control library, and publishes joint and diagnostic state. The README also documents a ramped CLI and a vcan simulator. Edges below are limited to relationships shown in excerpts or explicit README statements; the ROS launch-to-node and hardware links are documented, while unsampled implementation details are omitted.
Main entry points: ak45_node.cpp ROS node · src/ak45_36_socketcan_control.cpp SocketCAN control library · ak45_36_socketcan_control.cpp Direct control library · ak45_node.launch.py ROS launch
Components 15
ROS 2 Interface
- ROS launch
ak45_ros2/launch/ak45_node.launch.py - ROS node
ak45_ros2/src/ak45_node.cpp - Degree helper
ak45_ros2/scripts/ak45_deg - Joint state output
ak45_ros2/src/ak45_node.cpp - Diagnostics output
ak45_ros2/src/ak45_node.cpp
CAN Control
- SocketCAN control library
ak45_ros2/src/ak45_36_socketcan_control.cpp - CAN protocol and state API
ak45_ros2/include/ak45_ros2/ak45_36_socketcan_control.h - SocketCAN bus
- Direct control library
ak45_36_socketcan_control.cpp
Direct CLI
- Interactive CLI
main.cpp - Ramped demo
demo_ramp.cpp
Simulation
- vcan motor simulator
tools/ak45_vcan_sim.py
Other components
- Operator
- ROS command publisher
- AK45-36 motors
Connections 18
- Operator → ROS launch: launches
README.md - ROS launch → ROS node: starts
ak45_ros2/launch/ak45_node.launch.py - ROS command publisher → ROS node: publishes commands
README.md - Degree helper → ROS node: publishes commands
README.md - ROS node → SocketCAN control library: sends positions
ak45_ros2/src/ak45_node.cpp - SocketCAN control library → SocketCAN bus: transmits CAN
ak45_ros2/src/ak45_36_socketcan_control.cpp - SocketCAN bus → AK45-36 motors: carries frames
README.md - AK45-36 motors → SocketCAN bus: returns feedback
README.md - SocketCAN control library → ROS node: provides state
ak45_ros2/src/ak45_node.cpp - ROS node → Joint state output: publishes
ak45_ros2/src/ak45_node.cpp - ROS node → Diagnostics output: publishes
README.md - Operator → Interactive CLI: enters targets
README.md - Interactive CLI → Direct control library: sends positions
main.cpp - Direct control library → SocketCAN bus: transmits CAN
ak45_36_socketcan_control.cpp - Operator → Ramped demo: sets ramp targets
README.md - Ramped demo → Direct control library: sends stepped positions
demo_ramp.cpp - vcan motor simulator → SocketCAN bus: exchanges frames
tools/ak45_vcan_sim.py - CAN protocol and state API → SocketCAN control library: defines API
ak45_ros2/src/ak45_36_socketcan_control.cpp