GryphonRacingAI / gra

ROS + Docker code for University of Leeds Gryphon Racing AI team 2023-24
4 stars 4 forks source link

CAN communication should be separated from AS_STATE logic #46

Open daniel-bara opened 3 months ago

daniel-bara commented 3 months ago

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

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)