Skip to content

CAN communication should be separated from AS_STATE logic #46

@daniel-bara

Description

@daniel-bara

Our 'ros-car connector' node, ackermann_can.cpp has too many responsibilities. It currently

  1. Handles the VCU's AS_STATE modes
  2. Sends messages on CAN bus, publishes /vcu2ai messages on ROS.
  3. Handles VCU handshakes

This means it will be difficult to test the logic performed by this node on a small scale car that is not fitted with can bus.

My suggestion is to decouple the CAN bus communication from the AS_STATE logic, so that we can easily switch to a scale car that does not have CAN bus. In the new setup, we would have

  • a new node (possibly python) handling the AS_STATEs (1.), and publishing ROS /ai2vcu messages
  • a 'ros-car connector' node translating from ROS (/ai2vcu, /vcu2ai) to CAN bus (2.).

This way, we could easily switch out the 'ros-car connector' for whatever communication protocol we want to use on the small scale car and test the rest of the logic.

(3. vcu handshakes - could go to either of them depending on whether we want handshakes on the small scale car or not)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions