Giter Site home page Giter Site logo

roanhope / innopolis_vtol_dynamics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zilantrobotics/innopolis_vtol_dynamics

0.0 0.0 0.0 31.63 MB

Cyphal/DroneCAN UAV HITL simulator

License: GNU General Public License v3.0

Shell 88.16% Dockerfile 11.84%

innopolis_vtol_dynamics's Introduction

UAV HITL Dynamics Simulator

UAV HITL Dynamics Simulator is a set of ROS packages proposed full simulation for UAV based on PX4/Ardupilot autopilot.

dynamics

The key feature of this simulation is to run it in such a way that the hardware knows nothing about the simulation. This can be done with Cyphal/DroneCAN. It covers more PX4 modules than standard SITL and HITL.

1. Design

VTOL HITL Dynamics Simulator is designed to be modular. It is divided into the following main components:

  1. UAV dynamics is the main node that handles actuator commands from the communicator, performs dynamics simulation, and publishes vehicle and sensors states.
  2. Communicator is the set of nodes that communicate with the PX4 flight stack in HITL (via Cyphal/DroneCAN) and SITL (via MAVLink) modes.
  3. inno_sim_interface is a bridge for interaction with 3D-Simulator through ROS.

The design of the simulator is shown below.

scheme

2. Usage

The simulator is distributed as a Docker image. It is recommended to use the ./scripts/docker.sh script. It configures all the necessary Docker flags, performs automatic firmware upload, configuration, creates a CAN interface, and generally provides a simple interface to interact with the simulator.

Step 1. Clone repository with submodules

git clone https://github.com/RaccoonlabDev/innopolis_vtol_dynamics.git --recursive

Whenever you pull this repository, don't forget to update submodules:

git submodule update --init --recursive

Step 2. Build/pull the docker image

To build docker image, type:

./scripts/docker.sh build

An image on dockerhub usually is not up to date, so it's better to build manually

Step 3. Connect everything together for HITL

You should skip this step if you want to run PX4 MAVLink SITL mode. Please follow docs/px4/mavlink for details.

Typically we use CUAV v5+ and RL-programmer-sniffer, but it might be anything else.

An example of a connection is shown in the picture below.

drawing

All default parameters expect that you use CAN1 on the autopilot side.

Step 4. Run the container in force mode

In --force mode the script automatically upload the required firmware and parameters corresponded to the specified mode, create SLCAN and run the container with required docker flags.

To run force mode you need to install autopilot-tools python package: pip install autopilot-tools.

To get the list of all supported modes, just type:

./scripts/docker.sh --help

To run PX4 Cyphal quadcopter, type:

./scripts/docker.sh cq  # cq = cyphal_quadrotor

To run PX4 Dronecan VTOL, type:

./scripts/docker.sh dv  # cq = dronecan_vtol

Troubleshooting:

  • If your sniffer connection is not found or something else is missing, it will exit in a few seconds.

If something doesn't work, please open an issue.

Step 5. Run ground control station

Here 2 options are suggested.

  1. You can run QGroundControl or MissionPlanner to have manual flight
  2. (soon) You can run a script to run one of the test scenario in automatic mode.

Step 6. (optional) 3D Simulator

A new 3D simulator will appear here soon.

3. Supported modes

You can obrain the actual list of the suported modes by typing ./scripts/docker.sh --help.

Well, here is the output of the command:

Primary supported modes (with aliases):
  cyphal_quadrotor,cq         | Cyphal      PX4 v1.14-beta  Quadrotor x (4001)
  cyphal_standard_vtol,csv    | Cyphal      PX4 v1.14-beta  Standard VTOL (13000)
  dronecan_quadrotor,dq       | DroneCAN    PX4 v1.14-beta  Quadrotor (4001)
  dronecan_vtol_v1_14_0,dv    | DroneCAN    PX4 v1.14-beta  Standard VTOL (13000)
  dronecan_vtol_v1_12_1,dvo   | DroneCAN    PX4 v1.12       vtol 13070

Other modes:
  sitl_inno_vtol              | MAVLink     PX4 v1.12       vtol 13070
  sitl_flight_goggles         | MAVLink     PX4 v1.12       Quadrotor (4001)
  cyphal_and_dronecan         | 2 CAN       AP  v4.4.0      Copter
  cyphal_octorotor,co         | Cyphal      PX4 v1.14-beta  Octorotor Coaxial (12001)

New modes will be extended step by step.

4. Example

Check the video below.

Cyphal/DroneCAN HITL VTOL dynamics simulator

5. Auxilliary documentation

Docs:

Outdated manual instructions:

innopolis_vtol_dynamics's People

Contributors

ponomarevda avatar frontw 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.