PX4 Teleop
Functions
px4_teleop_cmds.hpp File Reference

Command functions for px4_teleop package. More...

#include <ros/ros.h>
#include <geometry_msgs/TwistStamped.h>
#include <geometry_msgs/PoseStamped.h>
#include <sensor_msgs/NavSatFix.h>
#include <mavros_msgs/CommandBool.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/State.h>
#include <mavros_msgs/CommandTOL.h>
Include dependency graph for px4_teleop_cmds.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void arm (ros::ServiceClient &client, mavros_msgs::State &state)
 Arm vehicle. More...
 
void takeoff (ros::ServiceClient &client, mavros_msgs::State &state, geometry_msgs::PoseStamped &lpos, sensor_msgs::NavSatFix &hp, double height)
 Take off vehicle. More...
 
void land (ros::ServiceClient &client, geometry_msgs::PoseStamped &lpos, sensor_msgs::NavSatFix &gpos, sensor_msgs::NavSatFix &hp)
 Land vehicle. More...
 
void disarm (ros::ServiceClient &client)
 Disarm vehicle. More...
 
void cmd_vel (ros::Publisher &pub, ros::ServiceClient &client, mavros_msgs::State &state, double dt, double vx, double vy, double vz, double ang_z)
 Send velocity command to vehicle. More...
 

Detailed Description

Command functions for px4_teleop package.

Author
Takaki Ueno

Definition in file px4_teleop_cmds.hpp.

Function Documentation

void arm ( ros::ServiceClient &  client,
mavros_msgs::State &  state 
)

Arm vehicle.

Parameters
clientService client for arm
stateState of vehicle

Definition at line 32 of file px4_teleop_cmds.hpp.

void cmd_vel ( ros::Publisher &  pub,
ros::ServiceClient &  client,
mavros_msgs::State &  state,
double  dt,
double  vx,
double  vy,
double  vz,
double  ang_z 
)

Send velocity command to vehicle.

Parameters
pubVelocity command publisher
clientService client for mode setting
stateCurrent state of vehicle
dtDuration
vxLinear velocity along x axis
vyLinear velocity along y axis
vzLinear velocity along z axis
ang_zAngular velocity around z axis

Definition at line 183 of file px4_teleop_cmds.hpp.

void disarm ( ros::ServiceClient &  client)

Disarm vehicle.

Parameters
clientService client for disarm

Definition at line 160 of file px4_teleop_cmds.hpp.

void land ( ros::ServiceClient &  client,
geometry_msgs::PoseStamped &  lpos,
sensor_msgs::NavSatFix &  gpos,
sensor_msgs::NavSatFix &  hp 
)

Land vehicle.

Parameters
clientService client for landing
lposCurrent local position
gposGlobal position at the time of landing
hpHome position

Definition at line 124 of file px4_teleop_cmds.hpp.

void takeoff ( ros::ServiceClient &  client,
mavros_msgs::State &  state,
geometry_msgs::PoseStamped &  lpos,
sensor_msgs::NavSatFix &  hp,
double  height 
)

Take off vehicle.

Parameters
clientService client for takeoff
stateState of vehicle
lposCurrent local position
hpHome position
heightTakeoff height

Definition at line 62 of file px4_teleop_cmds.hpp.