AUTh-ARL Core Stack  0.7
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
arl::robot::Robot Class Referenceabstract

An abstract class that implements a robot. More...

#include <robot.h>

Inheritance diagram for arl::robot::Robot:
Collaboration diagram for arl::robot::Robot:

Public Member Functions

 Robot ()
 Empty constructor. More...
 
 Robot (std::shared_ptr< Model > m, const std::string &name="Unnamed")
 Default constructor. More...
 
virtual void setJointPosition (const KDL::JntArray &input, const int chain_index=-1)
 Sends joint positions to the robot using KDL. More...
 
virtual void setJointPosition (const arma::vec &input, const int chain_index=-1)
 Sends joint positions to the robot using Armadillo. More...
 
virtual void setJointPosition (const Eigen::VectorXd &input, const int chain_index=-1)
 Sends joint positions to the robot using Eigen. More...
 
virtual void setJointTrajectory (const KDL::JntArray &input, double duration, const int chain_index=-1)
 Sends joint trajectories to the robot using KDL. More...
 
virtual void setJointTrajectory (const arma::vec &input, double duration, const int chain_index=-1)
 Sends joint trajectories to the robot using Armadillo. More...
 
virtual void setJointTrajectory (const Eigen::VectorXd &input, double duration, const int chain_index=-1)
 Sends joint trajectories to the robot using Eigen. More...
 
virtual void setJointVelocity (const KDL::JntArray &input, const int chain_index=-1)
 Sends joint velocities to the robot using KDL. More...
 
virtual void setJointVelocity (const arma::vec &input, const int chain_index=-1)
 Sends joint velocities to the robot using Armadillo. More...
 
virtual void setJointVelocity (const Eigen::VectorXd &input, const int chain_index=-1)
 Sends joint velocities to the robot using Eigen. More...
 
virtual void setJointTorque (const KDL::JntArray &input, const int chain_index=-1)
 Sends joint velocities to the robot using KDL. More...
 
virtual void setJointTorque (const arma::vec &input, const int chain_index=-1)
 Sends joint torques to the robot using Armadillo. More...
 
virtual void setJointTorque (const Eigen::VectorXd &input, const int chain_index=-1)
 Sends joint torques to the robot using Eigen. More...
 
virtual void setTaskPose (const KDL::Frame &input, const unsigned int chain_index=0)
 Sends joint torques to the robot using KDL. More...
 
virtual void setTaskPose (const arma::mat &input, const unsigned int chain_index=0)
 Sends Cartesian pose to the robot using Armadillo. More...
 
virtual void setTaskPose (const Eigen::MatrixXd &input, const unsigned int chain_index=0)
 Sends Cartesian pose to the robot using Eigen. More...
 
virtual void setCartStiffness (const KDL::Wrench &input, const unsigned int chain_index=0)
 Sends the cartesian stiffness for robots which provide Cartesian Impedance controller. More...
 
virtual void setCartStiffness (const arma::vec &input, const unsigned int chain_index=0)
 Sends the cartesian stiffness for robots which provide Cartesian Impedance controller. More...
 
virtual void setCartStiffness (const Eigen::VectorXd &input, const unsigned int chain_index=0)
 Sends the cartesian stiffness for robots which provide Cartesian Impedance controller. More...
 
virtual void setCartDamping (const KDL::Wrench &input, const unsigned int chain_index=0)
 Sends the cartesian damping for robots which provide Cartesian Impedance controller. More...
 
virtual void setCartDamping (const arma::vec &input, const unsigned int chain_index=0)
 Sends the cartesian damping for robots which provide Cartesian Impedance controller. More...
 
virtual void setCartDamping (const Eigen::VectorXd &input, const unsigned int chain_index=0)
 Sends the cartesian damping for robots which provide Cartesian Impedance controller. More...
 
virtual void setTwist (const KDL::Twist &input, const unsigned int chain_index=0)
 
virtual void setTwist (const arma::vec &input, const unsigned int chain_index=0)
 Sends Cartesian velocity to the robot using Armadillo. More...
 
virtual void setTwist (const Eigen::VectorXd &input, const unsigned int chain_index=0)
 Sends Cartesian velocity to the robot using Eigen. More...
 
virtual void setWrench (const KDL::Wrench &input, const unsigned int chain_index=0)
 Sends Cartesian velocity to the robot using KDL. More...
 
virtual void setWrench (const arma::vec &input, const unsigned int chain_index=0)
 Sends Cartesian force/torque to the robot using Armadillo. More...
 
virtual void setWrench (const Eigen::VectorXd &input, const unsigned int chain_index=0)
 Sends Cartesian force/torque to the robot using Eigen. More...
 
virtual void getJointPosition (KDL::JntArray &output, const int chain_index=-1)
 Reads the current joint positions to the robot using KDL. More...
 
virtual void getJointPosition (arma::vec &output, const int chain_index=-1)
 Reads the current joint positions from the robot using Armadillo. More...
 
virtual void getJointPosition (Eigen::VectorXd &output, const int chain_index=-1)
 Reads the current joint positions from the robot using Eigen. More...
 
virtual void getJointVelocity (KDL::JntArray &output, const int chain_index=-1)
 Reads the current joint velocities from the robot using KDL. More...
 
virtual void getJointVelocity (arma::vec &output, const int chain_index=-1)
 Reads the current joint velocities from the robot using Armadillo. More...
 
virtual void getJointVelocity (Eigen::VectorXd &output, const int chain_index=-1)
 Reads the current joint velocities from the robot using Eigen. More...
 
virtual void getJointTorque (KDL::JntArray &output, const int chain_index=-1)
 Reads the current joint torques from the robot using KDL. More...
 
virtual void getJointTorque (arma::vec &output, const int chain_index=-1)
 Reads the current joint torques from the robot using Armadillo. More...
 
virtual void getJointTorque (Eigen::VectorXd &output, const int chain_index=-1)
 Reads the current joint torques from the robot using Eigen. More...
 
virtual void getJointExternalTorque (KDL::JntArray &output, const int chain_index=-1)
 Reads the current external joint torques from the robot using KDL. More...
 
virtual void getJointExternalTorque (arma::vec &output, const int chain_index=-1)
 Reads the current external joint torques from the robot using Armadillo. More...
 
virtual void getJointExternalTorque (Eigen::VectorXd &output, const int chain_index=-1)
 Reads the current external joint torques from the robot using Eigen. More...
 
virtual void getJointStiffness (KDL::JntArray &output, const int chain_index=-1)
 Reads the current joint stiffness from the robot using KDL. More...
 
virtual void getJointStiffness (arma::vec &output, const int chain_index=-1)
 Reads the current joint stiffness from the robot using Armadillo. More...
 
virtual void getJointStiffness (Eigen::VectorXd &output, const int chain_index=-1)
 Reads the current joint stiffness from the robot using Eigen. More...
 
virtual void getJointDamping (KDL::JntArray &output, const int chain_index=-1)
 Reads the current joint damping from the robot using KDL. More...
 
virtual void getJointDamping (arma::vec &output, const int chain_index=-1)
 Reads the current joint damping from the robot using Armadillo. More...
 
virtual void getJointDamping (Eigen::VectorXd &output, const int chain_index=-1)
 Reads the current joint damping from the robot using Eigen. More...
 
virtual void getTaskPose (KDL::Frame &output, const unsigned int chain_index=0)
 Reads the current Cartesian pose from the robot using KDL. More...
 
virtual void getTaskPose (arma::mat &output, const unsigned int chain_index=0)
 Reads the current Cartesian pose from the robot using Armadillo. More...
 
virtual void getTaskPose (Eigen::MatrixXd &output, const unsigned int chain_index=0)
 Reads the current Cartesian pose from the robot using Eigen. More...
 
virtual void getTaskPosition (KDL::Vector &output, const unsigned int chain_index=0)
 Reads the current Cartesian Position from the robot using KDL. More...
 
virtual void getTaskPosition (arma::vec &output, const unsigned int chain_index=0)
 Reads the current Cartesian position from the robot using Armadillo. More...
 
virtual void getTaskPosition (Eigen::Vector3d &output, const unsigned int chain_index=0)
 Reads the current joint positions from the robot using Eigen. More...
 
virtual void getTaskOrientation (KDL::Rotation &output, const unsigned int chain_index=0)
 Reads the current Cartesian orientation (Rotation matrix) from the robot using KDL. More...
 
virtual void getTaskOrientation (arma::mat &output, const unsigned int chain_index=0)
 Reads the current Cartesian orientation (Rotation matrix) from the robot using Armadillo. More...
 
virtual void getTaskOrientation (Eigen::Matrix3d &output, const unsigned int chain_index=0)
 Reads the current Cartesian orientation (Rotation matrix) from the robot using Eigen. More...
 
virtual void getTwist (KDL::Twist &output, const unsigned int chain_index=0)
 Reads the current Cartesian velocity from the robot using KDL. More...
 
virtual void getTwist (arma::vec &output, const unsigned int chain_index=0)
 Reads the current Cartesian velocity from the robot using Armadillo. More...
 
virtual void getTwist (Eigen::VectorXd &output, const unsigned int chain_index=0)
 Reads the current Cartesian velocity from the robot using Eigen. More...
 
virtual void getWrench (KDL::Wrench &output, const unsigned int chain_index=0)
 Reads the current Cartesian force/torque from the robot using KDL. More...
 
virtual void getWrench (arma::vec &output, const unsigned int chain_index=0)
 Reads the current Cartesian force/torque from the robot using Armadillo. More...
 
virtual void getWrench (Eigen::VectorXd &output, const unsigned int chain_index=0)
 Reads the current Cartesian force/torque from the robot using Eigen. More...
 
virtual void getExternalWrench (KDL::Wrench &output, const unsigned int chain_index=0)
 Reads the current external Cartesian force/torque from the robot using KDL. More...
 
virtual void getExternalWrench (arma::vec &output, const unsigned int chain_index=0)
 Reads the current external Cartesian force/torque from the robot using Armadillo. More...
 
virtual void getExternalWrench (Eigen::VectorXd &output, const unsigned int chain_index=0)
 Reads the current external Cartesian force/torque from the robot using Eigen. More...
 
virtual void getTaskStiffness (KDL::JntArray &output, const unsigned int chain_index=0)
 Reads the current Cartesian stiffness from the robot using KDL. More...
 
virtual void getTaskStiffness (arma::vec &output, const unsigned int chain_index=0)
 Reads the current Cartesian stiffness from the robot using Armadillo. More...
 
virtual void getTaskStiffness (Eigen::VectorXd &output, const unsigned int chain_index=0)
 Reads the current Cartesian stiffness from the robot using Eigen. More...
 
virtual void getTaskDamping (KDL::JntArray &output, const unsigned int chain_index=0)
 Reads the current Cartesian damping from the robot using KDL. More...
 
virtual void getTaskDamping (arma::vec &output, const unsigned int chain_index=0)
 Reads the current Cartesian damping rom the robot using Armadillo. More...
 
virtual void getTaskDamping (Eigen::VectorXd &output, const unsigned int chain_index=0)
 Reads the current Cartesian damping from the robot using Eigen. More...
 
virtual void getJacobian (KDL::Jacobian &output, const unsigned int chain_index=0)
 Reads the current base Jacobian matrix from the robot using KDL. More...
 
virtual void getJacobian (arma::mat &output, const unsigned int chain_index=0)
 Reads the current base Jacobian matrix from the robot using Armadillo. More...
 
virtual void getJacobian (Eigen::MatrixXd &output, const unsigned int chain_index=0)
 Reads the current base Jacobian matrix from the robot using Eigen. More...
 
virtual void getMassMatrix (KDL::Frame &output, const int chain_index=0)
 Reads the current mass matrix from the robot. More...
 
virtual void getMassMatrix (arma::mat &output, const int chain_index=0)
 Reads the current mass matrix from the robot. More...
 
virtual void getMassMatrix (Eigen::MatrixXd &output, const int chain_index=0)
 Reads the current mass matrix from the robot. More...
 
virtual void stop ()
 
virtual void setMode (Mode mode)
 Sets the mode of the robot. More...
 
virtual void measure ()
 
virtual void waitNextCycle ()=0
 Function that blocks the control loop before the next control cycle starts. More...
 
virtual bool isOk ()=0
 Returns if the robot hardware is ok and operable. Should be implemented according to the robot in use. More...
 
template<typename T >
void getJointVelocityGeneric (T &output, const int chain_index=-1)
 Reads the joint velocity using the derivative of the position (previous and current position) More...
 
template<typename T >
void setJointVelocityGeneric (T &input, const int chain_index=-1)
 Reads the joint velocity by integrating the position (previous and current position) More...
 

Public Attributes

arma::vec joint_pos_prev
 Stores the previous joint position used by arl::robot::setJointPositionGeneric. More...
 
double cycle
 The control cycle of the robot. More...
 
std::shared_ptr< Modelmodel
 A pointer to the Model that this Robot is using. More...
 
std::string robot_name
 The name of the robot. E.g. "KUKA LWR4". More...
 
std::string alias
 The alias of the robot, which is the name in lower case without spaces. E.g. "kuka_lwr4". More...
 
Mode mode
 The current Mode of the robot. More...
 

Protected Member Functions

void throwFunctionIsNotImplemented (std::string function_name)
 

Protected Attributes

std::vector< Statestate
 The current state of the robot. More...
 

Detailed Description

An abstract class that implements a robot.

This class encaptulates functionalities that abstracts any robot hardware. The core functionalities are read from and send to the robot positions, trajectories, velocities or efforts (joint torques or wrenches in task space) either to the joint space or the task space. Also reading the base Jacobian matrix of the robot in each cycle. Furthermore reading or sending joint/task stiffness or damping in compliant robots. Other functionalities include setting the mode of the robot, checking if the hardware is operable etc. This API class aims to support multiple client libraries like KDL, Armadillo or Eigen.

Constructor & Destructor Documentation

arl::robot::Robot::Robot ( )

Empty constructor.

arl::robot::Robot::Robot ( std::shared_ptr< Model m,
const std::string &  name = "Unnamed" 
)
explicit

Default constructor.

Parameters
mThe model that this robot will use
nameThe name of the robot. Defaults to "Unnamed"

Here is the call graph for this function:

Member Function Documentation

void arl::robot::Robot::getExternalWrench ( KDL::Wrench &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current external Cartesian force/torque from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getExternalWrench ( arma::vec &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current external Cartesian force/torque from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getExternalWrench ( Eigen::VectorXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current external Cartesian force/torque from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJacobian ( KDL::Jacobian &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current base Jacobian matrix from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getJacobian ( arma::mat &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current base Jacobian matrix from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getJacobian ( Eigen::MatrixXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current base Jacobian matrix from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getJointDamping ( KDL::JntArray &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint damping from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getJointDamping ( arma::vec &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint damping from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getJointDamping ( Eigen::VectorXd &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint damping from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getJointExternalTorque ( KDL::JntArray &  output,
const int  chain_index = -1 
)
virtual

Reads the current external joint torques from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointExternalTorque ( arma::vec &  output,
const int  chain_index = -1 
)
virtual

Reads the current external joint torques from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointExternalTorque ( Eigen::VectorXd &  output,
const int  chain_index = -1 
)
virtual

Reads the current external joint torques from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointPosition ( KDL::JntArray &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint positions to the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::robot::RobotSim, arl::mujoco::Robot, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointPosition ( arma::vec &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint positions from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::robot::RobotSim, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointPosition ( Eigen::VectorXd &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint positions from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::robot::RobotSim, arl::mujoco::Robot, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointStiffness ( KDL::JntArray &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint stiffness from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getJointStiffness ( arma::vec &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint stiffness from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getJointStiffness ( Eigen::VectorXd &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint stiffness from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getJointTorque ( KDL::JntArray &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint torques from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointTorque ( arma::vec &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint torques from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointTorque ( Eigen::VectorXd &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint torques from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointVelocity ( KDL::JntArray &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint velocities from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointVelocity ( arma::vec &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint velocities from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getJointVelocity ( Eigen::VectorXd &  output,
const int  chain_index = -1 
)
virtual

Reads the current joint velocities from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::mujoco::Robot.

Here is the call graph for this function:

template<typename T >
void arl::robot::Robot::getJointVelocityGeneric ( T &  output,
const int  chain_index = -1 
)
inline

Reads the joint velocity using the derivative of the position (previous and current position)

Parameters
outputThe current joint velocities
chain_indexThe index of the chain

Here is the call graph for this function:

void arl::robot::Robot::getMassMatrix ( KDL::Frame &  output,
const int  chain_index = 0 
)
virtual

Reads the current mass matrix from the robot.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getMassMatrix ( arma::mat &  output,
const int  chain_index = 0 
)
virtual

Reads the current mass matrix from the robot.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getMassMatrix ( Eigen::MatrixXd &  output,
const int  chain_index = 0 
)
virtual

Reads the current mass matrix from the robot.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTaskDamping ( KDL::JntArray &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian damping from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTaskDamping ( arma::vec &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian damping rom the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTaskDamping ( Eigen::VectorXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian damping from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTaskOrientation ( KDL::Rotation &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian orientation (Rotation matrix) from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTaskOrientation ( arma::mat &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian orientation (Rotation matrix) from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::bhand::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTaskOrientation ( Eigen::Matrix3d &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian orientation (Rotation matrix) from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::bhand::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTaskPose ( KDL::Frame &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian pose from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTaskPose ( arma::mat &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian pose from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::bhand::Robot, lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTaskPose ( Eigen::MatrixXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian pose from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTaskPosition ( KDL::Vector &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian Position from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::robot::RobotSim, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getTaskPosition ( arma::vec &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian position from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::robot::RobotSim, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getTaskPosition ( Eigen::Vector3d &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current joint positions from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, arl::robot::RobotSim, and arl::bhand::Robot.

Here is the call graph for this function:

void arl::robot::Robot::getTaskStiffness ( KDL::JntArray &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian stiffness from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTaskStiffness ( arma::vec &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian stiffness from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTaskStiffness ( Eigen::VectorXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian stiffness from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getTwist ( KDL::Twist &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian velocity from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTwist ( arma::vec &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian velocity from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getTwist ( Eigen::VectorXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian velocity from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot, and arl::robot::RobotSim.

Here is the call graph for this function:

void arl::robot::Robot::getWrench ( KDL::Wrench &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian force/torque from the robot using KDL.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getWrench ( arma::vec &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian force/torque from the robot using Armadillo.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::getWrench ( Eigen::VectorXd &  output,
const unsigned int  chain_index = 0 
)
virtual

Reads the current Cartesian force/torque from the robot using Eigen.

Parameters
outputThe output given by the robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

virtual bool arl::robot::Robot::isOk ( )
pure virtual

Returns if the robot hardware is ok and operable. Should be implemented according to the robot in use.

Returns
True if the robot haven't returns any errors. False otherwise.

Implemented in lwr::robot::Robot, arl::bhand::Robot, arl::robot::RobotSim, and arl::mujoco::Robot.

void arl::robot::Robot::measure ( )
virtual

Here is the call graph for this function:

void arl::robot::Robot::setCartDamping ( const KDL::Wrench &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends the cartesian damping for robots which provide Cartesian Impedance controller.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setCartDamping ( const arma::vec &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends the cartesian damping for robots which provide Cartesian Impedance controller.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setCartDamping ( const Eigen::VectorXd &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends the cartesian damping for robots which provide Cartesian Impedance controller.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setCartStiffness ( const KDL::Wrench &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends the cartesian stiffness for robots which provide Cartesian Impedance controller.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setCartStiffness ( const arma::vec &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends the cartesian stiffness for robots which provide Cartesian Impedance controller.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setCartStiffness ( const Eigen::VectorXd &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends the cartesian stiffness for robots which provide Cartesian Impedance controller.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointPosition ( const KDL::JntArray &  input,
const int  chain_index = -1 
)
virtual

Sends joint positions to the robot using KDL.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::robot::RobotSim, arl::bhand::Robot, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointPosition ( const arma::vec &  input,
const int  chain_index = -1 
)
virtual

Sends joint positions to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::robot::RobotSim, arl::bhand::Robot, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointPosition ( const Eigen::VectorXd &  input,
const int  chain_index = -1 
)
virtual

Sends joint positions to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::robot::RobotSim, arl::bhand::Robot, lwr::robot::Robot, and arl::mujoco::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointTorque ( const KDL::JntArray &  input,
const int  chain_index = -1 
)
virtual

Sends joint velocities to the robot using KDL.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointTorque ( const arma::vec &  input,
const int  chain_index = -1 
)
virtual

Sends joint torques to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointTorque ( const Eigen::VectorXd &  input,
const int  chain_index = -1 
)
virtual

Sends joint torques to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointTrajectory ( const KDL::JntArray &  input,
double  duration,
const int  chain_index = -1 
)
virtual

Sends joint trajectories to the robot using KDL.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::robot::RobotSim, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointTrajectory ( const arma::vec &  input,
double  duration,
const int  chain_index = -1 
)
virtual

Sends joint trajectories to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::robot::RobotSim, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointTrajectory ( const Eigen::VectorXd &  input,
double  duration,
const int  chain_index = -1 
)
virtual

Sends joint trajectories to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::robot::RobotSim, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointVelocity ( const KDL::JntArray &  input,
const int  chain_index = -1 
)
virtual

Sends joint velocities to the robot using KDL.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::bhand::Robot, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointVelocity ( const arma::vec &  input,
const int  chain_index = -1 
)
virtual

Sends joint velocities to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::bhand::Robot, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setJointVelocity ( const Eigen::VectorXd &  input,
const int  chain_index = -1 
)
virtual

Sends joint velocities to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in arl::bhand::Robot, and lwr::robot::Robot.

Here is the call graph for this function:

template<typename T >
void arl::robot::Robot::setJointVelocityGeneric ( T &  input,
const int  chain_index = -1 
)
inline

Reads the joint velocity by integrating the position (previous and current position)

Parameters
outputThe commanded joint velocities
chain_indexThe index of the chain

Here is the call graph for this function:

void arl::robot::Robot::setMode ( Mode  mode)
virtual

Sets the mode of the robot.

Parameters
modeThe desired Mode of the Robot.
chain_indexThe chain that will change mode. Defaults to zero.

Reimplemented in arl::bhand::Robot, arl::robot::RobotSim, and lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setTaskPose ( const KDL::Frame &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends joint torques to the robot using KDL.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setTaskPose ( const arma::mat &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian pose to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setTaskPose ( const Eigen::MatrixXd &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian pose to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setTwist ( const KDL::Twist &  input,
const unsigned int  chain_index = 0 
)
virtual

Here is the call graph for this function:

void arl::robot::Robot::setTwist ( const arma::vec &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian velocity to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::setTwist ( const Eigen::VectorXd &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian velocity to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Here is the call graph for this function:

void arl::robot::Robot::setWrench ( const KDL::Wrench &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian velocity to the robot using KDL.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setWrench ( const arma::vec &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian force/torque to the robot using Armadillo.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::setWrench ( const Eigen::VectorXd &  input,
const unsigned int  chain_index = 0 
)
virtual

Sends Cartesian force/torque to the robot using Eigen.

Parameters
inputThe input for sending to robot
chain_indexThe index of the robots chain. Defaults to 0.

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::stop ( )
virtual

Reimplemented in lwr::robot::Robot.

Here is the call graph for this function:

void arl::robot::Robot::throwFunctionIsNotImplemented ( std::string  function_name)
protected

Prints a warning that the function is not implemented by the derived class.

virtual void arl::robot::Robot::waitNextCycle ( )
pure virtual

Function that blocks the control loop before the next control cycle starts.

Can be implemented by sleeping or waiting for a signal from the robot. The function is not const in case in some implementations you want to change variable (e.g. a flag for reading the velocity by differentiating the position).

Implemented in arl::bhand::Robot, arl::robot::RobotSim, arl::mujoco::Robot, and lwr::robot::Robot.

Member Data Documentation

std::string arl::robot::Robot::alias

The alias of the robot, which is the name in lower case without spaces. E.g. "kuka_lwr4".

double arl::robot::Robot::cycle

The control cycle of the robot.

Can be reading it online by the robot hardware or setted by the contructor of your robot.

arma::vec arl::robot::Robot::joint_pos_prev

Stores the previous joint position used by arl::robot::setJointPositionGeneric.

Mode arl::robot::Robot::mode

The current Mode of the robot.

std::shared_ptr<Model> arl::robot::Robot::model

A pointer to the Model that this Robot is using.

std::string arl::robot::Robot::robot_name

The name of the robot. E.g. "KUKA LWR4".

std::vector<State> arl::robot::Robot::state
protected

The current state of the robot.