PX4 Teleop
|
Node for controlling px4 based drone by command. More...
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <csignal>
#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 <mavros_msgs/CommandHome.h>
#include <px4_teleop_cmds.hpp>
Go to the source code of this file.
Functions | |
void | state_cb (const mavros_msgs::State::ConstPtr &msg) |
Callback function for state subscriber. More... | |
void | curr_gpos_cb (const sensor_msgs::NavSatFix::ConstPtr &msg) |
Callback function for global position subscriber. More... | |
void | local_pos_cb (const geometry_msgs::PoseStamped::ConstPtr &msg) |
Callback function for local position subscriber. More... | |
void | printUsage () |
Prints a list of available commands. More... | |
void | interrupt_handler (int sig) |
Handles interrupt signal from kyeboard. More... | |
int | main (int argc, char **argv) |
Variables | |
void(* | old )(int) |
Pointer to old handler function. More... | |
mavros_msgs::State | current_state |
Storage for vehicle state. More... | |
sensor_msgs::NavSatFix | curr_gpos |
Storage for current global position. More... | |
geometry_msgs::PoseStamped | local_pos |
Storage for local position. More... | |
Node for controlling px4 based drone by command.
Definition in file px4_teleop_com.cpp.
void curr_gpos_cb | ( | const sensor_msgs::NavSatFix::ConstPtr & | msg | ) |
Callback function for global position subscriber.
msg | Incoming message |
Definition at line 60 of file px4_teleop_com.cpp.
void interrupt_handler | ( | int | sig | ) |
Handles interrupt signal from kyeboard.
sig | Input signal |
Definition at line 93 of file px4_teleop_com.cpp.
void local_pos_cb | ( | const geometry_msgs::PoseStamped::ConstPtr & | msg | ) |
Callback function for local position subscriber.
msg | Incoming message |
Definition at line 71 of file px4_teleop_com.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 98 of file px4_teleop_com.cpp.
void printUsage | ( | ) |
Prints a list of available commands.
Definition at line 78 of file px4_teleop_com.cpp.
void state_cb | ( | const mavros_msgs::State::ConstPtr & | msg | ) |
Callback function for state subscriber.
msg | Incoming message |
Definition at line 48 of file px4_teleop_com.cpp.
sensor_msgs::NavSatFix curr_gpos |
Storage for current global position.
Definition at line 54 of file px4_teleop_com.cpp.
mavros_msgs::State current_state |
Storage for vehicle state.
Definition at line 42 of file px4_teleop_com.cpp.
geometry_msgs::PoseStamped local_pos |
Storage for local position.
Definition at line 66 of file px4_teleop_com.cpp.
void(* old) (int) |
Pointer to old handler function.
Definition at line 38 of file px4_teleop_com.cpp.