Skip to content

In-development simulator for VRC 2022

Notifications You must be signed in to change notification settings

gbristow/VRC-2022-SIM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRC 2022 Simulation

This Repository hosts the Unity project for the VRC 2022 simulation.

Architecture

This simulation is currently designed to run all on a local development computer. A high level architecture diagram is shown below.

client diagram

A more detailed diagram of how the VRC flight software interacts with the simulation is shown below

vrc sitl software diagram

We are also working to make this simulation web based. The goal of this architecture will be to allow all of the students to participate in the software development of the drone with minimal installation required. The client side requirements will be as follow

  • Browser connection to server
  • Qgroundcontrol (optional)
    • joystick connected to QGC for rc control (optional)
  • VRC GUI (optional)

a high level architecture diagram is shown for this configuration below as well.

server diagram

Pre-Reqs

This project uses the Airsim plugin to communicate between unity and the PX4 flight stack. In order to do development please download and build unity as described here

Install the PX4 toolchain as described here

clone VRC-2022 and checkout sim-dev

cd VMC\FlightSoftware\mqtt and run

docker build -t sim-mqtt .

Importing the Project

To import, simply open unity hub, click impoort and select the top level folder of this project.

Running Simulation

Run mqtt broker

docker run -it --rm --add-host=host.docker.internal:host-gateway --name sim-mqtt -p 18830:18830 flightsoftware_mqtt 

Run Unity Sim from Unity Editor

Run Px4

  • navigate to C:\PX4
  • double click run-console.bat
  • change directories to px4 firmware cd PX4-Autopilot/
  • run PX4 sitl make px4_sitl_default none_iris

Known Issues

the px4 slight stack briefly looses connection with Airsim. I think this is related to this issue. PX4/PX4-Autopilot#16234

This might not be an issue if sim is ran on linux.

About

In-development simulator for VRC 2022

Resources

Stars

Watchers

Forks

Releases

No releases published