Classes | Public Member Functions | Private Member Functions | Private Attributes
husky_base::HuskyHardware Class Reference

#include <husky_hardware.h>

Inheritance diagram for husky_base::HuskyHardware:
Inheritance graph
[legend]

List of all members.

Classes

struct  Joint

Public Member Functions

 HuskyHardware (ros::NodeHandle nh, ros::NodeHandle private_nh, double target_control_freq)
void reportLoopDuration (const ros::Duration &duration)
void updateDiagnostics ()
void updateJointsFromHardware ()
void writeCommandsToHardware ()

Private Member Functions

double angularToLinear (const double &angle) const
void initializeDiagnostics ()
void limitDifferentialSpeed (double &travel_speed_left, double &travel_speed_right)
double linearToAngular (const double &travel) const
void registerControlInterfaces ()
void resetTravelOffset ()

Private Attributes

ros::Publisher diagnostic_publisher_
diagnostic_updater::Updater diagnostic_updater_
husky_msgs::HuskyStatus husky_status_msg_
hardware_interface::JointStateInterface joint_state_interface_
struct
husky_base::HuskyHardware::Joint 
joints_ [4]
double max_accel_
double max_speed_
ros::NodeHandle nh_
double polling_timeout_
HuskyHardwareDiagnosticTask
< clearpath::DataPowerSystem
power_status_task_
ros::NodeHandle private_nh_
HuskyHardwareDiagnosticTask
< clearpath::DataSafetySystemStatus
safety_status_task_
HuskySoftwareDiagnosticTask software_status_task_
HuskyHardwareDiagnosticTask
< clearpath::DataSystemStatus
system_status_task_
hardware_interface::VelocityJointInterface velocity_joint_interface_
double wheel_diameter_

Detailed Description

Class representing Husky hardware, allows for ros_control to modify internal state via joint interfaces

Definition at line 51 of file husky_hardware.h.


Constructor & Destructor Documentation

husky_base::HuskyHardware::HuskyHardware ( ros::NodeHandle  nh,
ros::NodeHandle  private_nh,
double  target_control_freq 
)

Initialize Husky hardware

Definition at line 46 of file husky_hardware.cpp.


Member Function Documentation

double husky_base::HuskyHardware::angularToLinear ( const double &  angle) const [private]

RobotHW provides velocity command in rad/s, Husky needs m/s,

Definition at line 235 of file husky_hardware.cpp.

Register diagnostic tasks with updater class

Definition at line 93 of file husky_hardware.cpp.

void husky_base::HuskyHardware::limitDifferentialSpeed ( double &  diff_speed_left,
double &  diff_speed_right 
) [private]

Scale left and right speed outputs to maintain ros_control's desired trajectory without saturating the outputs

Definition at line 213 of file husky_hardware.cpp.

double husky_base::HuskyHardware::linearToAngular ( const double &  travel) const [private]

Husky reports travel in metres, need radians for ros_control RobotHW

Definition at line 227 of file husky_hardware.cpp.

Register interfaces with the RobotHW interface manager, allowing ros_control operation

Definition at line 112 of file husky_hardware.cpp.

Update diagnostics with control loop timing information

Definition at line 205 of file husky_hardware.cpp.

Get current encoder travel offsets from MCU and bias future encoder readings against them

Definition at line 73 of file husky_hardware.cpp.

External hook to trigger diagnostic update

Definition at line 134 of file husky_hardware.cpp.

Pull latest speed and travel measurements from MCU, and store in joint structure for ros_control

Definition at line 144 of file husky_hardware.cpp.

Get latest velocity commands from ros_control via joint structure, and send to MCU

Definition at line 192 of file husky_hardware.cpp.


Member Data Documentation

Definition at line 86 of file husky_hardware.h.

Definition at line 88 of file husky_hardware.h.

husky_msgs::HuskyStatus husky_base::HuskyHardware::husky_status_msg_ [private]

Definition at line 87 of file husky_hardware.h.

Definition at line 82 of file husky_hardware.h.

Definition at line 95 of file husky_hardware.h.

Definition at line 95 of file husky_hardware.h.

Definition at line 79 of file husky_hardware.h.

Definition at line 97 of file husky_hardware.h.

Definition at line 90 of file husky_hardware.h.

Definition at line 79 of file husky_hardware.h.

Definition at line 91 of file husky_hardware.h.

Definition at line 92 of file husky_hardware.h.

Definition at line 89 of file husky_hardware.h.

Definition at line 83 of file husky_hardware.h.

Definition at line 95 of file husky_hardware.h.


The documentation for this class was generated from the following files:


husky_base
Author(s): Mike Purvis , Paul Bovbel
autogenerated on Sat Jun 8 2019 18:26:01