#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.
|
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) |
|
◆ init_ros()
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ mode_cb()
void mode_cb |
( |
const std_msgs::String::ConstPtr & |
msg | ) |
|
◆ pose_cb()
void pose_cb |
( |
const nav_msgs::Odometry::ConstPtr & |
msg | ) |
|
◆ scan_cb()
void scan_cb |
( |
const sensor_msgs::LaserScan::ConstPtr & |
msg | ) |
|
◆ setDestination()
void setDestination |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
◆ setHeading()
void setHeading |
( |
float |
heading | ) |
|
◆ setHeading_cb()
void setHeading_cb |
( |
const std_msgs::Float64::ConstPtr & |
msg | ) |
|
◆ state_cb()
void state_cb |
( |
const mavros_msgs::State::ConstPtr & |
msg | ) |
|
◆ waypoint_update()
void waypoint_update |
( |
const geometry_msgs::PoseStamped::ConstPtr & |
msg | ) |
|
◆ current_2D_scan
sensor_msgs::LaserScan current_2D_scan |
◆ current_heading
◆ current_pose
nav_msgs::Odometry current_pose |
◆ current_state
mavros_msgs::State current_state |
◆ currentlyAvoiding
bool currentlyAvoiding = false |
◆ GYM_OFFSET
◆ lidarPresent
◆ MODE
◆ RUN_START_TIME
double RUN_START_TIME = 0 |
◆ waypoint
geometry_msgs::PoseStamped waypoint |
◆ x_max
◆ x_min
◆ y_max
◆ y_min
◆ z_max
◆ z_min