- Download the Coppelia EDU simulator and extract it to
/opt/coppelia-sim-edu
- Install the MRS Coppelia pack
sudo apt install ros-noetic-mrs-uav-coppelia-simulation
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.
- The folder
./mrs_uav_coppelia_simulation/coppelia_resources
contains the Coppelia scene file, thecontroller.py
for the embedded UAV controller, and theclock.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.
Start the Tmuxinator session in ./mrs_uav_coppelia_simulation/tmux
.
#python
#luaExec additionalFuncs={'sysCall_dynCallback'}
include controller
#python
#luaExec additionalFuncs={'sysCall_dynCallback'}
include clock
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