Skip to content

ctu-mrs/mrs_uav_coppelia_simulation

Repository files navigation

Coppelia Simulation

Installation

  1. Download the Coppelia EDU simulator and extract it to /opt/coppelia-sim-edu
  2. Install the MRS Coppelia pack
sudo apt install ros-noetic-mrs-uav-coppelia-simulation

Current state and potential TODOs

We tried to adapt the Coppelia Sim into the MRS UAV System. We used the pre-existing multi-rotor UAV model and attached a customization python script. The python script handles the low-level control and provides a ROS interface to the low-level controllers that the script implements. Despite many efforts, everything about this solution is slow:

  • the simulator's python API is very slow (approx. 1 ms per call),
  • the python itself is very slow,
  • The handling of the callbacks by the simulator is also very slow.

Therefore, this solution struggles to reach real-time factor 1.0 even with a single UAV.

Contents for this repository

  • The folder ./mrs_uav_coppelia_simulation/coppelia_resources contains the Coppelia scene file, the controller.py for the embedded UAV controller, and the clock.py for the ROS clock publisher. These two scripts are parts of the customization scripts included in the scene.
  • The folder ./mrs_uav_coppelia_api contains the API Plugin that interfaces the simulator to the MRS UAV System.

How To Start

Start the Tmuxinator session in ./mrs_uav_coppelia_simulation/tmux.

(Development remarks) Binding custom scripts from the scene

UAV control script

#python
#luaExec additionalFuncs={'sysCall_dynCallback'}

include controller

Clock publisher script

#python
#luaExec additionalFuncs={'sysCall_dynCallback'}

include clock

Other remarks

The binding callback for the dynamics step does not work when following official tutorials. The tutorial refers to a version of API that has yet to be implemented (yet) or does not work. However, the legacy API works:

#python
#luaExec additionalFuncs={'sysCall_dynCallback'}

def sysCall_dynCallback(inData):
    pass

About

Coppelia simulation metapackage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published