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 (std::shared_ptr< System > system) Constructor. Creates the plugin for a specific System.
  ~Mocap () override Destructor (internal use only).
  Mocap (const Mocap & other) Copy constructor.
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 = Mocap(system);

Parameters

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

Mocap()

mavsdk::Mocap::Mocap(std::shared_ptr< System > system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto mocap = Mocap(system);

Parameters

  • std::shared_ptr< System > system - The specific system associated with this plugin.

~Mocap()

mavsdk::Mocap::~Mocap() override

Destructor (internal use only).

Mocap()

mavsdk::Mocap::Mocap(const Mocap &other)

Copy constructor.

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.
Unsupported Function unsupported.

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 & -

© MAVSDK Development Team 2017-2023. License: CC BY 4.0            Updated: 2023-12-27 03:10:20

results matching ""

    No results matching ""