31 #ifndef MOTORHARDWARE_H 32 #define MOTORHARDWARE_H 38 #include "sensor_msgs/JointState.h" 40 #include "std_msgs/Int32.h" 41 #include "std_msgs/UInt32.h" 42 #include "std_msgs/Bool.h" 43 #include "sensor_msgs/BatteryState.h" 51 #include <gtest/gtest_prod.h> 103 void clearCommands();
106 void writeSpeedsInRadians(
double left_radians,
double right_radians);
107 void requestFirmwareVersion();
108 void requestFirmwareDate();
111 void setDeadmanTimer(int32_t deadman);
112 void setDeadzoneEnable(int32_t deadzone_enable);
113 void setDebugLeds(
bool led1,
bool led2);
114 void setHardwareVersion(int32_t hardware_version);
115 void setEstopPidThreshold(int32_t estop_pid_threshold);
116 void setEstopDetection(int32_t estop_detection);
117 bool getEstopState(
void);
118 void setMaxFwdSpeed(int32_t max_speed_fwd);
119 void setMaxRevSpeed(int32_t max_speed_rev);
120 void setMaxPwm(int32_t max_pwm);
133 void _addOdometryRequest(std::vector<MotorMessage>& commands)
const;
134 void _addVelocityRequest(std::vector<MotorMessage>& commands)
const;
136 int16_t calculateSpeedFromRadians(
double radians)
const;
137 double calculateRadiansFromTicks(int16_t ticks)
const;
159 Joint() : position(0), velocity(0), effort(0), velocity_command(0) {}
bool right_integral_limit
void limit_status(diagnostic_updater::DiagnosticStatusWrapper &stat)
bool left_max_speed_limit
MotorDiagnostics motor_diag_
ros::Publisher battery_state
void battery_status(diagnostic_updater::DiagnosticStatusWrapper &stat)
hardware_interface::JointStateInterface joint_state_interface_
bool estop_motor_power_off
bool estop_motor_power_off
ros::Publisher rightError
ros::Publisher motor_power_active
void firmware_status(diagnostic_updater::DiagnosticStatusWrapper &stat)
bool right_max_speed_limit
static FirmwareParams firmware_params
void motor_power_status(diagnostic_updater::DiagnosticStatusWrapper &stat)
static CommsParams serial_params
hardware_interface::VelocityJointInterface velocity_joint_interface_
bool param_limit_in_firmware
diagnostic_updater::FrequencyStatus odom_update_status
void firmware_date_status(diagnostic_updater::DiagnosticStatusWrapper &stat)
MotorSerial * motor_serial_
void firmware_options_status(diagnostic_updater::DiagnosticStatusWrapper &stat)
diagnostic_updater::Updater diag_updater
FirmwareParams prev_fw_params