MAV'RIC
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes
Servos_mix_matrix< N > Class Template Reference

Servos mix. More...

#include <servos_mix_matrix.hpp>

Inheritance diagram for Servos_mix_matrix< N >:
Inheritance graph
[legend]
Collaboration diagram for Servos_mix_matrix< N >:
Collaboration graph
[legend]

List of all members.

Classes

struct  args_t
 Required arguments. More...
struct  conf_t
 Configuration structure. More...

Public Member Functions

 Servos_mix_matrix (const args_t &args, const conf_t &config=default_config())
 Constructor.
 thrust_command_ (thrust_command_t{{{0.0f, 0.0f, 0.0f}}})
 mix_ (config.mix)
 trim_ (config.trim)
 min_ (config.min)
 max_ (config.max)
virtual bool update (void)
 Perform conversion from torque/thrust command to servo command.
virtual bool failsafe (void)
virtual bool set_command (const torque_command_t &torque)
 sets the torque command
virtual bool set_command (const thrust_command_t &thrust)
 sets the thrust command
virtual bool get_command (torque_command_t &torque) const
 sets the torque command
virtual bool get_command (thrust_command_t &thrust) const
 sets the thrust command

Static Public Member Functions

static conf_t default_config (void)
 Default configuration.

Protected Attributes

std::array< Servo *, N > servos_
torque_command_t torque_command_
thrust_command_t thrust_command_
Mat< N, 6 > mix_
Mat< N, 1 > trim_
Mat< N, 1 > min_
Mat< N, 1 > max_

Detailed Description

template<uint32_t N>
class Servos_mix_matrix< N >

Servos mix.

Template Parameters:
NNumber of servos

Member Function Documentation

template<uint32_t N>
static conf_t Servos_mix_matrix< N >::default_config ( void  ) [inline, static]

Default configuration.

Returns:
Config structure
template<uint32_t N>
virtual bool Servos_mix_matrix< N >::get_command ( torque_command_t torque) const [inline, virtual]

sets the torque command

Parameters:
commandtorque command in body frame
Returns:
success whether command was accepted

Implements Servos_mix.

template<uint32_t N>
virtual bool Servos_mix_matrix< N >::get_command ( thrust_command_t thrust) const [inline, virtual]

sets the thrust command

Parameters:
commandthrust command in body frame
Returns:
success whether command was accepted

Implements Servos_mix.

template<uint32_t N>
virtual bool Servos_mix_matrix< N >::set_command ( const torque_command_t torque) [inline, virtual]

sets the torque command

Parameters:
commandtorque command in body frame
Returns:
success whether command was accepted

Implements Servos_mix.

template<uint32_t N>
virtual bool Servos_mix_matrix< N >::set_command ( const thrust_command_t thrust) [inline, virtual]

sets the thrust command

Parameters:
commandthrust command in body frame
Returns:
success whether command was accepted

Implements Servos_mix.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines