How tue-audri/prius_interface works
This repository is a ROS 2 interface stack for bringing Toyota Prius CAN data into the Autoware ecosystem, with an additional ZeroMQ-to-ROS bridge package.
At a high level, the repo has three architectural parts:
1. panda_can_rcv — CAN ingestion and decoding
2. panda_msgs — shared ROS message definitions
3. autoware_zmq_ros_bridge — ZeroMQ-to-ROS bridge for Autoware-facing data exchange
Main system boundary and data flow
• Vehicle CAN bus data enters the system through panda_can_rcv.
• Raw CAN frames are decoded using Toyota DBC files in panda_can_rcv/config.
• The decoded data is converted into ROS messages defined in panda_msgs.
• Those messages are published into the ROS 2 graph for downstream Autoware components.
• In parallel, autoware_zmq_ros_bridge provides a bridge from an external ZeroMQ transport into ROS 2, suggesting a second ingress/egress path for Autoware-related data.
Subsystem details
1. panda_can_rcv
This is the main functional package for receiving CAN data.
Key files:
• panda_can_rcv/can_interface.py — lower-level CAN access boundary
• panda_can_rcv/can_listener_node.py — ROS 2 node that likely owns the runtime loop and publishing
• panda_can_rcv/message_relay.py — conversion/relay layer between decoded CAN signals and ROS messages
• config/panda_params.yaml — runtime parameters
• config/toyota_filtered.dbc
• config/toyota_tnga_k_pt_generated.dbc
Architecture role:
• Acts as the hardware-facing adapter.
• Separates raw CAN reception from ROS publishing.
• Uses DBC files as the signal decoding layer, which is important because it means the node is not just forwarding frames; it is translating vehicle-specific bus messages into semantic signals.
Likely data path inside the package:
• CAN hardware/bus -> can_interface.py
• Raw frame handling -> can_listener_node.py
• Signal interpretation via DBC definitions
• ROS publication via message_relay.py
Launch/runtime:
• launch/can_listener.launch.py starts the listener node with parameters from YAML.
2. panda_msgs
This package contains the shared message contract used by the runtime nodes.
Contents:
• msg/CANMessage.msg
• msg/PandaHealthStatus.msg
Architecture role:
• Defines the data schema boundary between producers and consumers.
• Keeps message definitions separate from node logic, so both CAN ingestion and any downstream Autoware consumers can depend on a stable interface.
• This is a classic ROS package boundary: behavior lives in Python nodes, data contracts live in a dedicated message package.
Build system:
• Uses ROS 2 CMake-style packaging, unlike the Python node packages.
3. autoware_zmq_ros_bridge
This package is a second transport adapter.
Key files:
• autoware_zmq_ros_bridge/autoware_zmq_listener_node.py
• config/autoware_zmq_params.yaml
• launch/autoware_zmq_bridge.launch.py
Architecture role:
• Bridges ZeroMQ-based communication into the ROS 2 graph.
• The node name suggests it is a listener, so it likely receives messages on a ZMQ socket and republishes or translates them into ROS topics.
• This introduces a transport boundary separate from CAN: ZeroMQ on one side, ROS 2 on the other.
Why it matters architecturally:
• It implies the system is not limited to direct vehicle bus integration.
• It provides a decoupled integration path for external Autoware-related producers/consumers that use ZMQ instead of native ROS topics.
Important boundaries in the repo
• Hardware boundary: CAN bus / vehicle interface in panda_can_rcv
• Transport boundary: ZeroMQ in autoware_zmq_ros_bridge
• Schema boundary: ROS message types in panda_msgs
• Configuration boundary: YAML parameter files and DBC files under each package’s config/
• Runtime orchestration boundary: ROS 2 launch files under each package’s launch/
Technology and runtime implications
• The repo is ROS 2-based.
• The node packages are Python packages (setup.py, setup.cfg, package.xml), so the runtime logic is implemented in Python nodes.
• panda_msgs is a ROS message package built separately from the Python nodes.
• The Toyota DBC files are a key external artifact because they define how raw CAN frames are semantically decoded.
• The launch files indicate the system is designed to be started as ROS 2 nodes with parameter injection, not as standalone scripts.
Repository structure as an architecture diagram
If you were drawing this system, the central elements would be:
• On one side, the Toyota Prius CAN bus feeding panda_can_rcv
• In the middle, panda_msgs as the shared ROS contract
• On another side, autoware_zmq_ros_bridge connecting a ZeroMQ endpoint to the ROS 2 graph
• Downstream, Autoware Universe components consuming the published ROS topics and messages
In short: this repo is an integration layer for vehicle signals and Autoware, with CAN decoding as the core function, ROS messages as the internal interface, and a ZeroMQ bridge as an additional transport adapter.
Main entry points: can_listener_node.py Listener Node · message_relay.py Message Relay · CANMessage.msg CAN Message · PandaHealthStatus.msg Health Status
Components 16
CAN Ingestion
Vehicle CAN reception and decoding pipeline.
- CAN Bus · Prius CAN frames entering the stack.
- CAN Interface · Low-level boundary for receiving CAN frames.
panda_can_rcv/panda_can_rcv/can_interface.py - Listener Node · Owns runtime loop and CAN ingest orchestration.
panda_can_rcv/panda_can_rcv/can_listener_node.py - Message Relay · Converts decoded CAN signals into ROS messages.
panda_can_rcv/panda_can_rcv/message_relay.py - CAN Params · ROS parameters for CAN listener behavior.
panda_can_rcv/config/panda_params.yaml - Toyota DBC · Filtered Toyota CAN signal definitions.
panda_can_rcv/config/toyota_filtered.dbc - Toyota Gen DBC · Generated Toyota TGNA K PT decoding definitions.
panda_can_rcv/config/toyota_tnga_k_pt_generated.dbc - CAN Launch · Starts the CAN listener node with parameters.
panda_can_rcv/launch/can_listener.launch.py
ROS Messages
Shared message contracts used across packages.
- CAN Message · Shared message for CAN-derived data.
panda_msgs/msg/CANMessage.msg - Health Status · Shared message for system health reporting.
panda_msgs/msg/PandaHealthStatus.msg - panda_msgs · Dedicated ROS message contract package.
panda_msgs
ZeroMQ Bridge
External ZMQ transport bridged into ROS 2.
- ZMQ Listener · Receives ZeroMQ data and bridges it into ROS.
autoware_zmq_ros_bridge/autoware_zmq_ros_bridge/autoware_zmq_listener_node.py - ZMQ Params · Parameters for the ZeroMQ bridge node.
autoware_zmq_ros_bridge/config/autoware_zmq_params.yaml - Bridge Launch · Starts the ZeroMQ-to-ROS bridge.
autoware_zmq_ros_bridge/launch/autoware_zmq_bridge.launch.py - ZMQ Endpoint · External ZeroMQ producer or consumer outside ROS.
Other components
- ROS 2 Graph · Shared ROS 2 runtime where downstream Autoware components subscribe.
Connections 18
- CAN Bus → CAN Interface: frames · Vehicle CAN frames enter through the interface boundary.
- CAN Interface → Listener Node: raw data · Listener node consumes incoming frames.
- Listener Node → Toyota DBC: decode · Filtered DBC definitions decode vehicle signals.
- Listener Node → Toyota Gen DBC: decode · Generated DBC definitions decode vehicle signals.
- Listener Node → Message Relay: relay · Decoded signals are converted for publication.
- Message Relay → CAN Message: publishes · CAN-derived data is emitted as a shared ROS message.
- Message Relay → Health Status: publishes · Health/status information is emitted as a shared ROS message.
- CAN Launch → Listener Node: starts · Launch file brings up the CAN listener node.
- CAN Launch → CAN Params: loads · Runtime parameters are injected from YAML.
- Listener Node → ROS 2 Graph: publishes · ROS topics enter the shared ROS 2 graph.
- CAN Message → ROS 2 Graph: consumed by · Downstream Autoware components subscribe to CAN messages.
- Health Status → ROS 2 Graph: consumed by · Downstream components can monitor health messages.
- ZMQ Endpoint → ZMQ Listener: messages · External ZeroMQ traffic enters the bridge.
- Bridge Launch → ZMQ Listener: starts · Launch file brings up the bridge node.
- Bridge Launch → ZMQ Params: loads · Bridge parameters are injected from YAML.
- ZMQ Listener → ROS 2 Graph: publishes · ZeroMQ data is translated into ROS 2 topics.
- panda_msgs → CAN Message: defines · Message package owns the CAN message contract.
- panda_msgs → Health Status: defines · Message package owns the health status contract.