Git Product home page Git Product logo

fsdriverless's Introduction


IPG-ROS Simulation

BCN eMotorsport

Table of Contents
  1. Introduction
  2. Disclaimer
  3. Dependencies
  4. Quick Start
  5. ROS1/ROS2

Introduction

This repo holds an IPG CarMaker Formula Student project with the ROS extension, enabling communication between both frameworks.

Having an IPG simulation platform with a ROS environment enable us to try different parts of the Autonomous Systems pipeline (mostly Autonomous Control) with a fine tunned Multibody Vehicle Model. Thus, a better correlation between simulation and testing results can be achieved, which traduces to an enhanced performance in the real track. Moreover, with IPG a full pipeline simulation is possible, meaning you can run the simulation for EV control algorithms (low level), Autonomous Control (high level) and Perception algorithms (high level).

Logo

From experience we know the best way to try (and fine-tune) our perception stack is by using real testing data. For this reason, this simulation includes a fake perception module (more info here) so we can simulate our AS Control together with our Low Level Control pipelines keeping the simulation light (without Raw LiDAR pointcloud generation, usually GPU-demanding).

With this project, our team has been able to simulate for the first time our complete Vehicle Controls software stack, which involves:

  • AS Control:
    • Lateral NMPC
    • Adaptive Cruise Control
    • Tracklimits
    • Path Planning
  • Low Level Control (shared with manual):
    • Regenerative Braking
    • Torque Vectoring
    • Traction Control
    • Power Control

Disclaimer

If you use this simulation pkgs the only thing I ask for is to ALWAYS REFERENCE the team BCN eMotorsport.

For obvious reasons, the vehicle model parametrization of our prototype is not included in this repo. The default IPG's FS vehicle model is given. You should specify your own car specs for a precise simulation.

Dependencies

NOTE: I strongly recommend installing catkin_tools for building this project. If not, you must edit the build.sh bash script in order to build the project with the ROS default catkin_make command.

Quick Start

  1. Manually re-create the libcmcppifloader symbolic link to the latest version of the CMRosIF library, which is currently libcmcppifloader-linux64.so.1.0.0:
cd lib/
sudo ln -sfn libcmcppifloader-linux64.so.1.0.0 libcmcppifloader-linux64.so
  1. Check added paths during the IPG default installation. You should have this commands written down in your '.bashrc' file (if not copy and paste them at the end of the file):
# Additional paths for IPG CM
addpath ()
{ for d in "$@"; do PATH="$PATH:$d"; done; }
addpath /opt/ipg/hil/linux/bin /opt/ipg/hil/linux/GUI /opt/ipg/hil/linux/GUI64
addpath /opt/ipg/bin /opt/ipg/carmaker/linux64/bin /opt/ipg/carmaker/linux64/GUI
  1. Build the CarMaker Project and ROS workspace:
cd /path_to/FSDriverless  # go to the repo dir
chmod +x ./build.sh       # only once
./build.sh                
  1. Finally, run a CarMaker instance (now with CMRosIF extension):
./CMStart.sh

The loaded TestRun should be FS_autonomous_Trackdrive. This TestRun will run the car on an infinite track in order to use IPG only as the physics engine of the simulation (at the lowest layer).

For more information about the simulation workflow READ THIS.

Build command failed

If ./build.sh command failed, you should open the Car Maker GUI in order to update the project:

cd /path_to/FSDriverless # go to the repo dir
./CMStart.sh
# NOTE: usually some processes will die or fail after openning the GUI at this point. It's ok, we only want to update our CM Project 

Once there, go to File > Project Folder > Update Project.. and select the option Sources / Build Environment. This command will update the necessary files inside this repo in order to build the CM Project with your computer specs.

After updating the project, User.c and Makefile will have been overwritten, so IPG won't know this repo holds the CMRosIF extension. To fix this, substitude these files with the User.c and Makefile files found inside the src_cmrosif directory.

ROS1/ROS2

Within this project we can find two ROS workspaces, one for ROS1 and another for ROS2. The CMRosIf is compatible with both, so it is possible to keep simulating with IPG once your pipeline works with ROS2. However, keep in mind that this whole project has been created in order to work with ROS1 (Noetic), so it is possible that some build flags and/or IPG parameters will have to be changed in order to be compatible with ROS2.

fsdriverless's People

Contributors

fetty31 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

junyang0412

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.