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.
- AeroRust mav repository: https://github.com/AeroRust/mav
- PX4: https://px4.io
- ArduPilot: https://ardupilot.org
- MAVLink: https://mavlink.io
Id's of the commands and their values can be found in the file: build/libARCommands/libARCommands/ARCOMMANDS_Ids.h
@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:
commandFeature = ARCOMMANDS_ReadWrite_Read8FromBuffer
commandClass = ARCOMMANDS_ReadWrite_Read8FromBuffer
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);
https://developer.parrot.com/docs/sphinx/
-
Follow the installation guide
-
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
- 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);
}
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
Documentation:
tlm-data-logger inet:127.0.0.1:9060
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.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dual MIT/Apache2 is strictly more permissive