#include <KukaJAVAdriver.hpp>
Classes | |
struct | JointStateTag |
Public Types | |
typedef std::vector< double > | JointScalar |
enum | JointStateIndex { JointPosition, JointForce, JointTargetPosition, JointLowerPositionLimit, JointUpperPositionLimit, JointMatrix, JointStateTagIndex } |
enum | ParamIndex { RobotName, RobotModel, LocalUDPAddress, LocalUDPPort, RemoteUDPAddress, LocalHostKukaKoniUDPAddress, LocalHostKukaKoniUDPPort, RemoteHostKukaKoniUDPAddress, RemoteHostKukaKoniUDPPort, KukaCommandMode, KukaMonitorMode } |
typedef std::tuple< std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string > | Params |
typedef std::tuple< JointScalar, JointScalar, JointScalar, JointScalar, JointScalar, TransformationMatrices, JointStateTag > | State |
typedef std::vector< TransformationMatrix > | TransformationMatrices |
typedef std::array< double, 12 > | TransformationMatrix |
Public Member Functions | |
void | construct () |
void | construct (Params params) |
bool | destruct () |
shuts down the arm More... | |
KukaState::time_point_type | get (time_point_tag) |
Get the timestamp of the most recent armState. More... | |
void | get (KukaState &state) |
const Params & | getParams () |
void | getWrench (KukaState &state) |
KukaJAVAdriver (Params params=defaultParams()) | |
bool | run_one () |
SEND COMMAND TO ARM. Call this often Performs the main update spin once. More... | |
template<typename Range > | |
void | set (Range &&range, grl::revolute_joint_angle_open_chain_command_tag) |
Set the joint positions for the current interpolation step. More... | |
void | set (flatbuffer::KUKAiiwaInterface cif, command_tag) |
set the interface over which commands are sent (FRI interface, alternately SmartServo/DirectServo == JAVA interface, ) More... | |
void | set (flatbuffer::KUKAiiwaInterface mif, state_tag) |
set the interface over which state is monitored (FRI interface, alternately SmartServo/DirectServo == JAVA interface, ) More... | |
template<typename TimeDuration > | |
void | set (TimeDuration &&duration_to_goal_command, time_duration_command_tag) |
Set the time duration expected between new position commands. More... | |
template<typename Range > | |
void | set (Range &&range, grl::revolute_joint_torque_open_chain_command_tag) |
Set the applied joint torques for the current interpolation step. More... | |
template<typename Range > | |
void | set (Range &&range, grl::cartesian_wrench_command_tag) |
Set the applied wrench vector of the current interpolation step. More... | |
void | set (const flatbuffer::ArmState &armControlMode) |
~KukaJAVAdriver () | |
Static Public Member Functions | |
static const Params | defaultParams () |
Public Attributes | |
volatile std::size_t | m_attemptedCommunicationConsecutiveFailureCount = 0 |
volatile std::size_t | m_attemptedCommunicationConsecutiveSuccessCount = 0 |
volatile std::size_t | m_attemptedCommunicationCount = 0 |
volatile std::size_t | m_haveReceivedRealDataCount = 0 |
This class contains code to offer a simple communication layer between ROS and the KUKA LBR iiwa
Initally:
Definition at line 90 of file KukaJAVAdriver.hpp.
typedef std::vector<double> grl::robot::arm::KukaJAVAdriver::JointScalar |
Definition at line 154 of file KukaJAVAdriver.hpp.
typedef std::tuple< std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string > grl::robot::arm::KukaJAVAdriver::Params |
Definition at line 119 of file KukaJAVAdriver.hpp.
typedef std::tuple< JointScalar, JointScalar, JointScalar, JointScalar, JointScalar, TransformationMatrices, JointStateTag > grl::robot::arm::KukaJAVAdriver::State |
Definition at line 169 of file KukaJAVAdriver.hpp.
typedef std::vector<TransformationMatrix> grl::robot::arm::KukaJAVAdriver::TransformationMatrices |
Definition at line 158 of file KukaJAVAdriver.hpp.
typedef std::array<double,12> grl::robot::arm::KukaJAVAdriver::TransformationMatrix |
Definition at line 157 of file KukaJAVAdriver.hpp.
Enumerator | |
---|---|
JointPosition | |
JointForce | |
JointTargetPosition | |
JointLowerPositionLimit | |
JointUpperPositionLimit | |
JointMatrix | |
JointStateTagIndex |
Definition at line 143 of file KukaJAVAdriver.hpp.
Definition at line 93 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 172 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 237 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 176 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 180 of file KukaJAVAdriver.hpp.
|
inlinestatic |
Definition at line 122 of file KukaJAVAdriver.hpp.
|
inline |
shuts down the arm
Definition at line 232 of file KukaJAVAdriver.hpp.
|
inline |
Get the timestamp of the most recent armState.
Definition at line 500 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 555 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 227 of file KukaJAVAdriver.hpp.
|
inline |
Definition at line 561 of file KukaJAVAdriver.hpp.
|
inline |
SEND COMMAND TO ARM. Call this often Performs the main update spin once.
Definition at line 246 of file KukaJAVAdriver.hpp.
|
inline |
Set the joint positions for the current interpolation step.
This method is only effective when the robot is in a commanding state and the set time point for reaching the destination is in the future. This function sets the goal time point for a motion to the epoch, aka "time 0" (which is in the past) for safety.
For position based motion to work, you must set both the position you want and the time you want it to get there. This is required because the robot can move extremely fast, so accidentally setting the velocity to the max is very dangerous. If the time point is in the past, the robot will not move. If the time point is too near in the future to make it, the robot will move at the max speed towards that position.
state | Object which stores the current state of the robot, including the command to send next |
range | Array with the new joint positions (in radians) |
tag | identifier object indicating that revolute joint angle commands should be modified |
Definition at line 447 of file KukaJAVAdriver.hpp.
|
inline |
set the interface over which commands are sent (FRI interface, alternately SmartServo/DirectServo == JAVA interface, )
Definition at line 457 of file KukaJAVAdriver.hpp.
|
inline |
set the interface over which state is monitored (FRI interface, alternately SmartServo/DirectServo == JAVA interface, )
Definition at line 465 of file KukaJAVAdriver.hpp.
|
inline |
Set the time duration expected between new position commands.
The driver will likely be updated every so often, such as every 25ms, and the lowest level of the driver may update even more frequently, such as every 1ms. By providing as accurate an estimate between high level updates the low level driver can smooth out the motion through interpolation (the default), or another algorithm. See LowLevelStepAlgorithmType template parameter in the KukaFRIdriver class if you want to change out the low level algorithm.
duration_to_goal_command | std::chrono time format representing the time duration between updates |
Definition at line 485 of file KukaJAVAdriver.hpp.
|
inline |
Set the applied joint torques for the current interpolation step.
This method is only effective when the client is in a commanding state. The ControlMode of the robot has to be joint impedance control mode. The Client Command Mode has to be torque.
state | Object which stores the current state of the robot, including the command to send next |
torques | Array with the applied torque values (in Nm) |
tag | identifier object indicating that the torqe value command should be modified |
Definition at line 519 of file KukaJAVAdriver.hpp.
|
inline |
Set the applied wrench vector of the current interpolation step.
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.
This method is only effective when the client is in a commanding state. The ControlMode of the robot has to be Cartesian impedance control mode. The Client Command Mode has to be wrench.
state | object storing the command data that will be sent to the physical device |
range | wrench Applied Cartesian wrench vector, in x, y, z, roll, pitch, yaw force measurments. |
tag | identifier object indicating that the wrench value command should be modified |
Definition at line 548 of file KukaJAVAdriver.hpp.
|
inline |
set the mode of the arm. Examples: Teach or MoveArmJointServo
Definition at line 571 of file KukaJAVAdriver.hpp.
volatile std::size_t grl::robot::arm::KukaJAVAdriver::m_attemptedCommunicationConsecutiveFailureCount = 0 |
Definition at line 423 of file KukaJAVAdriver.hpp.
volatile std::size_t grl::robot::arm::KukaJAVAdriver::m_attemptedCommunicationConsecutiveSuccessCount = 0 |
Definition at line 424 of file KukaJAVAdriver.hpp.
volatile std::size_t grl::robot::arm::KukaJAVAdriver::m_attemptedCommunicationCount = 0 |
Definition at line 422 of file KukaJAVAdriver.hpp.
volatile std::size_t grl::robot::arm::KukaJAVAdriver::m_haveReceivedRealDataCount = 0 |
Definition at line 421 of file KukaJAVAdriver.hpp.