Public Member Functions | Private Member Functions | Private Attributes
BasicController Class Reference

A basic position controller. More...

#include <controller.h>

List of all members.

Public Member Functions

 BasicController ()
 Service method.
void controlLoop ()
void init ()
bool startControl (std_srvs::Empty::Request &, std_srvs::Empty::Response &)
 Service method: (set hover mode and) take off and start the controller.
bool stopControl (std_srvs::Empty::Request &, std_srvs::Empty::Response &)
 Service method: stop the controller and land (and set hover mode)
 ~BasicController ()
 Destructor.

Private Member Functions

void poseCb (const ucl_drone::Pose3D::ConstPtr posePtr)
 Callback when pose is received.
void poseRefCb (const ucl_drone::PoseRef::ConstPtr poseRefPtr)
 Callback when new pose ref is received.
void reguAltitude (double *zvel_cmd, double alt_mes, double alt_desired, double regu_new_time_z)
void reguXY (double *xvel_cmd, double *yvel_cmd, double x_mes, double y_mes, double x_desired, double y_desired, double yaw, double regu_new_time_xy)
void reguYaw (double *yawvel_cmd, double yaw_mes, double yaw_desired, double regu_new_time)
void sendVelToDrone (double pitch, double roll, double yaw_vel, double zvel_cmd, bool force=false)

Private Attributes

double alt_desired_old
float alt_ref
 Reference.
double anti_windup_yaw
std::string control_channel
double dist_old
double integral_alt_error
double integral_f_error
double integral_l_error
double integral_xy_error
double integral_yaw_error
bool isControlling
 is true if the controller is running
double Kd_alt
double Kd_plan
double Kd_yaw
double Ki_alt
double Ki_plan
double Ki_yaw
double Kp_alt
double Kp_plan
double Kp_yaw
std::string land_channel
ros::Publisher land_pub
double last_vel_x_command
double last_vel_y_command
double last_vel_yaw_command
double last_vel_z_command
ucl_drone::Pose3D lastPoseReceived
 Measure.
ucl_drone::PoseRef lastPoseRefReceived
 Pose desired.
ros::NodeHandle nh
double old_delta_alt
double old_delta_yaw
double old_yaw_desired
double p_term_f_old
double p_term_l_old
std::string pose_channel
ros::Subscriber pose_sub
std::string poseref_channel
ros::Subscriber poseref_sub
double regu_old_time_xy
double regu_old_time_yaw
double regu_old_time_z
std::string reset_channel
ros::Publisher reset_pub
ros::ServiceServer startControl_
 Service to set a new Pose.
ros::ServiceServer stopControl_
 Service to stop regulation and land.
std::string takeoff_channel
ros::Publisher takeoff_pub
std::string toggleState_channel
ros::Publisher toggleState_pub
ros::Publisher vel_pub
double x_desired_old
double x_ref
double y_desired_old
double y_ref
double yaw_desired_old
double yaw_ref

Detailed Description

A basic position controller.

Definition at line 39 of file controller.h.


Constructor & Destructor Documentation

Service method.

Contructor.

Definition at line 20 of file controller.cpp.

Destructor.

Definition at line 116 of file controller.cpp.


Member Function Documentation

Definition at line 373 of file controller.cpp.

void BasicController::poseCb ( const ucl_drone::Pose3D::ConstPtr  posePtr) [private]

Callback when pose is received.

Definition at line 359 of file controller.cpp.

void BasicController::poseRefCb ( const ucl_drone::PoseRef::ConstPtr  poseRefPtr) [private]

Callback when new pose ref is received.

Definition at line 366 of file controller.cpp.

void BasicController::reguAltitude ( double *  zvel_cmd,
double  alt_mes,
double  alt_desired,
double  regu_new_time_z 
) [private]

Definition at line 216 of file controller.cpp.

void BasicController::reguXY ( double *  xvel_cmd,
double *  yvel_cmd,
double  x_mes,
double  y_mes,
double  x_desired,
double  y_desired,
double  yaw,
double  regu_new_time_xy 
) [private]

Definition at line 153 of file controller.cpp.

void BasicController::reguYaw ( double *  yawvel_cmd,
double  yaw_mes,
double  yaw_desired,
double  regu_new_time 
) [private]

Definition at line 271 of file controller.cpp.

void BasicController::sendVelToDrone ( double  pitch,
double  roll,
double  yaw_vel,
double  zvel_cmd,
bool  force = false 
) [private]

Definition at line 337 of file controller.cpp.

bool BasicController::startControl ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)

Service method: (set hover mode and) take off and start the controller.

Definition at line 122 of file controller.cpp.

bool BasicController::stopControl ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)

Service method: stop the controller and land (and set hover mode)

Definition at line 139 of file controller.cpp.


Member Data Documentation

Definition at line 95 of file controller.h.

float BasicController::alt_ref [private]

Reference.

Definition at line 64 of file controller.h.

Definition at line 85 of file controller.h.

std::string BasicController::control_channel [private]

Definition at line 54 of file controller.h.

double BasicController::dist_old [private]

Definition at line 92 of file controller.h.

Definition at line 80 of file controller.h.

Definition at line 83 of file controller.h.

Definition at line 84 of file controller.h.

Definition at line 82 of file controller.h.

Definition at line 81 of file controller.h.

is true if the controller is running

Definition at line 61 of file controller.h.

double BasicController::Kd_alt [private]

Definition at line 71 of file controller.h.

double BasicController::Kd_plan [private]

Definition at line 76 of file controller.h.

double BasicController::Kd_yaw [private]

Definition at line 79 of file controller.h.

double BasicController::Ki_alt [private]

Definition at line 70 of file controller.h.

double BasicController::Ki_plan [private]

Definition at line 74 of file controller.h.

double BasicController::Ki_yaw [private]

Definition at line 78 of file controller.h.

double BasicController::Kp_alt [private]

Definition at line 69 of file controller.h.

double BasicController::Kp_plan [private]

Definition at line 73 of file controller.h.

double BasicController::Kp_yaw [private]

Definition at line 72 of file controller.h.

std::string BasicController::land_channel [private]

Definition at line 56 of file controller.h.

Definition at line 46 of file controller.h.

Definition at line 101 of file controller.h.

Definition at line 102 of file controller.h.

Definition at line 100 of file controller.h.

Definition at line 99 of file controller.h.

ucl_drone::Pose3D BasicController::lastPoseReceived [private]

Measure.

Definition at line 106 of file controller.h.

ucl_drone::PoseRef BasicController::lastPoseRefReceived [private]

Pose desired.

Definition at line 109 of file controller.h.

Definition at line 42 of file controller.h.

Definition at line 90 of file controller.h.

Definition at line 91 of file controller.h.

Definition at line 103 of file controller.h.

Definition at line 93 of file controller.h.

Definition at line 94 of file controller.h.

std::string BasicController::pose_channel [private]

Definition at line 52 of file controller.h.

Definition at line 44 of file controller.h.

std::string BasicController::poseref_channel [private]

Definition at line 53 of file controller.h.

Definition at line 45 of file controller.h.

Definition at line 89 of file controller.h.

Definition at line 88 of file controller.h.

Definition at line 87 of file controller.h.

std::string BasicController::reset_channel [private]

Definition at line 58 of file controller.h.

Definition at line 50 of file controller.h.

Service to set a new Pose.

Service to takeoff and start regulation

Definition at line 115 of file controller.h.

Service to stop regulation and land.

Definition at line 118 of file controller.h.

std::string BasicController::takeoff_channel [private]

Definition at line 55 of file controller.h.

Definition at line 47 of file controller.h.

std::string BasicController::toggleState_channel [private]

Definition at line 57 of file controller.h.

Definition at line 49 of file controller.h.

Definition at line 48 of file controller.h.

Definition at line 97 of file controller.h.

double BasicController::x_ref [private]

Definition at line 65 of file controller.h.

Definition at line 98 of file controller.h.

double BasicController::y_ref [private]

Definition at line 66 of file controller.h.

Definition at line 96 of file controller.h.

double BasicController::yaw_ref [private]

Definition at line 67 of file controller.h.


The documentation for this class was generated from the following files:


ucl_drone
Author(s): dronesinma
autogenerated on Sat Jun 8 2019 20:51:53