Defines | Functions | Variables
free_space_navigation.cpp File Reference
#include "ros/ros.h"
#include "geometry_msgs/Twist.h"
#include "sensor_msgs/LaserScan.h"
#include "nav_msgs/Odometry.h"
#include "tf/tf.h"
#include <tf/transform_listener.h>
#include <fstream>
Include dependency graph for free_space_navigation.cpp:

Go to the source code of this file.

Defines

#define ANGULAR_VELOCITY_MINIMUM_THRESHOLD   0.4
#define LINEAR_VELOCITY_MINIMUM_THRESHOLD   0.2

Functions

double calculateYaw (double x1, double y1, double x2, double y2)
double degree2radian (double degreeAngle)
int main (int argc, char **argv)
void move_v1 (double speed, double distance, bool isForward)
void move_v2 (double speed, double distance, bool isForward)
void move_v3 (double speed, double distance, bool isForward)
void moveSquare (double sideLength)
void poseCallback (const nav_msgs::Odometry::ConstPtr &pose_message)
double radian2degree (double radianAngle)
double rotate (double ang_vel, double angle_radian, bool isClockwise)

Variables

ros::Subscriber pose_subscriber
ros::Subscriber scanSubscriber
nav_msgs::Odometry turtlebot_odom_pose
ros::Publisher velocityPublisher

Define Documentation

Definition at line 35 of file free_space_navigation.cpp.

Definition at line 34 of file free_space_navigation.cpp.


Function Documentation

double calculateYaw ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 438 of file free_space_navigation.cpp.

double degree2radian ( double  degreeAngle)

Definition at line 454 of file free_space_navigation.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 62 of file free_space_navigation.cpp.

void move_v1 ( double  speed,
double  distance,
bool  isForward 
)

a function that makes the robot move straight

Parameters:
speed,:represents the speed of the robot the robot
distance,:represents the distance to move by the robot
isForward,:if true, the robot moves forward,otherwise, it moves backward

Method 1: using tf and Calculate the distance between the two transformations

Definition at line 129 of file free_space_navigation.cpp.

void move_v2 ( double  speed,
double  distance,
bool  isForward 
)

a function that makes the robot move straight

Parameters:
speed,:represents the speed of the robot the robot
distance,:represents the distance to move by the robot
isForward,:if true, the robot moves forward,otherwise, it moves backward

Method 2: using tf and we calculate the relative transform, then we determine its length

Definition at line 228 of file free_space_navigation.cpp.

void move_v3 ( double  speed,
double  distance,
bool  isForward 
)

a function that makes the robot move straight

Parameters:
speed,:represents the speed of the robot the robot
distance,:represents the distance to move by the robot
isForward,:if true, the robot moves forward,otherwise, it moves backward

Method 3: we use coordinates of the robot to estimate the distance

Definition at line 317 of file free_space_navigation.cpp.

void moveSquare ( double  sideLength)

Definition at line 113 of file free_space_navigation.cpp.

void poseCallback ( const nav_msgs::Odometry::ConstPtr &  pose_message)

Definition at line 102 of file free_space_navigation.cpp.

double radian2degree ( double  radianAngle)

Definition at line 448 of file free_space_navigation.cpp.

void rotate ( double  ang_vel,
double  angle_radian,
bool  isClockwise 
)

Definition at line 352 of file free_space_navigation.cpp.


Variable Documentation

Definition at line 41 of file free_space_navigation.cpp.

Definition at line 40 of file free_space_navigation.cpp.

nav_msgs::Odometry turtlebot_odom_pose

Definition at line 43 of file free_space_navigation.cpp.

Definition at line 38 of file free_space_navigation.cpp.



gapter
Author(s):
autogenerated on Thu Jun 6 2019 22:05:13