Skip to content

Commit

Permalink
docs: Add docs on launching NaviGator simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Sep 10, 2024
1 parent 9456457 commit dc3283b
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/navigator/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Procedures related to operation of the NaviGator AMS.
Testing Day Checklist <testing_checklist>
networking

Software
--------

.. toctree::
:maxdepth: 2

simulating.md

Lessons Learned + Reflections
-----------------------------
Lessons we've learned throughout the process that are helpful for future projects.
Expand Down
64 changes: 64 additions & 0 deletions docs/navigator/simulating.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Simulating NaviGator

If we had to test all of our new code on the physical build of NaviGator each time
we made a change, we'd never be able to make changes quickly! Therefore, when
making changes, it's recommended to simulate them before deploying NaviGator
in a physical testing environment. Luckily, we have a great simulation environment,
powered by VRX.

## VRX

[VRX](https://github.com/osrf/vrx) is a simulation environment for aquatic unmanned vehicles, developed by the
[Open Source Robotics Foundation](https://www.openrobotics.org/). It was originally
developed for the RobotX competition, and it has continued development in strong
collaboration with RoboNation, the organization running RobotX. Eventually, the
VRX competition was launched, which was an exclusively-virtual robotics competition
that used the VRX platform as a simulator.

VRX is a powerful simulator built on top of [Gazebo](https://gazebosim.org), a standard
simulator for ROS environments. In VRX, you can customize the vehicle used in the simulator,
as well as the surrounding environmental conditions (such as the wind, waves, fog,
and ambient light). Also, the VRX platform typically provides world files and object
models that are similar to actual task elements used in the biannual international RobotX competition,
which MIL competes in.

## Launching the NaviGator simulation

To launch the simulation for NaviGator, run the following command in your terminal:
```bash
roslaunch navigator_launch simulation.launch --screen
```

There are some variables you can provide to this launch file to customize the
simulation environment. These include:

* `use_mil_world`: If `true`, use world files from `navigator_gazebo` (our own
ROS package built for NaviGator). Otherwise, use world files from `vrx_gazebo`
(aka, world files provided to everyone in VRX). Default: `false`.
* `world`: Which world file to launch. Typically, there are several world files,
each of which will focus on one part of the competition.

## Viewing and inspecting the environment

Now, you've launched the simulation environment, but you're not actually able
to see NaviGator -- what gives? At this point, you can run one of two commands.

```bash
gazebogui
```

`gazebogui` will launch Gazebo, which will provide a beautiful, high-level view
of the simulation.

```bash
nviz
```

`nviz` will launch Rviz, which will give you a much more granular view of NaviGator.
Here, you can inspect the frames and joints that make up NaviGator, the inputs of
its sensors, etc.

## Doing things

At this point, it should be just like NaviGator is in the lake -- you can run
missions, move NaviGator around using `nmove`, or take a peek at the cameras/sensors.

0 comments on commit dc3283b

Please sign in to comment.