aerorust / mav Goto Github PK
View Code? Open in Web Editor NEWRust crates for the MAVLink lightweight messaging protocol for communicating with drones (and between onboard drone components).
Home Page: http://aerorust.org/mav/
Rust crates for the MAVLink lightweight messaging protocol for communicating with drones (and between onboard drone components).
Home Page: http://aerorust.org/mav/
Possibly blocked by #4
We currently support the PX4 autopilot (flight control software) https://px4.io however we would like to have a similar setup with another autopilot: ArduPilot https://ardupilot.org.
Allow the developers using this project to focus on hacking and controlling the drones themselves instead of setting up other tools, installing other software on their machines, etc.
The set up should be as simple as possible and have a running simulation ready for use.
Check out the list provided in the README.md
MAVSDK
for ArduPilot #4I've recently asked in the ArduPilot community on Discord if it's possible to use MAVSDK
for ArduPilot.
Apparently, the MAVSDK
server is hardcoded for PX4
specifically and there might be more than a few differences.
This should be explored so that we can see what it would take to use the MAVSDK
server for ArduPilot.
Basically mavsdk will runtime detect which autopilot it connects to, but some functionality is hardcoded to px4 - for instance Ardupilot uses waypoint 0 to store the home location, so missions are effectively indexed from 1. Px4 doesn’t, so missions are indexed from 0. Takeoff, land, etc should work.
The gazebo server is running in a docker container in Headless mode, however, if you have installed gazebo client on your host machine you can connect to the server.
This will allow people to view and manipulate the gazebo environment, for example to:
Document the command we can use to connect to the server.
Explain how to connect a gazebo client to the server in:
Since prost:0.11
doesn't install protoc
anymore (see https://docs.rs/prost/0.11.0/prost/#protoc) we need to document this in both:
$ docker-compose logs mavsdk-grpc-server
Attaching to mavsdk-grpc-server
mavsdk-grpc-server | qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
Check what is the request-response time for the MAVSDK server which underneath uses the MAVLINK protocol to send and receive messages.
This will help us determine if it's reliable for Proof of concept project regarding flying/controlling drones.
The Typhoon SITL simulation is broken for some time now, I've filed an issue in the PX4 repo (see the upstream issue for more details PX4/PX4-Autopilot#19853) and the drone is not able to Arm.
We can wait for a response on the issue but also we can switch the drone model used for the simulation and try with it. There is a drawback to this (if it works) - we won't have a video stream as only the typhoon simulation supports one.
Apparently this is an issue with the image itself. Once we've downgraded the image to 0.10.1
this issue disappeared:
Here are 2 examples that cover one Action & one Telemetry service:
mav/mav-sdk/examples/takeoff.rs
An example of action Arm & Takeoff request-response and info version & identification of the drone.
mav/mav-sdk/examples/telemetry_subscription.rs
An example for a telemetry Attitude Euler subscription and listening for telemetry data.
Relevant logs imo:
px4-gazebo-headless | Error Code: 11 Msg: Unable to find uri[model://baylands]
px4-gazebo-headless | Error setting socket option (IP_MULTICAST_IF).
px4-gazebo-headless | Error setting socket option (IP_MULTICAST_IF).
px4-gazebo-headless | Did you set the environment variable IGN_IP with a correct IP address?
px4-gazebo-headless | [172.24.0.3] seems an invalid local IP address.
px4-gazebo-headless | Using 127.0.0.1 as hostname.
px4-gazebo-headless | Error setting socket option (IP_MULTICAST_IF).
px4-gazebo-headless | terminate called after throwing an instance of 'std::out_of_range'
px4-gazebo-headless | what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
It looks like we're looking for multicast capabilities which may or may not be available, i m not sure and i lack context on what the container tries to achieve here
full logs can be found here:
px4-gazebo-headless | [100%] Built target px4
px4-gazebo-headless | Scanning dependencies of target gazebo_typhoon_h480__baylands
px4-gazebo-headless | SITL ARGS
px4-gazebo-headless | sitl_bin: /root/Firmware/build/px4_sitl_default/bin/px4
px4-gazebo-headless | debugger: none
px4-gazebo-headless | program: gazebo
px4-gazebo-headless | model: typhoon_h480
px4-gazebo-headless | world: baylands
px4-gazebo-headless | src_path: /root/Firmware
px4-gazebo-headless | build_path: /root/Firmware/build/px4_sitl_default
px4-gazebo-headless | GAZEBO_PLUGIN_PATH :/root/Firmware/build/px4_sitl_default/build_gazebo
px4-gazebo-headless | GAZEBO_MODEL_PATH :/root/Firmware/Tools/sitl_gazebo/models
px4-gazebo-headless | LD_LIBRARY_PATH :/root/Firmware/build/px4_sitl_default/build_gazebo
px4-gazebo-headless | Using: /root/Firmware/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf
px4-gazebo-headless | not running gazebo gui
px4-gazebo-headless | SITL COMMAND: "/root/Firmware/build/px4_sitl_default/bin/px4" "/root/Firmware/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/root/Firmware"/test_data
px4-gazebo-headless | INFO [px4] Creating symlink /root/Firmware/build/px4_sitl_default/etc -> /root/Firmware/build/px4_sitl_default/tmp/rootfs/etc
px4-gazebo-headless |
px4-gazebo-headless | ______ __ __ ___
px4-gazebo-headless | | ___ \ \ \ / / / |
px4-gazebo-headless | | |_/ / \ V / / /| |
px4-gazebo-headless | | __/ / \ / /_| |
px4-gazebo-headless | | | / /^\ \ \___ |
px4-gazebo-headless | \_| \/ \/ |_/
px4-gazebo-headless |
px4-gazebo-headless | px4 starting.
px4-gazebo-headless |
px4-gazebo-headless | INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
px4-gazebo-headless | Info: found model autostart file as SYS_AUTOSTART=6011
px4-gazebo-headless | INFO [param] selected parameter default file eeprom/parameters_6011
px4-gazebo-headless | [param] parameter file not found, creating eeprom/parameters_6011
px4-gazebo-headless | SYS_AUTOCONFIG: curr: 0 -> new: 1
px4-gazebo-headless | SYS_AUTOSTART: curr: 0 -> new: 6011
px4-gazebo-headless | CAL_ACC0_ID: curr: 0 -> new: 1310988
px4-gazebo-headless | CAL_GYRO0_ID: curr: 0 -> new: 1310988
px4-gazebo-headless | CAL_ACC1_ID: curr: 0 -> new: 1310996
px4-gazebo-headless | CAL_GYRO1_ID: curr: 0 -> new: 1310996
px4-gazebo-headless | CAL_ACC2_ID: curr: 0 -> new: 1311004
px4-gazebo-headless | CAL_GYRO2_ID: curr: 0 -> new: 1311004
px4-gazebo-headless | CAL_MAG0_ID: curr: 0 -> new: 197388
px4-gazebo-headless | CAL_MAG1_ID: curr: 0 -> new: 197644
px4-gazebo-headless | SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
px4-gazebo-headless | SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
px4-gazebo-headless | Error Code: 11 Msg: Unable to find uri[model://baylands]
px4-gazebo-headless | Error setting socket option (IP_MULTICAST_IF).
px4-gazebo-headless | Error setting socket option (IP_MULTICAST_IF).
px4-gazebo-headless | Did you set the environment variable IGN_IP with a correct IP address?
px4-gazebo-headless | [172.24.0.3] seems an invalid local IP address.
px4-gazebo-headless | Using 127.0.0.1 as hostname.
px4-gazebo-headless | Error setting socket option (IP_MULTICAST_IF).
px4-gazebo-headless | terminate called after throwing an instance of 'std::out_of_range'
px4-gazebo-headless | what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
px4-gazebo-headless | qemu: uncaught target signal 6 (Aborted) - core dumped
px4-gazebo-headless | * SYS_AUTOCONFIG: curr: 1 -> new: 0
px4-gazebo-headless | IMU_INTEG_RATE: curr: 200 -> new: 250
px4-gazebo-headless | INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
px4-gazebo-headless | PX4 SIM HOST: localhost
px4-gazebo-headless | INFO [simulator] Waiting for simulator to accept connection on TCP port 4560
We've setup the typhoon h480 hexrotor
( https://dev.px4.io/master/en/simulation/gazebo_vehicles.html#typhoon-h480-hexrotor) as the default drone in the docker-compose
file because it supports video stream in the Gazebo
simulation.
Using the headless gazebo
enabled docker image I tried to connect and use the video stream from the simulation, but I was not able to make it work.
Before we are able to use the Video stream in an application we need to figure out how to connect to the docker container.
Please make sure to add documentation (on the what and whys) once this is working
From the C RTSP video proxy:
8554
/live
Example of a connection url (can be used in e.g. VLC): rtsp://127.0.0.1:8554/live
Related issue: JonasVautherin/px4-gazebo-headless#20
docker-compose
exported ports: https://github.com/AeroRust/mav/blob/main/docker-compose.yml#L7-L8
Docker entrypoint of the image and the command to start the RTSP (video stream) proxy:
https://github.com/JonasVautherin/px4-gazebo-headless/blob/master/entrypoint.sh#L62-L63
the C video stream proxy: https://github.com/JonasVautherin/px4-gazebo-headless/blob/master/sitl_rtsp_proxy/main.cpp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.