mavsdk::Mocap Class Reference

#include: mocap.h


  • Allows interfacing a vehicle with a motion capture system in order to allow navigation without global positioning sources available (e.g. indoors, or when flying under a bridge. etc.).

Data Structures

struct AngleBody

struct AngularVelocityBody

struct AttitudePositionMocap

struct Covariance

struct Odometry

struct PositionBody

struct Quaternion

struct SpeedBody

struct VisionPositionEstimate

Public Types

Type Description
enum Result Possible results returned for mocap requests.
std::function< void(Result)> ResultCallback Callback type for asynchronous Mocap calls.

Public Member Functions

Type Name Description
  Mocap (System & system) Constructor. Creates the plugin for a specific System.
  ~Mocap () Destructor (internal use only).
  Mocap (const Mocap &)=delete Copy constructor (object is not copyable).
Result set_vision_position_estimate (VisionPositionEstimate vision_position_estimate)const Send Global position/attitude estimate from a vision source.
Result set_attitude_position_mocap (AttitudePositionMocap attitude_position_mocap)const Send motion capture attitude and position.
Result set_odometry (Odometry odometry)const Send odometry information with an external interface.
const Mocap & operator= (const Mocap &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

Mocap()

mavsdk::Mocap::Mocap(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto mocap = std::make_shared<Mocap>(system);

Parameters

  • System& system - The specific system associated with this plugin.

~Mocap()

mavsdk::Mocap::~Mocap()

Destructor (internal use only).

Mocap()

mavsdk::Mocap::Mocap(const Mocap &)=delete

Copy constructor (object is not copyable).

Parameters

Member Typdef Documentation

typedef ResultCallback

using mavsdk::Mocap::ResultCallback =  std::function<void(Result)>

Callback type for asynchronous Mocap calls.

Member Enumeration Documentation

enum Result

Possible results returned for mocap requests.

Value Description
Unknown Unknown error.
Success Request succeeded.
NoSystem No system is connected.
ConnectionError Connection error.
InvalidRequestData Invalid request data.

Member Function Documentation

set_vision_position_estimate()

Result mavsdk::Mocap::set_vision_position_estimate(VisionPositionEstimate vision_position_estimate) const

Send Global position/attitude estimate from a vision source.

This function is blocking.

Parameters

Returns

Result - Result of request.

set_attitude_position_mocap()

Result mavsdk::Mocap::set_attitude_position_mocap(AttitudePositionMocap attitude_position_mocap) const

Send motion capture attitude and position.

This function is blocking.

Parameters

Returns

Result - Result of request.

set_odometry()

Result mavsdk::Mocap::set_odometry(Odometry odometry) const

Send odometry information with an external interface.

This function is blocking.

Parameters

Returns

Result - Result of request.

operator=()

const Mocap& mavsdk::Mocap::operator=(const Mocap &)=delete

Equality operator (object is not copyable).

Parameters

Returns

 const Mocap & -

© Dronecode 2017-2019. License: CC BY 4.0            Updated: 2020-06-05 09:10:43

results matching ""

    No results matching ""