Coder Social home page Coder Social logo

bfft_rosbag_data_conversion's Introduction

bfft_rosbag_data_conversion

BFFT_Logo

Black Forest Formula Team - Convert ROSBAGs to CSV files (one per ROS topic)

This package converts ROSBAGs into CSV files (relatively stable and performant) or an SQL database (quite slow, not recommended). There is one CSV file per ROS topic inside the ROSBAG with the option to include/exclude topics. For example: You might want to exclude all data that is coming from cameras like pixels and want to include topics like "orientation", "location", ... (everything you would want in a relational database/file).

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

We are developing this package for the autonomous infrastructure of our first electric racecar since we would like to be able to visualize all data coming in through our sensors and actors in (close to) realtime after each run on the race track (or testing). One example might be to display the acceleration after the drive to be able to make data-driven desicions to adjust the chassis or control algorithm. Another one might be feedback for the driver, powertrain adjustments, etc. The goal is to be able to visualize everything on a Windows PC since these OS are commonly used by other students & engineers and mandatory for some programs (like Matlab).


Hardware & Software Preconditions

We are using a NVIDIA Jetson AGX Xavier for our system. More input on or hardware setup you can find in the Wiki of our main repository. This package depends less on the hardware setup as more on the following software.

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 into your workspace and make sure you installed the necessary libaries (Link to Wiki).

  • bfft_rosbag_data_conversion: Take data recorded in ROSBAGS (internal data format) and export it into CSV files (one per topic). Use CSV files for data visualization purpose
cd ~/catkin_ws/src/
git clone https://github.com/Black-Forest-Formula-Team/bfft_rosbag_data_conversion.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

Convert ROSBAG to CSV

First, you have to adjust the path were your recorded ROSBAGs are located. To do so open the ROSBAG_to_CSV.launch and change the variables rb_path and rb_name. If you like you can also add topics to include and exclude in this file.

To start the conversion process now type in the following:

roslaunch bfft_rosbag_data_conversion ROSBAG_to_CSV.launch

Now, a new folder should be available in the folder the ROSBAG was located with the same name as the ROSBAG. This folder now holds one CSV file per topic you decided to include in the launch file. Rosbag to csv

Conversion using Bash Script

You can even use the convenience script to do so as described here by executing sh bfft_scripts/rosbagToCSV.sh after downloading our script repository.

cd 
git clone https://github.com/Black-Forest-Formula-Team/bfft_scripts.git

This process is displayed in the gif below. ROSBAG to CSV


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

bfft_rosbag_data_conversion's People

Contributors

alexsperka avatar blackforestformula avatar

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.