Giter VIP home page Giter VIP logo

bfft_can_bus_msgs_to_ros_topic's Introduction

bfft_can_bus_msgs_to_ros_topic

BFFT_Logo

Black Forest Formula Team - Read CAN bus messages and forward them to ROS topics

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.


Repository organisation


Introduction

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! :-)


Hardware & Software Preconditions

We are using the following hardware and software stack:

Hardware Stack

Software Stack

  • Ubuntu 18.04 LTS
  • Python 3.X
  • ROS 1 Melodic
  • JetPack 4.4

Setup

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.


Getting started

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).

Clone packages

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
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

Build Process

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

Connecting IMU and sensors via CAN bus

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.


Code Repository Conventions

For our coding conventions please visit the wiki page ROS & Python Conventions!


Feedback

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]


Our Developers

Dev-Team Vehicle Control Unit & Autonomous Driving in alphabetical order


Release History

  • 0.0.1
    • Initial setup, work in progress

Meta

Distributed under the MIT license. See LICENSE.md for more information.


Contributing to one of our Repos

  1. Fork it (https://github.com/Black-Forest-Formula-Team/bfft_can_bus_msgs_to_ros_topic/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

HSO_Logo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.