This package provides the CAN-bus support for the infrastructure of our future autonomous system which is planned for the task to read in all sensor and VCU messages of our first electric racecar we currently develop. This code is created and maintained by the Black Forest Formula Team at University of Applied Sciences Offenburg. As this is a subrepository of the overall system you will find more information about the system in the main repository and its Wiki.
- Introduction
- Hardware & Software Preconditions
- Setup
- Getting started
- Code Repository Conventions
- Feedback
- Our Developers
- Release History
- Meta
- Contributing to one of our Repos
To be able to one day drive our future electric racecar without a driver in one of the Formula Student (FSAE) competitions we have to set up a baseline infrastructure reading in all relevant sensor data (perception layer). We are using the CAN-bus to communicate inside the vehicle and use several different sensors and one vehicle control unit (VCU, STM32-board) which we have to communicate with our autonomous control unit (ACU, NVIDIA Jetson AGX).
Our overall autonomous setup includes the Jetson AGX, two D455 cameras, one IMU from Genesys (ADMA Slim) as well as several CAN-Sensors and actors (for example two motors, inverters, wheelspeed sensors, BMS, ...) as can partly be seen in the image below.
Right now we support in this package all (for us) relevant CAN messages and their extraction and conversion we receive of the Genesys Adma Slim IMU. A great thank you goes out to our sponsor GeneSys Elektronik GmbH for enabling us to work with this state-of-the-art IMU as a long-term rental! :-)
We are using the following hardware and software stack:
- NVIDIA Jetson AGX Xavier with 32 GB RAM, upgraded 512 GB SSD and upgraded Intel Wifi 8265
- Intel D455 Cameras (x2)
- Genesys Adma Slim IMU
- Some kind of CAN Transceiver, DB9 connectors, cables, pins and other basic electrical hardware
- Ubuntu 18.04 LTS
- Python 3.X
- ROS 1 Melodic
- JetPack 4.4
For our Hardware and Software setup please visit the page Setup of NVIDIA Jetson AGX Xavier in our Wiki. There you will find a guide how to install ROS Melodic, relevant drivers and libraries. You can also find a guide there how to enable CAN on the NVIDIA Jetson Board and how to wire it to a CAN sensor using a CAN-transceiver.
Assuming you are used to ROS1, have your hardware wired and/or followed the Wiki pages mentioned above you should now be able to clone this package into your catkin workspace (we assume it lays under cd ~/catkin_ws/
, you might have to adjust this to your needs).
To do so clone this package as well as the ros_canopen
package into your workspace and make sure you installed the necessary libaries (Link to Wiki).
- ros_canopen: Forward incoming and outgoing CAN Messages to and from ROS topics, interface between logic and CAN-hardware.
cd ~/catkin_ws/src/
git clone https://github.com/ros-industrial/ros_canopen.git
- bfft_can_bus_msgs_to_ros_topic: Decode incoming CAN messages and publish them to corresponding topics
cd ~/catkin_ws/src/
git clone https://github.com/Black-Forest-Formula-Team/bfft_can_bus_msgs_to_ros_topic.git
For more input please refer to the Catkin Docs
Now we are able to build the workspace (if we have all libraries installed) with the packages downloaded above.
catkin_make
If a library is missing make sure to install it via sudo apt-get install ros-melodic-libraryname
if its a ROS library or via pip3 install libraryname
if its a python3 lib.
Source setup file to be able to execute ros commands from every terminal
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
For setup refer to this page.
First you might need to adjust the path to your DBC-file(s) inside the CAN_to_Topic.launch
file. These are important to decode the CAN-messages. When using another IMU you will have to adjust the CAN-IDs in the can_to_topic
file as well.
Start the ROS node to listen to incoming CAN messages with:
roslaunch bfft_CAN_msgs_to_ROS_topic Start_Data_Collection.launch
If you would like to see data comming in you can try one of the following as long as the IMU is attached:
rostopic echo /imu/imu_data
rostopic echo /imu/gps_data
It is possible to get a list of all available topics by typing rostopic list
.
For our coding conventions please visit the wiki page ROS & Python Conventions!
Feel free to send us feedback!
If there's anything you'd like to chat about, please feel free to text us on one of our social media plattforms:
Support this project by becoming a sponsor. Your logo will show up on our website with a link to your website. [Become a sponsor]
Dev-Team Vehicle Control Unit & Autonomous Driving in alphabetical order
- 0.0.1
- Initial setup, work in progress
Distributed under the MIT license. See LICENSE.md
for more information.
- Fork it (https://github.com/Black-Forest-Formula-Team/bfft_can_bus_msgs_to_ros_topic/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request