19 #ifndef TURTLEBOT3_DRIVE_H_ 20 #define TURTLEBOT3_DRIVE_H_ 28 #include <std_msgs/String.h> 29 #include <sensor_msgs/JointState.h> 30 #include <sensor_msgs/LaserScan.h> 31 #include <geometry_msgs/Twist.h> 33 #include <nav_msgs/Odometry.h> 35 #define DEG2RAD (M_PI / 180.0) 36 #define RAD2DEG (180.0 / M_PI) 42 #define LINEAR_VELOCITY 0.3 43 #define ANGULAR_VELOCITY 1.5 45 #define GET_TB3_DIRECTION 0 46 #define TB3_DRIVE_FORWARD 1 47 #define TB3_RIGHT_TURN 2 48 #define TB3_LEFT_TURN 3 90 #endif // TURTLEBOT3_DRIVE_H_
void laserScanMsgCallBack(const sensor_msgs::LaserScan::ConstPtr &msg)
double right_joint_encoder_
void jointStateMsgCallBack(const sensor_msgs::JointState::ConstPtr &msg)
double front_distance_limit_
double direction_vector_[3]
ros::Publisher cmd_vel_pub_
double side_distance_limit_
ros::Subscriber joint_state_sub_
void updatecommandVelocity(double linear, double angular)
double priv_right_joint_encoder_
ros::Subscriber laser_scan_sub_