Skip to content

AeroRust/arsdk-rs

Repository files navigation

arsdk-rs   crates.io Documentation MPL 2.0 License MIT License

Contributor Covenant

🛠 Project status: Proof of concept

This project was a Proof of concept Software Development Kit for Parrot drones.

Due to the recent development and the pivotting of the Parrot company, we've moved our efforts to a new Open-source project called MAVLink. MAVLink is a messaging protocol that is compatible with multiple autopilots (PX4, ArduPilot), multiple hardware and there are many open-source projects build around it to support different aspect of controlling drones, planes and marien and other vehicles.

ℹ Resources

jumpingsumo-rs   crates.io Documentation

bebop2

Not released yet

Useful information related to the official C SDK

Commands:

Id's of the commands and their values can be found in the file: build/libARCommands/libARCommands/ARCOMMANDS_Ids.h

Filters:

@TODO Figure out what the Filters actually do.

eARCOMMANDS_FILTER_STATUS ARCOMMANDS_Filter_FilterCommand (ARCOMMANDS_Filter_t *filter, uint8_t *buffer, uint32_t len, eARCOMMANDS_FILTER_ERROR *error) found in build/libARCommands/gen/Sources/ARCOMMANDS_Filter.c has 3 parameters in the order:

  1. commandFeature = ARCOMMANDS_ReadWrite_Read8FromBuffer
  2. commandClass = ARCOMMANDS_ReadWrite_Read8FromBuffer
  3. commandId = ARCOMMANDS_ReadWrite_Read16FromBuffer

Based on these parameters it triggers a filter behavior, e.g.: filter->CmdGenericDefaultBehavior

/**
 * @brief Status code for ARCOMMANDS_Filter_FilterCommand function
 */
typedef enum {
    ARCOMMANDS_FILTER_STATUS_ALLOWED = 0, ///< The command should pass the filter
    ARCOMMANDS_FILTER_STATUS_BLOCKED, ///< The command should not pass the filter
    ARCOMMANDS_FILTER_STATUS_UNKNOWN, ///< Unknown command. The command was possibly added in a newer version of libARCommands, or is an invalid command.
    ARCOMMANDS_FILTER_STATUS_ERROR, ///< The filtering of the command failed.
} eARCOMMANDS_FILTER_STATUS;

/**
 * @brief ARCOMMANDS_Filter object holder
 */
typedef struct ARCOMMANDS_Filter_t ARCOMMANDS_Filter_t;

/**
 * @brief Creates a new ARCOMMANDS_Filter_t
 * @param defaultBehavior The default behavior of the filter (must be either ARCOMMANDS_FILTER_STATUS_BLOCKED or ARCOMMANDS_FILTER_STATUS_ALLOWED).
 * @param error Optionnal pointer which will hold the error code.
 * @warning This function allocates memory.
 * @note The memory must be freed by a call to ARCOMMANDS_Filter_DeleteFilter.
 * @return A new ARCOMMANDS_Filter_t instance. NULL in case of error.
 */
ARCOMMANDS_Filter_t* ARCOMMANDS_Filter_NewFilter (eARCOMMANDS_FILTER_STATUS defaultBehavior, eARCOMMANDS_FILTER_ERROR *error);

Sphinx simulator

https://developer.parrot.com/docs/sphinx/

  1. Follow the installation guide

  2. Simulate drone

sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/{DRONE}.drone::stolen_interface={YOUR_INTERFACE}:eth0:192.168.42.1/24

NOTE: Since we don't have video streaming handling from the drone, you should disable the front camera for Bebeop2 (::with_front_cam=0). Otherwise you won't be able to connect (performa a handshake) to it:

sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/{DRONE}.drone::stolen_interface={YOUR_INTERFACE}:eth0:192.168.42.1/24::with_front_cam=0
  • You can find your interface with:

    iwconfig
  • Available drones:

    ls -1a /opt/parrot-sphinx/usr/share/sphinx/drones/
    • airborne.drone
    • anafi4k.drone
    • bebop2.drone
    • bebop.drone
    • bluegrass.drone
    • disco.drone
    • mambo.drone
    • swing.drone
  1. Run examples with IP:
use arsdk-rs::PARROT_SPHINX_IP;
use std::net::{IpAddr, Ipv4Addr};

fn main() {
    let expected = IpAddr::V4(Ipv4Addr::new(10, 202, 0, 1))
    assert_eq!(expected, PARROT_SPHINX_IP);
}

Video stream:

Based on pyparrot pointing to the forum. NOTE: It doesn't currently work.

Bebop2 (double check): rtsp://10.202.0.1/media/stream2 Anafi4k: rtsp://10.202.0.1/live

Telemetry

Documentation:

tlm-data-logger inet:127.0.0.1:9060

Code of Conduct

We have a Code of Conduct so as to create a more enjoyable community and work environment. Please see the CODE_OF_CONDUCT file for more details.

License

Licensed under either of

at your option.

Dual MIT/Apache2 is strictly more permissive

About

Arsdk-rs - PoC of SDK for https://parrot.com #drones 🛩️

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages