Simulation - AnandaNN/M100_DTU_ROS GitHub Wiki
Simulation
To help testing a hardware in the loop simulation setup can be used with the M100 drone. This uses the DJI Assistant 1.2.5 to simulate the flight and response of the drone and this is then visualized in Gazebo so sensors (camera, laser scanner) can be tested. Most useful for determining if localization is correct as physical interaction with wall are not supported with this setup.
Gazebo doesn't simulate any drone physics and is only used visualize and simulate extra sensors. Launch it with
roslaunch hku_m100_gazebo wall_simulation.launch
This will launch the M100 model with sensors and some walls. After this the link with the M100 can be established by running the link:
rosrun hku_m100_gazebo m100_sim_brdige
This is the node that reads from DJI SDK ROS and converts it to the gazebo positions and angles. For this to work something that is faking the DJI topics must be running or the DJI ROS must be running with a drone connected to the DJI Assistant simulator.
The bridge reads the position from the dji local position topic therefore the services for resetting the DJI local position must be called first to zero the position.
The hku_m100_description packages has the visual and model descriptions for what is used in the simulation.