An example UAV hardware that emulates actual UAV hardware.
More...
#include <sample_parser.h>
An example UAV hardware that emulates actual UAV hardware.
| SampleParser::SampleParser |
( |
| ) |
|
|
inline |
| virtual SampleParser::~SampleParser |
( |
| ) |
|
|
inlinevirtual |
| virtual bool SampleParser::calibrateimubias |
( |
| ) |
|
|
inlinevirtual |
Recalibrate IMU.
- Returns
- true if calibration successful
| virtual bool SampleParser::cmdrpythrust |
( |
geometry_msgs::Quaternion & |
rpytmsg, |
|
|
bool |
sendyaw = false |
|
) |
| |
|
inlinevirtual |
Command the euler angles of the quad and the thrust.
- Parameters
-
| rpytmsg | Msg format is (x,y,z,w) -> (roll, pitch, yaw, thrust). The thrust value will be adjusted based on whethere there is thrust bias or not. |
| sendyaw | True to control the yaw/ False to ignore yaw command |
- Returns
- True if sending command is successful
| virtual bool SampleParser::cmdvelguided |
( |
geometry_msgs::Vector3 & |
vel_cmd, |
|
|
double & |
yaw_ang |
|
) |
| |
|
inlinevirtual |
Command velocity and yaw to UAV.
- Parameters
-
| vel_cmd | Velocity vector (m/s) |
| yaw_ang | Yaw angle (rad) |
- Returns
- True if sending command is successful
| virtual bool SampleParser::cmdwaypoint |
( |
geometry_msgs::Vector3 & |
desired_pos, |
|
|
double |
desired_yaw = 0 |
|
) |
| |
|
inlinevirtual |
Command position yaw for UAV.
- Parameters
-
| desired_pos | Desired 3D position (m) |
| desired_yaw | Desired yaw angle (rad) |
- Returns
- True if sending command is successful
| virtual void SampleParser::controllog |
( |
bool |
logswitch | ) |
|
|
inlinevirtual |
Toggle logging.
- Parameters
-
| logswitch | True to start logging/False to stop logging |
| virtual bool SampleParser::disarm |
( |
| ) |
|
|
inlinevirtual |
Turn off motor.
- Returns
- True if disabling is successful
| virtual bool SampleParser::flowControl |
( |
bool |
| ) |
|
|
inlinevirtual |
Toggle software control.
- Returns
- True if successful
| virtual void SampleParser::getquaddata |
( |
parsernode::common::quaddata & |
d1 | ) |
|
|
inlinevirtual |
Get the sensor data and UAV state.
- Parameters
-
| d1 | Data struct in which data is filled |
| virtual void SampleParser::grip |
( |
int |
state | ) |
|
|
inlinevirtual |
Toggle gripper.
- Parameters
-
| state | 0 to close, 1 to open |
| virtual void SampleParser::initialize |
( |
ros::NodeHandle & |
nh_ | ) |
|
|
inlinevirtual |
Initialize the Hardware with a ros node handle to setup communications.
- Parameters
-
| nh_ | Nodehandle to setup communications |
| virtual bool SampleParser::land |
( |
| ) |
|
|
inlinevirtual |
Land.
- Returns
- True if landing successful
| virtual void SampleParser::reset_attitude |
( |
double |
roll, |
|
|
double |
pitch, |
|
|
double |
yaw |
|
) |
| |
|
inlinevirtual |
Set the attitude data to specified roll, pitch, yaw (rad)
- Parameters
-
| roll | Roll angle (rad) |
| pitch | Pitch angle (rad) |
| yaw | Yaw angle (rad) |
| virtual void SampleParser::setaltitude |
( |
double |
altitude_ | ) |
|
|
inlinevirtual |
set the altitude or local z height data(m)
- Parameters
-
| virtual void SampleParser::setBatteryPercent |
( |
double |
percent | ) |
|
|
inlinevirtual |
Set the battery percent sensor data.
- Parameters
-
| virtual void SampleParser::setlogdir |
( |
string |
logdir | ) |
|
|
inlinevirtual |
Create log directory and create log files.
- Parameters
-
| logdir | the directory where to create log files |
| virtual void SampleParser::setmode |
( |
std::string |
mode | ) |
|
|
inlinevirtual |
Set UAV controller mode such position controlling, rpyt etc.
- Parameters
-
| mode | This version does not support any modes |
| void SampleParser::setRC |
( |
int16_t |
channels[4] | ) |
|
|
inline |
set the rc channel information stored in the UAV brain
- Parameters
-
| channels | rc channel values (-10000, 10000) |
| virtual bool SampleParser::takeoff |
( |
| ) |
|
|
inlinevirtual |
Takeoff.
- Returns
- True if successful
The documentation for this class was generated from the following file: