Skip to content

Commit

Permalink
work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Oct 11, 2023
1 parent 5ef1b7f commit 78a80ef
Show file tree
Hide file tree
Showing 25 changed files with 74 additions and 20 deletions.
14 changes: 14 additions & 0 deletions docs/simulation/coppelia/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
title: Coppelia
parent: Simulation
has_children: true
---

# Coppelia Simulator

| :warning: **Attention please: This page needs work.** |
| :--- |
| The MRS UAV System 1.5 is being released and this page needs updating. Please, keep in mind that the information on this page might not be valid. |

This folder contains docs on simulation using Coppelia and the MRS UAV System.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
layout: default
title: Custom simulation world
parent: Simulation
nav_order: 3
parent: Gazebo
---

| :warning: **Attention please: This page is outdated.** |
| :--- |
| The MRS UAV System 1.5 is being released and this page needs updating. Please, keep in mind that the information on this page might not be valid. |

# How to start the simulation with a custom world

![](fig/custom_world.jpg)

To [start the simulation](https://ctu-mrs.github.io/docs/simulation/howto.html), we use ROS launch file
Expand All @@ -27,12 +26,14 @@ specifying the default world to be `grass_plane` from the [`mrs_gazebo_common_re
## Load a custom world

### Load world from [`mrs_gazebo_common_resources`](https://github.com/ctu-mrs/mrs_gazebo_common_resources/tree/master/worlds)

Pass the **world name** (e.g., `forest`) as an argument to the launch file
```bash
roslaunch mrs_simulation simulation.launch gui:=true world_name:=forest
```

### Load arbitrary custom world

Pass the **world file** as an argument to the launch file using `find` to locate your package
```bash
roslaunch mrs_simulation simulation.launch gui:=true world_file:='$(find custom_gazebo_resources)/worlds/custom_world.world'
Expand All @@ -45,6 +46,7 @@ roslaunch mrs_simulation simulation.launch gui:=true world_file:=/path/to/world/
## How to create a custom world

### Create the world manually in a text editor

Create a [completely new](http://gazebosim.org/tutorials/?tut=ros_roslaunch#CreatingaCustomWorldFile) *.world* file or copy & modify an existing file (e.g., [forest.world](https://github.com/ctu-mrs/mrs_gazebo_common_resources/blob/master/worlds/forest.world)).
Make sure your world file contains line
```xml
Expand All @@ -53,6 +55,7 @@ Make sure your world file contains line
The included [mrs_gazebo_static_transform_republisher](https://github.com/ctu-mrs/mrs_gazebo_common_resources/blob/master/src/world_plugins/static_transform_republisher.cpp) plugin provides static [transforms](https://ctu-mrs.github.io/docs/system/frames_of_reference.html) of all the [spawned sensors](https://ctu-mrs.github.io/docs/simulation/howto.html#2-spawn-a-drone-drones) to the `<uav_name>/fcu` frame.

### Create the world using Gazebo

1. Start a Gazebo simulation
2. Insert models to the world as you wish using the Gazebo GUI
3. Save world to file: `File -> Save as`
Expand All @@ -61,6 +64,7 @@ The included [mrs_gazebo_static_transform_republisher](https://github.com/ctu-mr
# Common issues

## No static transformations

`rosrun rqt_tf_tree rqt_tf_tree` shows no transformations between spawned sensors and the `<uav_name>/fcu` frame?
Make sure your world file contains the `mrs_gazebo_static_transform_republisher` plugin as described [above](https://ctu-mrs.github.io/docs/simulation/custom_world.html#create-the-world-manually-in-a-text-editor).
Lack of static transformations might also prevent start of some systems and hence prevent taking off.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: MRS Drone Spawner
parent: Simulation
nav_order: 2
parent: Gazebo
---

| :warning: **Attention please: This page is outdated.** |
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: Videos from Gazebo
parent: Simulation
nav_order: 5
parent: Gazebo
---

# How to generate video from Gazebo
Expand Down
9 changes: 4 additions & 5 deletions docs/simulation/howto.md → docs/simulation/gazebo/howto.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
layout: default
title: How to simulate
parent: Simulation
nav_order: 1
parent: Gazebo
---

| :warning: **Attention please: This page is outdated.** |
| :--- |
| :warning: **Attention please: This page is outdated.** |
| :--- |
| The MRS UAV System 1.5 is being released and this page needs updating. Please, keep in mind that the information on this page might not be valid. |

# How to start the simulation

If you have everything installed and compiled, the next step is to test it in the simulation.
Running the simulation consists of several steps, which are usually **automated** using a **tmuxinator** script.
Examples of tmuxinator files can be found in subfolders of [simulation/example_tmux_scripts](https://github.com/ctu-mrs/simulation/tree/master/example_tmux_scripts), e.g., [one_drone_gps](https://github.com/ctu-mrs/simulation/blob/master/example_tmux_scripts/one_drone_gps/session.yml).
Expand All @@ -20,7 +20,6 @@ cd ~/git/simulation/example_tmux_scripts/one_drone_gps
./start.sh
```


# Individual steps explanation

Here we will describe each step required to make the drone fly.
Expand Down
10 changes: 10 additions & 0 deletions docs/simulation/gazebo/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: default
title: Gazebo
parent: Simulation
has_children: true
---

# Gazebo Simulator

This folder contains docs on simulation using Gazebo and the MRS UAV System.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: How to create a real world elevation map in Gazebo
parent: Simulation
nav_order: 7
parent: Gazebo
---

# How to create a real world elevation map in Gazebo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: Gazebo Motor Parameters
parent: Simulation
nav_order: 6
parent: Gazebo
---

| :warning: **Attention please: This page is outdated.** |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: Run Simulation Faster than Real-time
parent: Simulation
nav_order: 4
parent: Gazebo
---

| :warning: **Attention please: This page is outdated.** |
Expand Down
22 changes: 20 additions & 2 deletions docs/simulation/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
---
layout: default
title: Simulation
nav_order: 4
has_children: true
---

# Simulating with [MRS UAV system](https://github.com/ctu-mrs/mrs_uav_system)
# Simulations

| :warning: **Attention please: This page needs work.** |
| :--- |
| The MRS UAV System 1.5 is being released and this page needs updating. Please, keep in mind that the information on this page might not ve valid. |

The [MRS UAV System](https://github.com/ctu-mrs/mrs_uav_system) can be connected to _any_ drone simulator using a [HW API Plugin](https://github.com/ctu-mrs/mrs_uav_hw_api).
The following interfaces are provided out-of-the box.

## Gazebo/ROS

[How to simulate using Gazebo/ROS](./gazebo/howto.md).

## CoppeliaSim

[How to simulate using CoppeliaSim](./coppelia/howto.md).

## MRS Multirotor Simulator

[How to simulate using the MRS Multirotor Simulator](./mrs/howto.md).
14 changes: 14 additions & 0 deletions docs/simulation/mrs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
title: MRS Simulator
parent: Simulation
has_children: true
---

# MRS Multirotor Simulator

| :warning: **Attention please: This page needs work.** |
| :--- |
| The MRS UAV System 1.5 is being released and this page needs updating. Please, keep in mind that the information on this page might not be valid. |

This folder contains docs on simulation using the [MRS Multirotor Simulator](https://github.com/ctu-mrs/mrs_multirotor_simulator) and the MRS UAV System.

0 comments on commit 78a80ef

Please sign in to comment.