Public Member Functions | Protected Types | Private Member Functions | Private Attributes | List of all members
xarm_control::XArmHW Class Reference

#include <xarm_hw.h>

Inheritance diagram for xarm_control::XArmHW:
Inheritance graph
[legend]

Public Member Functions

void get_status (int state_mode_err[3])
 
virtual bool init (ros::NodeHandle &root_nh, ros::NodeHandle &robot_hw_nh)
 
bool need_reset ()
 
virtual void read (const ros::Time &time, const ros::Duration &period)
 
virtual void write (const ros::Time &time, const ros::Duration &period)
 
 XArmHW ()
 
 ~XArmHW ()
 
- 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 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)
 
 RobotHW ()
 
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)
 

Protected Types

enum  ControlMethod { POSITION, VELOCITY, EFFORT }
 
- 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
 

Private Member Functions

void _enforce_limits (const ros::Duration &period)
 
void _register_joint_limits (ros::NodeHandle &root_nh, std::string joint_name, const ControlMethod ctrl_method)
 
void _reset_limits (void)
 
void clientInit (const std::string &robot_ip, ros::NodeHandle &root_nh)
 
void pos_fb_cb (const sensor_msgs::JointState::ConstPtr &data)
 
void state_fb_cb (const xarm_msgs::RobotMsg::ConstPtr &data)
 

Private Attributes

ControlMethod ctrl_method_
 
int curr_err
 
int curr_mode
 
int curr_state
 
unsigned int dof_
 
std::vector< double > effort_cmd_
 
std::vector< double > effort_fdb_
 
ros::Subscriber effort_sub_
 
hardware_interface::EffortJointInterface ej_interface_
 
joint_limits_interface::EffortJointSoftLimitsInterface ej_limits_interface_
 
joint_limits_interface::EffortJointSaturationInterface ej_sat_interface_
 
std::string hw_ns_
 
bool initial_write_
 
std::vector< std::string > jnt_names_
 
hardware_interface::JointStateInterface js_interface_
 
urdf::ModelInterfaceSharedPtr model_ptr_
 
std::mutex mutex_
 
hardware_interface::PositionJointInterface pj_interface_
 
joint_limits_interface::PositionJointSoftLimitsInterface pj_limits_interface_
 
joint_limits_interface::PositionJointSaturationInterface pj_sat_interface_
 
ros::Subscriber pos_sub_
 
std::vector< double > position_cmd_
 
std::vector< float > position_cmd_float_
 
std::vector< double > position_fdb_
 
ros::Subscriber state_sub_
 
ros::Subscriber vel_sub_
 
std::vector< double > velocity_cmd_
 
std::vector< float > velocity_cmd_float_
 
std::vector< double > velocity_fdb_
 
hardware_interface::VelocityJointInterface vj_interface_
 
joint_limits_interface::VelocityJointSoftLimitsInterface vj_limits_interface_
 
joint_limits_interface::VelocityJointSaturationInterface vj_sat_interface_
 
xarm_api::XArmROSClient xarm
 

Additional Inherited Members

- Protected Attributes inherited from hardware_interface::InterfaceManager
boost::ptr_vector< ResourceManagerBaseinterface_destruction_list_
 
InterfaceManagerVector interface_managers_
 
InterfaceMap interfaces_
 
InterfaceMap interfaces_combo_
 
SizeMap num_ifaces_registered_
 
ResourceMap resources_
 

Detailed Description

Definition at line 40 of file xarm_hw.h.

Member Enumeration Documentation

Enumerator
POSITION 
VELOCITY 
EFFORT 

Definition at line 61 of file xarm_hw.h.

Constructor & Destructor Documentation

xarm_control::XArmHW::XArmHW ( )
inline

Definition at line 43 of file xarm_hw.h.

xarm_control::XArmHW::~XArmHW ( )

Definition at line 195 of file xarm_hw.cpp.

Member Function Documentation

void xarm_control::XArmHW::_enforce_limits ( const ros::Duration period)
private

Definition at line 224 of file xarm_hw.cpp.

void xarm_control::XArmHW::_register_joint_limits ( ros::NodeHandle root_nh,
std::string  joint_name,
const ControlMethod  ctrl_method 
)
private

Definition at line 12 of file xarm_hw.cpp.

void xarm_control::XArmHW::_reset_limits ( void  )
private

Definition at line 218 of file xarm_hw.cpp.

void xarm_control::XArmHW::clientInit ( const std::string &  robot_ip,
ros::NodeHandle root_nh 
)
private

Definition at line 68 of file xarm_hw.cpp.

void xarm_control::XArmHW::get_status ( int  state_mode_err[3])

Definition at line 314 of file xarm_hw.cpp.

bool xarm_control::XArmHW::init ( ros::NodeHandle root_nh,
ros::NodeHandle robot_hw_nh 
)
virtual

Reimplemented from hardware_interface::RobotHW.

Definition at line 142 of file xarm_hw.cpp.

bool xarm_control::XArmHW::need_reset ( )

Definition at line 321 of file xarm_hw.cpp.

void xarm_control::XArmHW::pos_fb_cb ( const sensor_msgs::JointState::ConstPtr &  data)
private

Definition at line 200 of file xarm_hw.cpp.

void xarm_control::XArmHW::read ( const ros::Time time,
const ros::Duration period 
)
virtual

Reimplemented from hardware_interface::RobotHW.

Definition at line 250 of file xarm_hw.cpp.

void xarm_control::XArmHW::state_fb_cb ( const xarm_msgs::RobotMsg::ConstPtr &  data)
private

Definition at line 211 of file xarm_hw.cpp.

void xarm_control::XArmHW::write ( const ros::Time time,
const ros::Duration period 
)
virtual

Reimplemented from hardware_interface::RobotHW.

Definition at line 255 of file xarm_hw.cpp.

Member Data Documentation

ControlMethod xarm_control::XArmHW::ctrl_method_
private

Definition at line 87 of file xarm_hw.h.

int xarm_control::XArmHW::curr_err
private

Definition at line 66 of file xarm_hw.h.

int xarm_control::XArmHW::curr_mode
private

Definition at line 65 of file xarm_hw.h.

int xarm_control::XArmHW::curr_state
private

Definition at line 64 of file xarm_hw.h.

unsigned int xarm_control::XArmHW::dof_
private

Definition at line 68 of file xarm_hw.h.

std::vector<double> xarm_control::XArmHW::effort_cmd_
private

Definition at line 74 of file xarm_hw.h.

std::vector<double> xarm_control::XArmHW::effort_fdb_
private

Definition at line 78 of file xarm_hw.h.

ros::Subscriber xarm_control::XArmHW::effort_sub_
private

Definition at line 101 of file xarm_hw.h.

hardware_interface::EffortJointInterface xarm_control::XArmHW::ej_interface_
private

Definition at line 90 of file xarm_hw.h.

joint_limits_interface::EffortJointSoftLimitsInterface xarm_control::XArmHW::ej_limits_interface_
private

Definition at line 95 of file xarm_hw.h.

joint_limits_interface::EffortJointSaturationInterface xarm_control::XArmHW::ej_sat_interface_
private

Definition at line 94 of file xarm_hw.h.

std::string xarm_control::XArmHW::hw_ns_
private

Definition at line 82 of file xarm_hw.h.

bool xarm_control::XArmHW::initial_write_
private

Definition at line 80 of file xarm_hw.h.

std::vector<std::string> xarm_control::XArmHW::jnt_names_
private

Definition at line 69 of file xarm_hw.h.

hardware_interface::JointStateInterface xarm_control::XArmHW::js_interface_
private

Definition at line 89 of file xarm_hw.h.

urdf::ModelInterfaceSharedPtr xarm_control::XArmHW::model_ptr_
private

Definition at line 86 of file xarm_hw.h.

std::mutex xarm_control::XArmHW::mutex_
private

Definition at line 81 of file xarm_hw.h.

hardware_interface::PositionJointInterface xarm_control::XArmHW::pj_interface_
private

Definition at line 91 of file xarm_hw.h.

joint_limits_interface::PositionJointSoftLimitsInterface xarm_control::XArmHW::pj_limits_interface_
private

Definition at line 97 of file xarm_hw.h.

joint_limits_interface::PositionJointSaturationInterface xarm_control::XArmHW::pj_sat_interface_
private

Definition at line 96 of file xarm_hw.h.

ros::Subscriber xarm_control::XArmHW::pos_sub_
private

Definition at line 101 of file xarm_hw.h.

std::vector<double> xarm_control::XArmHW::position_cmd_
private

Definition at line 70 of file xarm_hw.h.

std::vector<float> xarm_control::XArmHW::position_cmd_float_
private

Definition at line 71 of file xarm_hw.h.

std::vector<double> xarm_control::XArmHW::position_fdb_
private

Definition at line 76 of file xarm_hw.h.

ros::Subscriber xarm_control::XArmHW::state_sub_
private

Definition at line 101 of file xarm_hw.h.

ros::Subscriber xarm_control::XArmHW::vel_sub_
private

Definition at line 101 of file xarm_hw.h.

std::vector<double> xarm_control::XArmHW::velocity_cmd_
private

Definition at line 72 of file xarm_hw.h.

std::vector<float> xarm_control::XArmHW::velocity_cmd_float_
private

Definition at line 73 of file xarm_hw.h.

std::vector<double> xarm_control::XArmHW::velocity_fdb_
private

Definition at line 77 of file xarm_hw.h.

hardware_interface::VelocityJointInterface xarm_control::XArmHW::vj_interface_
private

Definition at line 92 of file xarm_hw.h.

joint_limits_interface::VelocityJointSoftLimitsInterface xarm_control::XArmHW::vj_limits_interface_
private

Definition at line 99 of file xarm_hw.h.

joint_limits_interface::VelocityJointSaturationInterface xarm_control::XArmHW::vj_sat_interface_
private

Definition at line 98 of file xarm_hw.h.

xarm_api::XArmROSClient xarm_control::XArmHW::xarm
private

Definition at line 84 of file xarm_hw.h.


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


xarm_controller
Author(s):
autogenerated on Sat May 8 2021 02:51:38