MAV'RIC
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Velocity_controller Class Reference

Velocity controller for hovering platforms. More...

#include <velocity_controller.hpp>

Inheritance diagram for Velocity_controller:
Inheritance graph
[legend]
Collaboration diagram for Velocity_controller:
Collaboration graph
[legend]

List of all members.

Classes

struct  args_t
 Required arguments. More...
struct  conf_t
 Velocity controller configuration. More...

Public Types

enum  control_frame_t { LOCAL_FRAME = 0, SEMILOCAL_FRAME = 1, BODY_FRAME = 2 }
 Reference frame in which the control is done. More...

Public Member Functions

 Velocity_controller (const args_t &args, const conf_t &config)
 Constructor.
bool update (void)
 Main update function.
bool set_command (const velocity_command_t &vel)
 Sets the input command.
bool get_command (velocity_command_t &vel) const
 Returns the input command.
bool get_output (attitude_command_t &att) const
 Returns the output command.
bool get_output (thrust_command_t &thrust) const
 Returns the output command.
pid_controller_tget_pid_X (void)
 Gives acces to internal pid_controller.
pid_controller_tget_pid_Y (void)
pid_controller_tget_pid_Z (void)

Protected Member Functions

virtual bool compute_attitude_and_thrust_from_desired_accel (const std::array< float, 3 > &accel_vector, attitude_command_t &attitude_command, thrust_command_t &thrust_command)=0
 Computes attitude and thrust command based on desired acceleration. Depends on robot dynamics.

Protected Attributes

const AHRSahrs_
 Pointer to attitude estimation (input)
const INSins_
 Speed and position estimation (input)
velocity_command_tvelocity_command_
 Velocity command (input)
attitude_command_tattitude_command_
 Attitude command (output)
thrust_command_tthrust_command_
 Thrust command (output)
control_frame_t control_frame_
 Reference frame in which the control is don.
pid_controller_t pid_ [3]
 PID controller for velocity along X, Y and Z in global frame.

Detailed Description

Velocity controller for hovering platforms.


Member Enumeration Documentation

Reference frame in which the control is done.

Enumerator:
LOCAL_FRAME 

Local (NED frame)

SEMILOCAL_FRAME 

Semilocal frame (ie. NED rotated with current heading)

BODY_FRAME 

Body frame.


Constructor & Destructor Documentation

Velocity_controller::Velocity_controller ( const args_t args,
const conf_t config 
)

Constructor.

Parameters:
argsRequired arguments
configConfiguration

Member Function Documentation

virtual bool Velocity_controller::compute_attitude_and_thrust_from_desired_accel ( const std::array< float, 3 > &  accel_vector,
attitude_command_t attitude_command,
thrust_command_t thrust_command 
) [protected, pure virtual]

Computes attitude and thrust command based on desired acceleration. Depends on robot dynamics.

Parameters:
accel_vectorDesired acceleration vectors (input)
attitude_commandAttitude command (output)
thrust_commandThrust command (output)
Returns:
success

Implemented in Velocity_controller_copter, and Velocity_controller_holonomic.

Here is the caller graph for this function:

bool Velocity_controller::get_command ( velocity_command_t vel) const [virtual]

Returns the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller_1_to_2< velocity_command_t, attitude_command_t, thrust_command_t >.

bool Velocity_controller::get_output ( attitude_command_t att) const [virtual]

Returns the output command.

Parameters:
commandoutput command
Returns:
success

Implements Controller_1_to_2< velocity_command_t, attitude_command_t, thrust_command_t >.

bool Velocity_controller::get_output ( thrust_command_t thrust) const [virtual]

Returns the output command.

Parameters:
commandoutput command
Returns:
success

Implements Controller_1_to_2< velocity_command_t, attitude_command_t, thrust_command_t >.

Gives acces to internal pid_controller.

Returns:
pid reference to pid controller
bool Velocity_controller::set_command ( const velocity_command_t vel) [virtual]

Sets the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller_1_to_2< velocity_command_t, attitude_command_t, thrust_command_t >.

bool Velocity_controller::update ( void  ) [virtual]

Main update function.

Returns:
success

Implements Controller_1_to_2< velocity_command_t, attitude_command_t, thrust_command_t >.

Here is the call graph for this function:


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