kinematics-dynamics
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
roboticslab::KeyboardController Class Reference

Sends streaming commands to the cartesian controller from a standard keyboard. More...

#include <KeyboardController.hpp>

Inheritance diagram for roboticslab::KeyboardController:

Public Types

enum  joint {
  Q1 = 0 , Q2 , Q3 , Q4 ,
  Q5 , Q6 , Q7 , Q8 ,
  Q9 , MAX_JOINTS
}
 
enum  cart {
  X = 0 , Y , Z , ROTX ,
  ROTY , ROTZ , NUM_CART_COORDS
}
 

Public Member Functions

bool configure (yarp::os::ResourceFinder &rf) override
 
bool updateModule () override
 
bool interruptModule () override
 
double getPeriod () override
 
bool close () override
 

Private Types

enum  control_modes { NOT_CONTROLLING , JOINT_MODE , CARTESIAN_MODE }
 
enum  joint_mode { POSITION , VELOCITY }
 

Private Member Functions

template<typename func >
void incrementOrDecrementJointCommand (joint j, func op)
 
template<typename func >
void incrementOrDecrementCartesianCommand (cart coord, func op)
 
void toggleJointMode ()
 
void toggleReferenceFrame ()
 
void actuateTool (int command)
 
void printJointPositions ()
 
void printCartesianPositions ()
 
void issueStop ()
 
void printHelp ()
 

Private Attributes

int axes {0}
 
int currentActuatorCommand {VOCAB_CC_ACTUATOR_NONE}
 
double jointPosStep {0.0}
 
double jointVelStep {0.0}
 
ICartesianSolver::reference_frame cartFrame {ICartesianSolver::BASE_FRAME}
 
std::string angleRepr
 
KinRepresentation::orientation_system orient {KinRepresentation::orientation_system::AXIS_ANGLE}
 
control_modes controlMode {NOT_CONTROLLING}
 
joint_mode jointMode {VELOCITY}
 
bool usingThread {false}
 
LinearTrajectoryThreadlinTrajThread {nullptr}
 
yarp::dev::PolyDriver controlBoardDevice
 
yarp::dev::PolyDriver cartesianControlDevice
 
yarp::dev::IEncoders * iEncoders {nullptr}
 
yarp::dev::IControlMode * iControlMode {nullptr}
 
yarp::dev::IControlLimits * iControlLimits {nullptr}
 
yarp::dev::IPositionControl * iPositionControl {nullptr}
 
yarp::dev::IVelocityControl * iVelocityControl {nullptr}
 
roboticslab::ICartesianControliCartesianControl {nullptr}
 
std::vector< double > minPositionLimits
 
std::vector< double > maxPositionLimits
 
std::vector< double > maxVelocityLimits
 
std::vector< double > currentJointVels
 
std::vector< double > currentCartVels
 

Static Private Attributes

static const std::plus< double > increment_functor
 
static const std::minus< double > decrement_functor
 

Detailed Description

Uses the terminal as a simple user interface. Also accepts joint commands if connected to a remote controlboard.


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