#include <husky_hardware.h>
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 () |
Public Member Functions inherited from hardware_interface::RobotHW | |
virtual bool | checkForConflict (const std::list< ControllerInfo > &info) const |
virtual bool | checkForConflict (const std::list< ControllerInfo > &info) const |
virtual void | doSwitch (const std::list< ControllerInfo > &, const std::list< ControllerInfo > &) |
virtual void | doSwitch (const std::list< ControllerInfo > &, const std::list< ControllerInfo > &) |
virtual bool | init (ros::NodeHandle &root_nh, ros::NodeHandle &robot_hw_nh) |
virtual bool | prepareSwitch (const std::list< ControllerInfo > &start_list, const std::list< ControllerInfo > &stop_list) |
virtual bool | prepareSwitch (const std::list< ControllerInfo > &start_list, const std::list< ControllerInfo > &stop_list) |
virtual void | read (const ros::Time &time, const ros::Duration &period) |
virtual void | read (const ros::Time &time, const ros::Duration &period) |
RobotHW () | |
virtual void | write (const ros::Time &time, const ros::Duration &period) |
virtual void | write (const ros::Time &time, const ros::Duration &period) |
virtual | ~RobotHW () |
Public Member Functions inherited from hardware_interface::InterfaceManager | |
T * | get () |
std::vector< std::string > | getInterfaceResources (std::string iface_type) const |
std::vector< std::string > | getNames () const |
void | registerInterface (T *iface) |
void | registerInterfaceManager (InterfaceManager *iface_man) |
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 () |
Additional Inherited Members | |
Protected Types inherited from hardware_interface::InterfaceManager | |
typedef std::vector< InterfaceManager * > | InterfaceManagerVector |
typedef std::map< std::string, void * > | InterfaceMap |
typedef std::map< std::string, std::vector< std::string > > | ResourceMap |
typedef std::map< std::string, size_t > | SizeMap |
Protected Attributes inherited from hardware_interface::InterfaceManager | |
boost::ptr_vector< ResourceManagerBase > | interface_destruction_list_ |
InterfaceManagerVector | interface_managers_ |
InterfaceMap | interfaces_ |
InterfaceMap | interfaces_combo_ |
SizeMap | num_ifaces_registered_ |
ResourceMap | resources_ |
Class representing Husky hardware, allows for ros_control to modify internal state via joint interfaces
Definition at line 51 of file husky_hardware.h.
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.
|
private |
RobotHW provides velocity command in rad/s, Husky needs m/s,
Definition at line 235 of file husky_hardware.cpp.
|
private |
Register diagnostic tasks with updater class
Definition at line 93 of file husky_hardware.cpp.
|
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.
|
private |
Husky reports travel in metres, need radians for ros_control RobotHW
Definition at line 227 of file husky_hardware.cpp.
|
private |
Register interfaces with the RobotHW interface manager, allowing ros_control operation
Definition at line 112 of file husky_hardware.cpp.
void husky_base::HuskyHardware::reportLoopDuration | ( | const ros::Duration & | duration | ) |
Update diagnostics with control loop timing information
Definition at line 205 of file husky_hardware.cpp.
|
private |
Get current encoder travel offsets from MCU and bias future encoder readings against them
Definition at line 73 of file husky_hardware.cpp.
void husky_base::HuskyHardware::updateDiagnostics | ( | ) |
External hook to trigger diagnostic update
Definition at line 134 of file husky_hardware.cpp.
void husky_base::HuskyHardware::updateJointsFromHardware | ( | ) |
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.
void husky_base::HuskyHardware::writeCommandsToHardware | ( | ) |
Get latest velocity commands from ros_control via joint structure, and send to MCU
Definition at line 192 of file husky_hardware.cpp.
|
private |
Definition at line 86 of file husky_hardware.h.
|
private |
Definition at line 88 of file husky_hardware.h.
|
private |
Definition at line 87 of file husky_hardware.h.
|
private |
Definition at line 82 of file husky_hardware.h.
|
private |
|
private |
Definition at line 95 of file husky_hardware.h.
|
private |
Definition at line 95 of file husky_hardware.h.
|
private |
Definition at line 79 of file husky_hardware.h.
|
private |
Definition at line 97 of file husky_hardware.h.
|
private |
Definition at line 90 of file husky_hardware.h.
|
private |
Definition at line 79 of file husky_hardware.h.
|
private |
Definition at line 91 of file husky_hardware.h.
|
private |
Definition at line 92 of file husky_hardware.h.
|
private |
Definition at line 89 of file husky_hardware.h.
|
private |
Definition at line 83 of file husky_hardware.h.
|
private |
Definition at line 95 of file husky_hardware.h.