Folder Structure

The following outlines the basic folder structure and gives a high-level overview of the different components in this repository. An overview of the crs software can be found Here and an overview of the ros4crs wrapper Here.

Note: This overview is mainly meant to allow for an easier start and does not contain all or only simplified classes.

The CRS framework is divided in two main parts:

  1. The first part crs contains the c++ implementations of the main components (e.g. controller, state estimators, ...). It is designed in a way that should be able to run in a stand-alone fashion, detached from the ros code.
  2. The second ros part contains the ros specific code. Most ros packages simply wrap around a existing crs implementation and perform input/output forwarding as well as rate limitations for specific topics.

Below you can find an overview of the file structure and all packages:

src
├── crs # Raw C++ implementations
   ├── commons    # Shared functionality for all packages (e.g. digital filter, track manager)
│   │
   ├── controls            
     ├── common # Shared interface for all controller classes. 
     ├── ff_fb_controller # Implementation of feed forward feed back controllers
     ├── mpc_controller   # Implementation of mpc controllers
     ├── joystick   # Implementation of a joystick controller
     ├── mpc_solvers
       ├── commons # Shared interface for all mpc solvers (e.g. acados, forces, ...
       ├── acados
           └── acados_pacejka_mpcc_solver # Package containing the acados solver for an mpcc problem.
     └── pid_controller  # Implementation of the pid controller
     
   ├── dynamic_models 
     ├── common    # Shared interface for all dynamic models
     ├── custom_model_template # Example model template to create new model
     ├── kinematic_model       # Implementation of the kinematic model
     └── pacejka_model # Implementation of the pacejka model
    
   ├── estimators 
│   │   ├── common #Shared interface for all estimators
     ├── kalman_estimator # Implementation of kalman estimators
     └── lowpass_estimator  # Implementation of lowpass estimators
   
   ├── planning 
   │    ├── common  # Shared interface for all planners
│   │    ├── circle planner  # Implemenation of a circle planner
│   │    └── lloyd_planner  # Implementation of a Iloyd planner
│   │ 
   └── safety_framework 
   │    ├── common  # Shared interface for all safety filters
│   │    ├── collision avoider  # Implemenation of a collision avoider
│   │    ├── pacejka_mpc_safety_filter  # Implementation of a safety_filter
│   │   
   └── sensor_models # Implements the "measurement" for a given state and measurement device
       ├── common  # Shared interface for all sensor models
       ├── kinematic_sensor_model # Sensor models for the kinematic model
       └── pacejka_sensor_model   # Sensor models for the pacejka model

├── ros4crs # Ros wrapper that connects with the raw c++ implementations
│    ├── crs_launch  # The main entry point of the ros framework. Mainly launch files 
│    ├── crs_msgs    # All message types that are used
│    ├── ros_backtracker # Backtracker nodes to recover from accidents
│    ├── ros_controllers # Package allowing to connect ros to the implemented controllers
│    ├── ros_crs_utils   # Often used utility functions. E.g. loading parameters from ros parameter server.
│    ├── ros_estimators  # Package allowing to connect ros to the implemented estimators
│    ├── ros_planners  # Package allowing to connect ros to the implemented planners
│    ├── ros_safety_framework  # Package allowing to connect ros to the implemented safety framework
│    ├── ros_simulator   # Simulator package, takes inputs and publishes a groundtruth state + measurement
│    ├── ros_visualizer # Visualizer that publishes RVIZ visualization markers
│    └── tools
   ├── track_generation # Tool to generate track configurations
│        └── opt_sys_id       # Package for optimization-based system identification

├── ros_io                       # Hardware interfaces to connect CRS to cars, rockets
│    ├── car                     # Packages that interface with cars
│    │   ├── ros_wifi_com        # Node to send input signals and receive sensor measurements from cars.
│    │   └── ros_battery_monitor # Convenience monitoring node to check battery status
│    └── pihat                   # Packages for the RPi hat

└── dependencies # Folder that is automatically populated with downloaded dependencies (yaml-cpp, catkin_simple,....)