Created by [ Avery Chiu] on Jan 08, 2021
All the scripts in the CAN Interface repo under ros-interface (within the ros-interface branch) still need to be tested. These scripts are located here: https://git.uwaterloo.ca/WATonomous/can-interface/-/tree/ros-interface/ROSInterface]
Make sure you are familiar with ROS nodes, these scripts are basically publisher/listener scripts. Below are some details:
ROS.py is an abstract class that acts as a blueprint for the publisher/listener scripts. No explicit test has to be written for this since this will be implicitly tested when writing unit tests for the publisher and listener scripts.
The publisher scripts receive CAN messages from the CAN bus and sends it to the path-planning team using ROS. We have to check that these scripts can properly grab CAN data and send it. See test_PublishHS.py for an example of how this is done. The steps are as follows:
The listener scripts are subscribed to a ROS node. They receive messages from the path-planning team and then encode that message to be sent as a CAN message (this can be seen in
To test the scripts, we need to perform the following:
To learn more about receiving CAN messages, take a look at the documentation.
https://python-can.readthedocs.io/en/master/interfaces/socketcan.html
https://confluence.watonomous.ca/display/ED/Intro+to+CAN
We also already have unit tests in the CAN interface that do something similar shown here within the same repo https://git.uwaterloo.ca/WATonomous/can-interface/-/blob/ros-interface/CANBus/tests/Scripts/basic.py
Document generated by Confluence on Nov 28, 2021 22:40