Git Product home page Git Product logo

mrs_simulation's Introduction

MRS simulation

Build status Build Status Build Status

Overview

Support for spawning vehicles into Gazebo simulation, where user can select from multiple UAV platforms. This platforms can be additionaly equipped with several sensors (rangefinders, 2d lidars, stereo cameras etc.).

Usage

โš ๏ธ New drone spawning mechanism:

  • From now on, the drone spawning mechanism will be controlled by a ROS node
  • Spawning new vehicles is now done by calling ROS services
  • The spawner node is launched automatically with the simulation
  • The arguments for vehicle configuration remain mostly unchanged, just use 'rosservice call /mrs_drone_spawner/spawn "args"' instead of 'spawn_uav args'
  • Distributed simulation (running gazebo on one computer and mavros/PX4 on another is currently not supported

Start of the Gazebo simulator

To start the prepared example of Gazebo world call:

roslaunch mrs_simulation simulation.launch world_file:='$(find mrs_gazebo_common)/worlds/grass_plane.world' gui:=true

At this point the Gazebo world will only contain the environment with grass plane but with no vehicles yet.

Spawning of UAVs (NEW)

The simulation.launch will automatically start the mrs_drone_spawner python node. If you use a custom launch file to start the simulation, you can start it separately:

roslaunch mrs_simulation mrs_drone_spawner.launch

The mrs_drone_spawner will perform the following tasks:

  • Spawn vehicle models in the Gazebo simulation (ids from 0 to 250). This is done internally by calling the command rosrun gazebo_ros spawn_model.

  • For each vehicle, PX4 firmware and mavros is started at specific port numbers depending on the vehicle ID.

Vehicles are added to the simulation by calling the spawn service of the mrs_drone_spawner. The service takes one string argument, which specifies the vehicle ID, type and sensor configuration. Example: spawn a single vehicle with a down-facing laser rangefinder:

rosservice call /mrs_drone_spawner/spawn "1 --enable-rangefinder"

To display the manual containing a list of all available arguments, perform a dry-run of the script:

rosrun mrs_simulation mrs_drone_spawner

The arguments are also listed in the mrs_simulation/config/spawner_params.yaml file. Note that not all sensors are available for all the vehicle types. The config file stores the available configurations in the following format: parameter: [default_value, help_description, [compatible_vehicles]]

New features

Multiple vehicles may be spawned with one service call:

rosservice call /mrs_drone_spawner/spawn "1 2 3 4 5 --t650 --enable-bluefox-camera --enable-rangefinder"

Spawn position may be specified by a command line argument --pos x y z heading: [m, m, m, rad]

rosservice call /mrs_drone_spawner/spawn "1 --f550 --enable-rangefinder --pos 10 -15 0.3 0.7"

For multiple vehicles, --pos defines the spawn point of the first vehicle. Following vehicles will be spawned in a line, with an x-offset of 2 meters from the previous vehicle.

Spawn position may be specified by a .csv or a .yaml file using --file absolute_path_to_file:

rosservice call /mrs_drone_spawner/spawn "1 --f450 --enable-rangefinder --enable-ouster --use-gpu-ray --ouster-model OS1-64 --file `pwd`/spawn_poses.yaml"

Use a whitespace instead of an ID to get an available ID automatically assigned by the spawner.

rosservice call /mrs_drone_spawner/spawn " --f450 --enable-rangefinder"

Running the MRS control pipeline

Check out the wiki on how to run control core.

mrs_simulation's People

Contributors

klaxalk avatar stibipet avatar spurnvoj avatar petrapa6 avatar viktorwalter avatar kratkvit avatar petrlmat avatar matemat13 avatar penickar avatar davihdsantos avatar danhert avatar pritzvac avatar afxalz avatar bednarhonza avatar mergify[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.