Namespaces | Classes | Functions | Variables
grl::robot::arm Namespace Reference

Namespaces

 kuka
 

Classes

class  KukaDriver
 Kuka LBR iiwa Primary Multi Mode Driver, supports communication over FRI and JAVA interfaces. More...
 
class  KukaFRIClientDataDriver
 Simple low level driver to communicate over the Kuka iiwa FRI interface using KUKA::FRI::ClientData status objects. More...
 
class  KukaFRIdriver
 Primary Kuka FRI driver, only talks over realtime network FRI KONI ethernet port. More...
 
class  KukaJAVAdriver
 
struct  KukaState
 Internal implementation class for driver use only, stores all the kuka state data in a simple object. More...
 
class  KukaUDP
 Internal class, defines some default status variables. More...
 
struct  LinearInterpolation
 Default LowLevelStepAlgorithmType This algorithm is designed to be changed out. More...
 

Functions

template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, revolute_joint_angle_open_chain_state_tag)
 copy measured joint angle to output iterator More...
 
template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, revolute_joint_angle_interpolated_open_chain_state_tag)
 copy interpolated commanded joint angles More...
 
template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, revolute_joint_angle_open_chain_command_tag)
 copy commanded joint angle to output iterator More...
 
template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, revolute_joint_torque_open_chain_state_tag)
 copy measured joint torque to output iterator More...
 
template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, revolute_joint_torque_external_open_chain_state_tag)
 copy measured external joint torque to output iterator More...
 
template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, cartesian_external_force_tag)
 
template<typename OutputIterator >
void copy (const FRIMonitoringMessage &monitoringMsg, OutputIterator it, revolute_joint_torque_open_chain_command_tag)
 copy commanded joint torque to output iterator More...
 
template<typename OutputIterator >
OutputIterator copy (std::string model, OutputIterator it, grl::revolute_joint_velocity_open_chain_state_constraint_tag)
 copy vector of joint velocity limits in radians/s More...
 
void copy (const FRIMonitoringMessage &monitoringMsg, KukaState &state)
 don't use this More...
 
void decode (KUKA::FRI::ClientData &friData, std::size_t msg_size)
 internal function to decode KUKA FRI message buffer (using nanopb decoder) for the KUKA FRI More...
 
template<typename LowLevelStepAlgorithmType = LinearInterpolation>
std::size_t encode (LowLevelStepAlgorithmType &step_alg, KUKA::FRI::ClientData &friData, boost::system::error_code &ec)
 encode data in the class KUKA::FRI::ClientData into the send buffer for the KUKA FRI. this preps the information for transport over the network More...
 
KUKA::FRI::ESafetyState get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::ESafetyState)
 
KUKA::FRI::EOperationMode get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::EOperationMode)
 
KUKA::FRI::EControlMode get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::EControlMode)
 
KUKA::FRI::EClientCommandMode get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::EClientCommandMode)
 
KUKA::FRI::EOverlayType get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::EOverlayType)
 
KUKA::FRI::EDriveState get (const FRIMonitoringMessage &_message, const KUKA::FRI::EDriveState)
 
KUKA::FRI::ESessionState get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::ESessionState)
 
KUKA::FRI::EConnectionQuality get (const FRIMonitoringMessage &monitoringMsg, const KUKA::FRI::EConnectionQuality)
 
uint32_t get (const FRIMonitoringMessage &monitoringMsg, const grl::time_step_tag)
 Get FRI UDP packet time step (1-5ms) in milliseconds between each device sync. More...
 
std::size_t get (const FRIMonitoringMessage &monitoringMsg, const kuka::receive_multiplier)
 
std::chrono::time_point< std::chrono::high_resolution_clock > get (const FRIMonitoringMessage &monitoringMsg, const std::chrono::time_point< std::chrono::high_resolution_clock >)
 
template<typename LowLevelStepAlgorithmType = LinearInterpolation>
void update_state (boost::asio::ip::udp::socket &socket, LowLevelStepAlgorithmType &step_alg, KUKA::FRI::ClientData &friData, boost::system::error_code &receive_ec, std::size_t &receive_bytes_transferred, boost::system::error_code &send_ec, std::size_t &send_bytes_transferred, boost::asio::ip::udp::endpoint sender_endpoint=boost::asio::ip::udp::endpoint())
 Actually talk over the network to receive an update and send out a new KUKA FRI command. More...
 

Variables

constexpr auto KUKA_LBR_IIWA_14_R820 = "KUKA_LBR_IIWA_14_R820"
 
constexpr auto KUKA_LBR_IIWA_7_R800 = "KUKA_LBR_IIWA_7_R800"
 

Function Documentation

§ copy() [1/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
revolute_joint_angle_open_chain_state_tag   
)

copy measured joint angle to output iterator

Definition at line 80 of file KukaFRIalgorithm.hpp.

§ copy() [2/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
revolute_joint_angle_interpolated_open_chain_state_tag   
)

copy interpolated commanded joint angles

Definition at line 86 of file KukaFRIalgorithm.hpp.

§ copy() [3/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
revolute_joint_angle_open_chain_command_tag   
)

copy commanded joint angle to output iterator

Definition at line 92 of file KukaFRIalgorithm.hpp.

§ copy() [4/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
revolute_joint_torque_open_chain_state_tag   
)

copy measured joint torque to output iterator

Definition at line 99 of file KukaFRIalgorithm.hpp.

§ copy() [5/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
revolute_joint_torque_external_open_chain_state_tag   
)

copy measured external joint torque to output iterator

Definition at line 105 of file KukaFRIalgorithm.hpp.

§ copy() [6/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
cartesian_external_force_tag   
)

copy measured external force to output iterator note that this has a strange layout and actually contains an array of values for cartesian space. order is from the kuka documentation:

The wrench vector consists of: [F_x, F_y, F_z, tau_A, tau_B, tau_C]

F ... forces (in N) applied along the Cartesian axes of the currently used motion center. tau ... torques (in Nm) applied along the orientation angles (Euler angles A, B, C) of the currently used motion center.

Definition at line 120 of file KukaFRIalgorithm.hpp.

§ copy() [7/9]

template<typename OutputIterator >
void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
OutputIterator  it,
revolute_joint_torque_open_chain_command_tag   
)

copy commanded joint torque to output iterator

Definition at line 127 of file KukaFRIalgorithm.hpp.

§ copy() [8/9]

template<typename OutputIterator >
OutputIterator grl::robot::arm::copy ( std::string  model,
OutputIterator  it,
grl::revolute_joint_velocity_open_chain_state_constraint_tag   
)

copy vector of joint velocity limits in radians/s

Todo:

R800 velocity limits aren't correct!

find a better design where this can be expanded for more models of robot in the future, maybe a std::unordered_map?

: updated the right joint velocity information based

Definition at line 131 of file Kuka.hpp.

§ copy() [9/9]

void grl::robot::arm::copy ( const FRIMonitoringMessage &  monitoringMsg,
KukaState state 
)

don't use this

Deprecated:
this is an old implemenation that will be removed in the future
Todo:
fill out missing state update steps

Definition at line 373 of file KukaFRIdriver.hpp.

§ decode()

void grl::robot::arm::decode ( KUKA::FRI::ClientData &  friData,
std::size_t  msg_size 
)

internal function to decode KUKA FRI message buffer (using nanopb decoder) for the KUKA FRI

Note
encode needs to be updated for each additional supported command type and when updating to newer FRI versions

Definition at line 56 of file KukaFRIdriver.hpp.

§ encode()

template<typename LowLevelStepAlgorithmType = LinearInterpolation>
std::size_t grl::robot::arm::encode ( LowLevelStepAlgorithmType &  step_alg,
KUKA::FRI::ClientData &  friData,
boost::system::error_code &  ec 
)

encode data in the class KUKA::FRI::ClientData into the send buffer for the KUKA FRI. this preps the information for transport over the network

Note
encode needs to be updated for each additional supported command type and when updating to newer FRI versions
Todo:
do nothing if in an unsupported command mode? Or do the same as the next else if step?
Todo:
should this be different if it is in torque mode?
Todo:
allow copying of data directly between commandmsg and monitoringMsg

Definition at line 262 of file KukaFRIdriver.hpp.

§ get() [1/11]

KUKA::FRI::ESafetyState grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::ESafetyState   
)
Todo:
consider using another default value, or perhaps boost::optional<Kuka::FRI::ESafetyState>?

Definition at line 132 of file KukaFRIalgorithm.hpp.

§ get() [2/11]

KUKA::FRI::EOperationMode grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::EOperationMode   
)

Definition at line 142 of file KukaFRIalgorithm.hpp.

§ get() [3/11]

KUKA::FRI::EControlMode grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::EControlMode   
)

Definition at line 152 of file KukaFRIalgorithm.hpp.

§ get() [4/11]

KUKA::FRI::EClientCommandMode grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::EClientCommandMode   
)

Definition at line 162 of file KukaFRIalgorithm.hpp.

§ get() [5/11]

KUKA::FRI::EOverlayType grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::EOverlayType   
)

Definition at line 172 of file KukaFRIalgorithm.hpp.

§ get() [6/11]

KUKA::FRI::EDriveState grl::robot::arm::get ( const FRIMonitoringMessage &  _message,
const KUKA::FRI::EDriveState   
)

Definition at line 182 of file KukaFRIalgorithm.hpp.

§ get() [7/11]

KUKA::FRI::ESessionState grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::ESessionState   
)

Definition at line 198 of file KukaFRIalgorithm.hpp.

§ get() [8/11]

KUKA::FRI::EConnectionQuality grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const KUKA::FRI::EConnectionQuality   
)

Definition at line 206 of file KukaFRIalgorithm.hpp.

§ get() [9/11]

uint32_t grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const grl::time_step_tag   
)

Get FRI UDP packet time step (1-5ms) in milliseconds between each device sync.

"time step" is also known as "time duration", "milliseconds per tick", or "send period" gets the time duration between when udp packets are expected to be sent in milliseconds

Definition at line 218 of file KukaFRIalgorithm.hpp.

§ get() [10/11]

std::size_t grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const kuka::receive_multiplier   
)

Definition at line 227 of file KukaFRIalgorithm.hpp.

§ get() [11/11]

std::chrono::time_point<std::chrono::high_resolution_clock> grl::robot::arm::get ( const FRIMonitoringMessage &  monitoringMsg,
const std::chrono::time_point< std::chrono::high_resolution_clock >   
)

Definition at line 236 of file KukaFRIalgorithm.hpp.

§ update_state()

template<typename LowLevelStepAlgorithmType = LinearInterpolation>
void grl::robot::arm::update_state ( boost::asio::ip::udp::socket &  socket,
LowLevelStepAlgorithmType &  step_alg,
KUKA::FRI::ClientData &  friData,
boost::system::error_code &  receive_ec,
std::size_t &  receive_bytes_transferred,
boost::system::error_code &  send_ec,
std::size_t &  send_bytes_transferred,
boost::asio::ip::udp::endpoint  sender_endpoint = boost::asio::ip::udp::endpoint() 
)

Actually talk over the network to receive an update and send out a new KUKA FRI command.

Receives an update, performs the necessary checks, then sends a message if appropriate.

Precondition
socket must already have the endpoint resolved and "connected". While udp is technically stateless the asio socket supports the connection api components for convenience.

Definition at line 341 of file KukaFRIdriver.hpp.

Variable Documentation

§ KUKA_LBR_IIWA_14_R820

constexpr auto grl::robot::arm::KUKA_LBR_IIWA_14_R820 = "KUKA_LBR_IIWA_14_R820"

Definition at line 121 of file Kuka.hpp.

§ KUKA_LBR_IIWA_7_R800

constexpr auto grl::robot::arm::KUKA_LBR_IIWA_7_R800 = "KUKA_LBR_IIWA_7_R800"

Definition at line 122 of file Kuka.hpp.