Interface Class Reference

Hand interface. More...

#include <Interface.hh>

Public Member Functions

 Interface ()
 Constructor. More...
 
bool init (const std::string &config_file, const std::string &robot)
 Initalizes interface with config file. More...
 
std::string getRobotName ()
 Gets robot name. More...
 
ignition::math::Matrix4d getTransformBaseGripper ()
 Get T base to gripper frame. More...
 
void setPose (ignition::math::Pose3d pose, double timeout=-1)
 Sets hand pose. More...
 
void reset (void)
 Sends reset signal to hand plugin. More...
 
void openFingers (double timeout=-1, bool set_position=false)
 Releases fingers and opens hand. More...
 
void closeFingers (double timeout=-1, bool apply_force=false)
 Clenches fingers and closes hand. More...
 
void raiseHand (double timeout=-1)
 Raises hand. More...
 
void loop (void)
 TODO. More...
 

Static Public Attributes

static const grasp::msgs::Target_Type FORCE
 Direct force/torque application. More...
 
static const grasp::msgs::Target_Type POSITION
 Position controller target. More...
 
static const grasp::msgs::Target_Type VELOCITY
 Velocity controller target. More...
 

Private Member Functions

int processKeypress (char key)
 TODO. More...
 
void moveJoint (const char *joint, double value)
 TODO. More...
 
void moveFingers (double value)
 TODO. More...
 
void setJoints (std::vector< std::string > &joints, std::vector< double > &values)
 TODO. More...
 

Private Attributes

std::string robot_name
 Name of robot instance in Gazebo. More...
 
gazebo::transport::NodePtr node
 Gazebo communication node. More...
 
gazebo::transport::PublisherPtr pub
 Gazebo publisher. More...
 
std::vector< std::string > joints
 Name of actuated robot joints. More...
 
std::map< std::string, double > state
 Map with (name: value) states of each actuated joint. More...
 
std::vector< GraspShapegrasps
 Set of grasp shapes. More...
 
ignition::math::Matrix4d t_base_gripper
 Rigid transform from base link to gripper frame. More...
 

Detailed Description

Hand interface.

Constructor & Destructor Documentation

Interface ( )

Constructor.

Member Function Documentation

void closeFingers ( double  timeout = -1,
bool  apply_force = false 
)

Clenches fingers and closes hand.

Parameters
timeoutTimer value
apply_forceWether to bypass PIDs and apply force/torque directly
std::string getRobotName ( )

Gets robot name.

Returns
Robot name string
ignition::math::Matrix4d getTransformBaseGripper ( )

Get T base to gripper frame.

Returns
Rigid transform from base link to gripper frame
bool init ( const std::string &  config_file,
const std::string &  robot 
)

Initalizes interface with config file.

Returns
True on success, false otherwise.
void loop ( void  )

TODO.

void moveFingers ( double  value)
private

TODO.

void moveJoint ( const char *  joint,
double  value 
)
private

TODO.

void openFingers ( double  timeout = -1,
bool  set_position = false 
)

Releases fingers and opens hand.

Parameters
timeoutTimer value
set_positionSet joint position to target value
int processKeypress ( char  key)
private

TODO.

void raiseHand ( double  timeout = -1)

Raises hand.

Parameters
timeoutTimer value
void reset ( void  )

Sends reset signal to hand plugin.

void setJoints ( std::vector< std::string > &  joints,
std::vector< double > &  values 
)
private

TODO.

void setPose ( ignition::math::Pose3d  pose,
double  timeout = -1 
)

Sets hand pose.

Sets hand pose using virtual joints

Parameters
poseNew hand pose
timeoutTimer value

Member Data Documentation

const grasp::msgs::Target_Type FORCE
static
Initial value:

Direct force/torque application.

std::vector<GraspShape> grasps
private

Set of grasp shapes.

std::vector<std::string> joints
private

Name of actuated robot joints.

gazebo::transport::NodePtr node
private

Gazebo communication node.

const grasp::msgs::Target_Type POSITION
static
Initial value:

Position controller target.

gazebo::transport::PublisherPtr pub
private

Gazebo publisher.

std::string robot_name
private

Name of robot instance in Gazebo.

std::map<std::string, double> state
private

Map with (name: value) states of each actuated joint.

ignition::math::Matrix4d t_base_gripper
private

Rigid transform from base link to gripper frame.

const grasp::msgs::Target_Type VELOCITY
static
Initial value:

Velocity controller target.


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