1 #ifndef __CLOBER_SERIAL_H__
2 #define __CLOBER_SERIAL_H__
7 #include <boost/lexical_cast.hpp>
8 #include <boost/algorithm/string.hpp>
15 #include <geometry_msgs/Twist.h>
16 #include <geometry_msgs/TransformStamped.h>
17 #include <nav_msgs/Odometry.h>
18 #include <clober_msgs/Feedback.h>
20 #include <tf2/LinearMath/Quaternion.h>
21 #include <tf2_ros/transform_broadcaster.h>
24 using namespace std::chrono_literals;
29 const string eol(
"\r");
77 void cmd_vel_callback(
const geometry_msgs::Twist::ConstPtr &msg);
79 void updatePose(
double dL,
double dR);
83 void faultFlags(
const uint16_t flags);
86 pair<float,float> toWheelSpeed(
float v,
float w);
87 void toVW(
float l_speed,
float r_speed);
89 float limitMaxSpeed(
float speed);
91 void read_serial(
int ms);
95 void publishFeedback();
96 void publish_loop(
int hz);
98 void sendRPM(pair<int,int> channel, pair<float,float> rpm);
99 void sendStop(pair<int,int> channel);
101 void sendHeardBeat();
102 void restartScript();
153 #endif //__CLOBER_SERIAL_H__