-
Notifications
You must be signed in to change notification settings - Fork 0
/
EwynSkidSteerDrive.h
58 lines (43 loc) · 1.17 KB
/
EwynSkidSteerDrive.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __EWYN_SKIDD_STEER_DRIVE_H
#define __EWYN_SKIDD_STEER_DRIVE_H
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <ros/callback_queue.h>
#include <ros/advertise_options.h>
#include <nav_msgs/Odometry.h>
#include <tf/transform_broadcaster.h>
#include <tf/transform_listener.h>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
using namespace std;
class EwynSkidSteerDrive {
public:
EwynSkidSteerDrive();
~EwynSkidSteerDrive();
private:
void publishOdometry();
void getWheelVelocities();
string leftFrontJointName_;
string rightFrontJointName_;
string leftRearJointName_;
string rightRearJointName_;
string commandTopic_;
string odometryTopic_;
string odometryFrame_;
string robotBaseFrame_;
double wheelSeparation_;
double wheelDiameter_;
double wheelSpeed_[4];
double updateRate_;
double updatePeriod_;
ros::NodeHandle *rosNode_;
ros::Publisher odometryPublisher_;
ros::Subscriber cmdVelSubscriber_;
tf::TransformBroadcaster *transformBroadcaster_;
nav_mssgs::Odometry odom_;
ros::CallbackQueue queue_;
boost::thread calllbackQueueThread_;
void QueueThread();
void cmdVelCallback(const geometry_msgs::Twist::ConstPtr& cmd_msg);
};
#endif