Public Member Functions | Public Attributes | Private Attributes | List of all members
bhand_node.BHand Class Reference

Public Member Functions

def __init__ (self, args)
 
def actionsToString (self, action)
 
def allState (self)
 
def canError (self, n)
 
def closeFingers (self, value)
 
def commandCallback (self, data)
 
def controlLoop (self)
 
def emergencyState (self)
 
def failureRecover (self)
 
def failureState (self)
 
def handActions (self, req)
 
def initFailureRecoverTimer (self, timer=5)
 
def initReadTempTimer (self)
 
def initState (self)
 
def openFingers (self)
 
def publishROSstate (self)
 
def readTemp (self)
 
def readyState (self)
 
def rosPublish (self)
 
def rosSetup (self)
 
def rosShutdown (self)
 
def setControlMode (self, mode, force=False)
 
def setControlModeServiceCb (self, req)
 
def setJointVelocity (self, finger)
 
def setup (self)
 
def shutdown (self)
 
def shutdownState (self)
 
def standbyState (self)
 
def start (self)
 
def stateToString (self, state)
 
def stop (self)
 
def strain_to_nm (self, x)
 
def switchToState (self, new_state)
 

Public Attributes

 actions_list
 
 can_errors
 
 can_initialized
 
 control_mode
 
 desired_freq
 
 desired_joints_position
 
 desired_joints_velocity
 
 failure_recover
 
 failure_recover_timer
 
 ft_sensor
 
 ft_sensor_frame_id
 
 grasp_mode
 
 hand
 
 hand_initialized
 
 joint_names
 
 joint_state
 
 max_can_errors
 
 msg_ft
 
 msg_state
 
 msg_tact_array
 
 new_command
 
 port
 
 publish_state_timer
 
 real_freq
 
 ros_initialized
 
 running
 
 sent_joints_velocity
 
 state
 
 t_publish_state
 
 t_read_temp
 
 tactile_sensors
 
 temp_command
 
 temp_current_sensor
 
 temp_read_timer
 
 temp_sensor_number
 
 temperatures
 
 time_sleep
 
 timer_command
 
 topic_state_name
 
 watchdog_command
 

Private Attributes

 _ft_sensor_publisher
 
 _hand_service
 
 _joints_publisher
 
 _joints_subscriber
 
 _set_control_mode_service
 
 _state_publisher
 
 _tact_array_publisher
 

Detailed Description

Definition at line 68 of file bhand_node.py.

Constructor & Destructor Documentation

def bhand_node.BHand.__init__ (   self,
  args 
)

Definition at line 70 of file bhand_node.py.

Member Function Documentation

def bhand_node.BHand.actionsToString (   self,
  action 
)
        @param action: action to convert
        @type state: bhand_controller.msg.Service
        @returns the equivalent string of the action

Definition at line 740 of file bhand_node.py.

def bhand_node.BHand.allState (   self)
        Actions performed in all states

Definition at line 704 of file bhand_node.py.

def bhand_node.BHand.canError (   self,
  n 
)
Manages the CAN errors ocurred

@param n: number of produced
@type n: int

@returns: True or false depending on the result

Definition at line 883 of file bhand_node.py.

def bhand_node.BHand.closeFingers (   self,
  value 
)
        Closes all the fingers

Definition at line 971 of file bhand_node.py.

def bhand_node.BHand.commandCallback (   self,
  data 
)
        Function called when receive a new value
        @param data: state to convert
        @type data: sensor_msgs.JointState

Definition at line 768 of file bhand_node.py.

def bhand_node.BHand.controlLoop (   self)
        Main loop of the component
        Manages actions by state

Definition at line 306 of file bhand_node.py.

def bhand_node.BHand.emergencyState (   self)
        Actions performed in emergency state

Definition at line 661 of file bhand_node.py.

def bhand_node.BHand.failureRecover (   self)
        Sets the recovery flag TRUE. Function called after timer

Definition at line 910 of file bhand_node.py.

def bhand_node.BHand.failureState (   self)
        Actions performed in failure state

Definition at line 668 of file bhand_node.py.

def bhand_node.BHand.handActions (   self,
  req 
)
Handles the callback to Actions ROS service. Allows a set of predefined actions like init_hand, close_grasp, ...

@param req: action id to perform
@type req: bhand_controller.srv.Actions

@returns: True or false depending on the result

Definition at line 845 of file bhand_node.py.

def bhand_node.BHand.initFailureRecoverTimer (   self,
  timer = 5 
)
        Function to start the timer to recover from FAILURE STATE

Definition at line 902 of file bhand_node.py.

def bhand_node.BHand.initReadTempTimer (   self)
        Function to start the timer to read the temperature

Definition at line 802 of file bhand_node.py.

def bhand_node.BHand.initState (   self)
        Actions performed in init state

Definition at line 383 of file bhand_node.py.

def bhand_node.BHand.openFingers (   self)
        Opens all the fingers

Definition at line 959 of file bhand_node.py.

def bhand_node.BHand.publishROSstate (   self)
        Publish the State of the component at the desired frequency

Definition at line 812 of file bhand_node.py.

def bhand_node.BHand.readTemp (   self)
        Function periodically to enable the read of temperature

Definition at line 789 of file bhand_node.py.

def bhand_node.BHand.readyState (   self)
        Actions performed in ready state

Definition at line 410 of file bhand_node.py.

def bhand_node.BHand.rosPublish (   self)
        Publish topics at standard frequency

Definition at line 359 of file bhand_node.py.

def bhand_node.BHand.rosSetup (   self)
        Creates and inits ROS components

Definition at line 209 of file bhand_node.py.

def bhand_node.BHand.rosShutdown (   self)
        Shutdows all ROS components
        @return: 0 if it's performed successfully, -1 if there's any problem or the component is running

Definition at line 258 of file bhand_node.py.

def bhand_node.BHand.setControlMode (   self,
  mode,
  force = False 
)
        Configures the hand to work under the desired control mode
        @param mode: new mode
        @type mode: string

Definition at line 940 of file bhand_node.py.

def bhand_node.BHand.setControlModeServiceCb (   self,
  req 
)
        Sets the hand control mode
        @param req: Requested service
        @type req: bhand_controller.srv.SetControlMode

Definition at line 917 of file bhand_node.py.

def bhand_node.BHand.setJointVelocity (   self,
  finger 
)
        Sets the joint velocity of the desired joint
        Takes the velocity value from the attribute desired_joints_velocity
        @param joint: finger of the hand (F1, F2, F3, SPREAD)
        @type joint: string

Definition at line 625 of file bhand_node.py.

def bhand_node.BHand.setup (   self)
        Initializes de hand
        @return: True if OK, False otherwise

Definition at line 191 of file bhand_node.py.

def bhand_node.BHand.shutdown (   self)
        Shutdowns device
        @return: 0 if it's performed successfully, -1 if there's any problem or the component is running

Definition at line 236 of file bhand_node.py.

def bhand_node.BHand.shutdownState (   self)
        Actions performed in shutdown state 

Definition at line 651 of file bhand_node.py.

def bhand_node.BHand.standbyState (   self)
        Actions performed in standby state

Definition at line 400 of file bhand_node.py.

def bhand_node.BHand.start (   self)
        Runs ROS configuration and the main control loop
        @return: 0 if OK

Definition at line 289 of file bhand_node.py.

def bhand_node.BHand.stateToString (   self,
  state 
)
        @param state: state to convert
        @type state: bhand_controller.msg.State
        @returns the equivalent string of the state

Definition at line 713 of file bhand_node.py.

def bhand_node.BHand.stop (   self)
        Creates and inits ROS components

Definition at line 280 of file bhand_node.py.

def bhand_node.BHand.strain_to_nm (   self,
  x 
)
Converts from raw encoder unit reading to Newton-meters.

@param x: value to convert

@returns nm: the torque value in Newton-meters. 

Definition at line 828 of file bhand_node.py.

def bhand_node.BHand.switchToState (   self,
  new_state 
)
        Performs the change of state

Definition at line 682 of file bhand_node.py.

Member Data Documentation

bhand_node.BHand._ft_sensor_publisher
private

Definition at line 221 of file bhand_node.py.

bhand_node.BHand._hand_service
private

Definition at line 226 of file bhand_node.py.

bhand_node.BHand._joints_publisher
private

Definition at line 219 of file bhand_node.py.

bhand_node.BHand._joints_subscriber
private

Definition at line 223 of file bhand_node.py.

bhand_node.BHand._set_control_mode_service
private

Definition at line 227 of file bhand_node.py.

bhand_node.BHand._state_publisher
private

Definition at line 218 of file bhand_node.py.

bhand_node.BHand._tact_array_publisher
private

Definition at line 220 of file bhand_node.py.

bhand_node.BHand.actions_list

Definition at line 135 of file bhand_node.py.

bhand_node.BHand.can_errors

Definition at line 123 of file bhand_node.py.

bhand_node.BHand.can_initialized

Definition at line 93 of file bhand_node.py.

bhand_node.BHand.control_mode

Definition at line 86 of file bhand_node.py.

bhand_node.BHand.desired_freq

Definition at line 74 of file bhand_node.py.

bhand_node.BHand.desired_joints_position

Definition at line 178 of file bhand_node.py.

bhand_node.BHand.desired_joints_velocity

Definition at line 179 of file bhand_node.py.

bhand_node.BHand.failure_recover

Definition at line 127 of file bhand_node.py.

bhand_node.BHand.failure_recover_timer

Definition at line 129 of file bhand_node.py.

bhand_node.BHand.ft_sensor

Definition at line 79 of file bhand_node.py.

bhand_node.BHand.ft_sensor_frame_id

Definition at line 80 of file bhand_node.py.

bhand_node.BHand.grasp_mode

Definition at line 137 of file bhand_node.py.

bhand_node.BHand.hand

Definition at line 103 of file bhand_node.py.

bhand_node.BHand.hand_initialized

Definition at line 95 of file bhand_node.py.

bhand_node.BHand.joint_names

Definition at line 156 of file bhand_node.py.

bhand_node.BHand.joint_state

Definition at line 105 of file bhand_node.py.

bhand_node.BHand.max_can_errors

Definition at line 125 of file bhand_node.py.

bhand_node.BHand.msg_ft

Definition at line 185 of file bhand_node.py.

bhand_node.BHand.msg_state

Definition at line 109 of file bhand_node.py.

bhand_node.BHand.msg_tact_array

Definition at line 107 of file bhand_node.py.

bhand_node.BHand.new_command

Definition at line 113 of file bhand_node.py.

bhand_node.BHand.port

Definition at line 72 of file bhand_node.py.

bhand_node.BHand.publish_state_timer

Definition at line 111 of file bhand_node.py.

bhand_node.BHand.real_freq

Definition at line 81 of file bhand_node.py.

bhand_node.BHand.ros_initialized

Definition at line 97 of file bhand_node.py.

bhand_node.BHand.running

Definition at line 99 of file bhand_node.py.

bhand_node.BHand.sent_joints_velocity

Definition at line 181 of file bhand_node.py.

bhand_node.BHand.state

Definition at line 91 of file bhand_node.py.

bhand_node.BHand.t_publish_state

Definition at line 183 of file bhand_node.py.

bhand_node.BHand.t_read_temp

Definition at line 184 of file bhand_node.py.

bhand_node.BHand.tactile_sensors

Definition at line 78 of file bhand_node.py.

bhand_node.BHand.temp_command

Definition at line 115 of file bhand_node.py.

bhand_node.BHand.temp_current_sensor

Definition at line 117 of file bhand_node.py.

bhand_node.BHand.temp_read_timer

Definition at line 121 of file bhand_node.py.

bhand_node.BHand.temp_sensor_number

Definition at line 119 of file bhand_node.py.

bhand_node.BHand.temperatures

Definition at line 164 of file bhand_node.py.

bhand_node.BHand.time_sleep

Definition at line 101 of file bhand_node.py.

bhand_node.BHand.timer_command

Definition at line 131 of file bhand_node.py.

bhand_node.BHand.topic_state_name

Definition at line 73 of file bhand_node.py.

bhand_node.BHand.watchdog_command

Definition at line 132 of file bhand_node.py.


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


bhand_controller
Author(s): Román Navarro , Jorge Ariño
autogenerated on Thu Aug 1 2019 03:30:51