Texas Aerial Robotics Documentation
mission7FlightCode.cpp File Reference
#include <iostream>
#include <ros/ros.h>
#include <geometry_msgs/PoseStamped.h>
#include <nav_msgs/Odometry.h>
#include "std_msgs/Float64.h"
#include "std_msgs/String.h"
#include <mavros_msgs/CommandBool.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/State.h>
#include <mavros_msgs/PositionTarget.h>
#include <unistd.h>
#include <geometry_msgs/Pose2D.h>
#include <mavros_msgs/CommandTOL.h>
#include <sensor_msgs/LaserScan.h>
#include <time.h>
#include <cmath>
#include <math.h>
#include <ros/duration.h>

Go to the source code of this file.

Functions

void state_cb (const mavros_msgs::State::ConstPtr &msg)
 
void pose_cb (const nav_msgs::Odometry::ConstPtr &msg)
 
void mode_cb (const std_msgs::String::ConstPtr &msg)
 
void scan_cb (const sensor_msgs::LaserScan::ConstPtr &msg)
 
void setHeading (float heading)
 
void setHeading_cb (const std_msgs::Float64::ConstPtr &msg)
 
void setDestination (float x, float y, float z)
 
void init_ros ()
 
void waypoint_update (const geometry_msgs::PoseStamped::ConstPtr &msg)
 
int main (int argc, char **argv)
 

Variables

mavros_msgs::State current_state
 
nav_msgs::Odometry current_pose
 
geometry_msgs::PoseStamped waypoint
 
sensor_msgs::LaserScan current_2D_scan
 
std_msgs::String MODE
 
float GYM_OFFSET
 
float x_min
 
float x_max
 
float y_min
 
float y_max
 
float z_min
 
float z_max
 
float current_heading
 
double RUN_START_TIME = 0
 
bool currentlyAvoiding = false
 
bool lidarPresent = true
 

Function Documentation

◆ init_ros()

void init_ros ( )

Definition at line 114 of file mission7FlightCode.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 153 of file mission7FlightCode.cpp.

◆ mode_cb()

void mode_cb ( const std_msgs::String::ConstPtr &  msg)

Definition at line 59 of file mission7FlightCode.cpp.

◆ pose_cb()

void pose_cb ( const nav_msgs::Odometry::ConstPtr &  msg)

Definition at line 47 of file mission7FlightCode.cpp.

◆ scan_cb()

void scan_cb ( const sensor_msgs::LaserScan::ConstPtr &  msg)

Definition at line 64 of file mission7FlightCode.cpp.

◆ setDestination()

void setDestination ( float  x,
float  y,
float  z 
)

Definition at line 100 of file mission7FlightCode.cpp.

◆ setHeading()

void setHeading ( float  heading)

Definition at line 69 of file mission7FlightCode.cpp.

◆ setHeading_cb()

void setHeading_cb ( const std_msgs::Float64::ConstPtr &  msg)

Definition at line 93 of file mission7FlightCode.cpp.

◆ state_cb()

void state_cb ( const mavros_msgs::State::ConstPtr &  msg)

Definition at line 42 of file mission7FlightCode.cpp.

◆ waypoint_update()

void waypoint_update ( const geometry_msgs::PoseStamped::ConstPtr &  msg)

Definition at line 125 of file mission7FlightCode.cpp.

Variable Documentation

◆ current_2D_scan

sensor_msgs::LaserScan current_2D_scan

Definition at line 26 of file mission7FlightCode.cpp.

◆ current_heading

float current_heading

Definition at line 36 of file mission7FlightCode.cpp.

◆ current_pose

nav_msgs::Odometry current_pose

Definition at line 24 of file mission7FlightCode.cpp.

◆ current_state

mavros_msgs::State current_state

Definition at line 23 of file mission7FlightCode.cpp.

◆ currentlyAvoiding

bool currentlyAvoiding = false

Definition at line 38 of file mission7FlightCode.cpp.

◆ GYM_OFFSET

float GYM_OFFSET

Definition at line 29 of file mission7FlightCode.cpp.

◆ lidarPresent

bool lidarPresent = true

Definition at line 39 of file mission7FlightCode.cpp.

◆ MODE

std_msgs::String MODE

Definition at line 28 of file mission7FlightCode.cpp.

◆ RUN_START_TIME

double RUN_START_TIME = 0

Definition at line 37 of file mission7FlightCode.cpp.

◆ waypoint

geometry_msgs::PoseStamped waypoint

Definition at line 25 of file mission7FlightCode.cpp.

◆ x_max

float x_max

Definition at line 31 of file mission7FlightCode.cpp.

◆ x_min

float x_min

Definition at line 30 of file mission7FlightCode.cpp.

◆ y_max

float y_max

Definition at line 33 of file mission7FlightCode.cpp.

◆ y_min

float y_min

Definition at line 32 of file mission7FlightCode.cpp.

◆ z_max

float z_max

Definition at line 35 of file mission7FlightCode.cpp.

◆ z_min

float z_min

Definition at line 34 of file mission7FlightCode.cpp.