husky_hardware.h
Go to the documentation of this file.
1 
32 #ifndef HUSKY_BASE_HUSKY_HARDWARE_H
33 #define HUSKY_BASE_HUSKY_HARDWARE_H
34 
40 #include "ros/ros.h"
41 #include "sensor_msgs/JointState.h"
42 #include "husky_msgs/HuskyStatus.h"
43 #include <string>
44 
45 namespace husky_base
46 {
47 
51  class HuskyHardware :
53  {
54  public:
55  HuskyHardware(ros::NodeHandle nh, ros::NodeHandle private_nh, double target_control_freq);
56 
58 
60 
61  void updateDiagnostics();
62 
63  void reportLoopDuration(const ros::Duration &duration);
64 
65  private:
66 
67  void initializeDiagnostics();
68 
69  void resetTravelOffset();
70 
72 
73  double linearToAngular(const double &travel) const;
74 
75  double angularToLinear(const double &angle) const;
76 
77  void limitDifferentialSpeed(double &travel_speed_left, double &travel_speed_right);
78 
80 
81  // ROS Control interfaces
84 
85  // Diagnostics
87  husky_msgs::HuskyStatus husky_status_msg_;
93 
94  // ROS Parameters
96 
98 
102  struct Joint
103  {
104  double position;
106  double velocity;
107  double effort;
109 
110  Joint() :
111  position(0), velocity(0), effort(0), velocity_command(0)
112  { }
113  } joints_[4];
114  };
115 
116 } // namespace husky_base
117 #endif // HUSKY_BASE_HUSKY_HARDWARE_H
ros::Publisher diagnostic_publisher_
HuskySoftwareDiagnosticTask software_status_task_
HuskyHardwareDiagnosticTask< clearpath::DataSafetySystemStatus > safety_status_task_
husky_msgs::HuskyStatus husky_status_msg_
void reportLoopDuration(const ros::Duration &duration)
struct husky_base::HuskyHardware::Joint joints_[4]
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
hardware_interface::JointStateInterface joint_state_interface_
diagnostic_updater::Updater diagnostic_updater_
ros::NodeHandle private_nh_
HuskyHardwareDiagnosticTask< clearpath::DataSystemStatus > system_status_task_
double linearToAngular(const double &travel) const
hardware_interface::VelocityJointInterface velocity_joint_interface_
double angularToLinear(const double &angle) const
HuskyHardware(ros::NodeHandle nh, ros::NodeHandle private_nh, double target_control_freq)
void limitDifferentialSpeed(double &travel_speed_left, double &travel_speed_right)
HuskyHardwareDiagnosticTask< clearpath::DataPowerSystem > power_status_task_


husky_base
Author(s): Mike Purvis , Paul Bovbel
autogenerated on Fri Oct 2 2020 03:40:07