Source-linked AI summary

Flightmare: A Flexible Quadrotor Simulator

Yunlong Song, Selim Naji, Elia Kaufmann, Antonio Loquercio, Davide Scaramuzza

arXiv:2009.00563v2cs.ROcs.AI

TL;DR

Existing quadrotor simulators force trade-offs among speed, physical accuracy, and photo-realism. Flightmare decouples configurable Unity rendering from flexible physics, achieving high simulation rates while supporting sensors, parallel agents, and multiple robotics tasks. The authors report up to 230 Hz rendering and 200,000 Hz dynamics simulation on a laptop.

  • Problem

    Existing quadrotor simulators have rigid structures that typically emphasize speed, physical accuracy, or photo-realistic rendering, leaving the trade-off outside end-users’ control.

  • Method

    Flightmare combines a configurable Unity rendering engine with a flexible physics engine whose two components are decoupled and can run independently.

  • Results

    Up to 230 Hz rendering and 200,000 Hz dynamics simulation were achieved on a commodity multi-core laptop, and the simulator was demonstrated on control and path-planning tasks.

  • Takeaways & Limitations

    Flightmare provides configurable sensors, 3D point-cloud extraction, and parallel quadrotor simulation for robotics and machine-learning applications.

  • Takeaways & Limitations

    The reported experimental findings are currently limited to quadrotors, although the authors discuss possible extension to other robot platforms.

Abstract

from arXiv · show

State-of-the-art quadrotor simulators have a rigid and highly-specialized structure: either are they really fast, physically accurate, or photo-realistic. In this work, we propose a novel quadrotor simulator: Flightmare. Flightmare is composed of two main components: a configurable rendering engine built on Unity and a flexible physics engine for dynamics simulation. Those two components are totally decoupled and can run independently of each other. This makes our simulator extremely fast: rendering achieves speeds of up to 230 Hz, while physics simulation of up to 200,000 Hz on a laptop. In addition, Flightmare comes with several desirable features: (i) a large multi-modal sensor suite, including an interface to extract the 3D point-cloud of the scene; (ii) an API for reinforcement learning which can simulate hundreds of quadrotors in parallel; and (iii) integration with a virtual-reality headset for interaction with the simulated environment. We demonstrate the flexibility of Flightmare by using it for two different robotic tasks: quadrotor control using deep reinforcement learning and collision-free path planning in a complex 3D environment.

1 Introduction

Flightmare addresses the rigid trade-offs of existing quadrotor simulators by decoupling configurable rendering and physics components, giving users control over speed, accuracy, and realism.

  • 1 Introduction: Existing simulators typically prioritize speed, physical accuracy, or photo-realistic rendering because these objectives conflict within monolithic designs.More realistic simulation generally runs more slowly, making all three objectives difficult to achieve simultaneously.
  • 1 Introduction: Flightmare places the speed-versus-accuracy trade-off in end-users’ hands through a flexible simulator with independently configurable physics and rendering.The rendering component supports low-to-high photo-realism, while the physics component supports different robot dynamics and sensing configurations.
  • 1 Introduction: Flightmare supports hundreds of parallel agents, OpenAI Gym reinforcement-learning wrappers, configurable sensors, and full-environment 3D point-cloud extraction.These interfaces support multi-drone applications, rapid data collection, reinforcement learning, and algorithms requiring detailed environmental geometry.
  • 1 Introduction: 230 Hz rendering and 200,000 Hz dynamics simulation were achieved on a commodity multi-core laptop CPU.The simulator was also demonstrated on sensorimotor control, including possible sensor failures, and path-planning in a complex 3D environment.

2 Related Work

Existing quadrotor simulators provide complementary strengths but remain limited by rendering quality, parallel dynamics performance, vehicle scope, or flexibility. Flightmare is designed by combining desirable capabilities while addressing these limitations.

  • 2 Related Work: Gazebo-based RotorS and Hector support multiple vehicle models, physics engines, and sensors, but Gazebo has limited rendering and inefficient parallel dynamics simulation.These limitations make learning-based systems difficult to develop in parallel.
  • 2 Related Work: AirSim and CARLA provide photo-realistic Unreal Engine simulation, while AirSim additionally supports configurable quadrotors and hardware- or software-in-the-loop flight controllers.CARLA is primarily intended for autonomous driving and provides only ground-vehicle dynamics.
  • 2 Related Work: FlightGoggles decouples Unity-based photo-realistic rendering from C++ quadrotor dynamics and supports rendering from real-world flight trajectories and inertial measurements.Flightmare extends this direction with more sensor observations, point-cloud extraction, a structured physics interface, and parallel multi-agent simulation.
  • 2 Related Work: MuJoCo and RaiSim support reinforcement-learning benchmarks or massive parallel dynamics simulation but do not support complex 3D environments and photo-realistic image rendering.Flightmare draws on prior simulators’ successes to combine these desirable features while addressing their limitations.

3 Methodology

Flightmare uses separate Unity rendering and quadrotor-dynamics components connected through a flexible interface, supporting configurable environments, sensors, physics models, and parallel simulation.

  • 3.1 System Overview: Flightmare separates a Unity-based photo-realistic rendering engine from quadrotor dynamics, communicating through high-performance asynchronous ZeroMQ messaging.A Python wrapper provides an OpenAI Gym-style interface for reinforcement-learning tasks.
  • 3.2 Rendering Engine: Unity supports high-fidelity lighting, meshes, materials, shaders, textures, skyboxes, and camera post-processing across configurable 3D environments.Available environments range from simple warehouses to complex nature forests and can be extended through Unity assets.
  • 3.2 Rendering Engine: Flightmare’s sensor suite includes RGB cameras with depth and semantic segmentation, rangefinders, collision detection, adjustable camera intrinsics, and physical camera effects.Users can configure sensor count and extrinsic parameters relative to the vehicle body frame.
  • 3.3 Dynamic Modeling: The simulator provides Gazebo-based, real-world, and parallelized classical quadrotor dynamics, enabling hundreds of racing drones and millions of state transitions under a minute.The dynamics interface supports different application-specific simulation models.
  • 3.3 Dynamic Modeling: The quadrotor model uses rigid-body equations with quaternion orientation, rotor drag, gravity, mass-normalized thrust, body rates, and rotor-thrust-to-torque conversion.Rotor thrust dynamics use first-order systems, Euler and fourth-order Runge-Kutta integration are implemented, and IMU sensing plus body-rate and rotor-thrust control modes are supported.

4 Experiments

Flightmare is evaluated for simulation speed, reinforcement-learning control, point-cloud extraction, path planning, and human-drone interaction. The experiments show high-throughput dynamics simulation and support applications requiring parallel agents, 3D scene information, or virtual-reality interaction.

  • Experimental goals: The experiments assess why dynamics and rendering should be decoupled, their speeds, robot learning, and additional simulator applications.
  • Simulation speed: Figure 3 compares parallel quadrotor dynamics speed across thread counts and RGB rendering speed across environments and image sizes.
  • Simulation speed: Over 200,000 steps per second are achieved for 150 quadrotors simulated in parallel on a laptop CPU.The same setup achieved around 2 million samples per minute with a two-hidden-layer MLP in the sampling loop.
  • Sensorimotor policy learning: Flightmare provides OpenAI Gym-style reinforcement-learning wrappers and example tasks for benchmarking and developing more complex control problems.The tasks specify input states and output control actions.
  • Point cloud and path planning: The simulator exports full-environment or regional 3D information as point clouds with configurable resolution for path-planning applications.The point cloud is saved in PLY format for compatibility with Open3D.
  • Human-drone interaction: Flightmare supports virtual-reality interaction, enabling human-drone experiments across configurations including potentially dangerous cases.
  • Additional applications: Its ability to simulate hundreds of quadrotors in parallel also supports research on large-scale multi-robot systems and other applications.

5 Conclusion and Discussion

The conclusion presents Flightmare as a flexible alternative to rigid quadrotor simulators, giving users control over simulation characteristics through modular physics and rendering. It identifies broader robot platforms and task-specific simulation optimization as future directions.

  • Conclusion: Flightmare addresses rigid simulator design with a modular structure that gives users control over physics and visual-sensor simulation characteristics.
  • Conclusion: Physics modeling can range from a point-mass model to real-world quadrotor dynamics, while rendering can range from fast and simplistic to slower and photo-realistic.
  • Conclusion: The simulator combines a broad sensor suite, parallel multi-quadrotor reinforcement learning, and virtual-reality interaction capabilities.
  • Future work: Future work includes applying the flexible design to manipulators or ground vehicles and developing end-to-end methods to optimize simulation for specific tasks.

Supplementary Material

The supplementary material applies reinforcement learning to quadrotor stabilization, motor-failure control, and direct gate traversal, using task-specific states, actions, goals, and rewards.

  • Quadrotor Control: PPO trains an MLP to stabilize randomly initialized quadrotors toward a hovering target using body-rate control commands.The policy outputs mass-normalized thrust and desired body rates to a low-level controller.
  • Control Under Motor Failure: A motor-failure controller uses the 12-dimensional state [p, θ, v, ω] and outputs three motor thrusts directly to stabilize the vehicle.The goal sets orientation, linear velocity, and body rates to zero, while yaw-related reward terms receive zero weight because one propeller is lost.
  • Flying Through a Gate: A gate-traversal policy directly maps the quadrotor and gate poses to four motor thrusts, avoiding a separate high-level trajectory generator.Training samples positions in front of a circular gate and targets a hovering state behind it.
  • Flying Through a Gate: A positive reward of 0.1 encourages avoiding collisions with the gate and ground, while an alternative outcome receives −0.1.The episode terminates when the quadrotor hits the gate or leaves the permitted region.
Loading 2009.00563v2…