saved work

This commit is contained in:
Ruixiang Du
2020-03-26 19:06:34 +08:00
parent 38510eb257
commit dbf04d03d8
10 changed files with 151 additions and 57 deletions

View File

@@ -10,17 +10,39 @@
#ifndef SCOUT_SKID_STEER_HPP
#define SCOUT_SKID_STEER_HPP
#include <string>
#include <geometry_msgs/Twist.h>
#include <ros/ros.h>
#include <string>
namespace wescore {
class ScoutSkidSteer {
public:
ScoutSkidSteer(std::string robot_name);
ScoutSkidSteer(ros::NodeHandle *nh, std::string robot_name = "");
void SetupSubscription();
private:
std::string robot_name;
std::string robot_name_;
std::string motor_fr_topic_;
std::string motor_fl_topic_;
std::string motor_rl_topic_;
std::string motor_rr_topic_;
std::string cmd_topic_;
const double SCOUT_WHEELBASE = 0.498;
const double SCOUT_WHEEL_RADIUS = 0.16459;
ros::NodeHandle *nh_;
ros::Publisher motor_fr_pub_;
ros::Publisher motor_fl_pub_;
ros::Publisher motor_rl_pub_;
ros::Publisher motor_rr_pub_;
ros::Subscriber cmd_sub_;
void TwistCmdCallback(const geometry_msgs::Twist::ConstPtr &msg);
};
} // namespace wescore