Flexiv RDK APIs  1.5
Public Member Functions | List of all members
flexiv::rdk::WorkCoord Class Reference

Interface to online update and interact with the robot's work coordinates. All updates will take effect immediately without a power cycle. However, the robot must be in IDLE mode when applying changes. More...

#include <work_coord.hpp>

Public Member Functions

 WorkCoord (const Robot &robot)
 [Non-blocking] Create an instance and initialize the interface. More...
 
const std::vector< std::string > list () const
 [Blocking] Get a name list of all configured work coordinates. More...
 
bool exist (const std::string &name) const
 [Blocking] Whether the specified work coordinate already exists. More...
 
const std::array< double, kPoseSize > pose (const std::string &name) const
 [Blocking] Get pose of an existing work coordinate. More...
 
void Add (const std::string &name, const std::array< double, kPoseSize > &pose)
 [Blocking] Add a new work coordinate with user-specified parameters. More...
 
void Update (const std::string &name, const std::array< double, kPoseSize > &pose)
 [Blocking] Update the pose of an existing work coordinate. More...
 
void Remove (const std::string &name)
 [Blocking] Remove an existing work coordinate. More...
 

Detailed Description

Interface to online update and interact with the robot's work coordinates. All updates will take effect immediately without a power cycle. However, the robot must be in IDLE mode when applying changes.

Definition at line 20 of file work_coord.hpp.

Constructor & Destructor Documentation

◆ WorkCoord()

flexiv::rdk::WorkCoord::WorkCoord ( const Robot robot)

[Non-blocking] Create an instance and initialize the interface.

Parameters
[in]robotReference to the instance of flexiv::rdk::Robot.
Exceptions
std::runtime_errorif the initialization sequence failed.

Member Function Documentation

◆ Add()

void flexiv::rdk::WorkCoord::Add ( const std::string &  name,
const std::array< double, kPoseSize > &  pose 
)

[Blocking] Add a new work coordinate with user-specified parameters.

Parameters
[in]nameName of the new work coordinate, must be unique.
[in]posePose of the new work coordinate in world frame: \( ^{O}T_{work} \in \mathbb{R}^{7 \times 1} \). Consists of \( \mathbb{R}^{3 \times 1} \) position and \( \mathbb{R}^{4 \times 1} \) quaternion: \( [x, y, z, q_w, q_x, q_y, q_z]^T \). Unit: \( [m]:[] \).
Exceptions
std::logic_errorif robot is not in the correct control mode or the specified work coordinate already exists.
std::runtime_errorif failed to deliver the request to the connected robot.
Note
Applicable control modes: IDLE.
This function blocks until the request is successfully delivered.

◆ exist()

bool flexiv::rdk::WorkCoord::exist ( const std::string &  name) const

[Blocking] Whether the specified work coordinate already exists.

Parameters
[in]nameName of the tool to check.
Returns
True if the specified tool exists.
Exceptions
std::runtime_errorif failed to get a reply from the connected robot.
Note
This function blocks until a reply is received.

◆ list()

const std::vector<std::string> flexiv::rdk::WorkCoord::list ( ) const

[Blocking] Get a name list of all configured work coordinates.

Returns
Work coordinate names as a string list.
Exceptions
std::runtime_errorif failed to get a reply from the connected robot.
Note
This function blocks until a reply is received.

◆ pose()

const std::array<double, kPoseSize> flexiv::rdk::WorkCoord::pose ( const std::string &  name) const

[Blocking] Get pose of an existing work coordinate.

Parameters
[in]nameName of the work coordinate to get pose for, must be an existing one.
Returns
Pose of the work coordinate in world frame: \( ^{O}T_{work} \in \mathbb{R}^{7 \times 1} \). Consists of \( \mathbb{R}^{3 \times 1} \) position and \( \mathbb{R}^{4 \times 1} \) quaternion: \( [x, y, z, q_w, q_x, q_y, q_z]^T \). Unit: \( [m]:[] \).
Exceptions
std::runtime_errorif failed to get a reply from the connected robot.
Note
This function blocks until a reply is received.

◆ Remove()

void flexiv::rdk::WorkCoord::Remove ( const std::string &  name)

[Blocking] Remove an existing work coordinate.

Parameters
[in]nameName of the work coordinate to remove, must be an existing one.
Exceptions
std::logic_errorif robot is not in the correct control mode or the specified work coordinate does not exist.
std::runtime_errorif failed to deliver the request to the connected robot.
Note
Applicable control modes: IDLE.
This function blocks until the request is successfully delivered.

◆ Update()

void flexiv::rdk::WorkCoord::Update ( const std::string &  name,
const std::array< double, kPoseSize > &  pose 
)

[Blocking] Update the pose of an existing work coordinate.

Parameters
[in]nameName of the work coordinate to update, must be an existing one.
[in]poseNew pose for the specified work coordinate in world frame: \( ^{O}T_{work} \in \mathbb{R}^{7 \times 1} \). Consists of \( \mathbb{R}^{3 \times 1} \) position and \( \mathbb{R}^{4 \times 1} \) quaternion: \( [x, y, z, q_w, q_x, q_y, q_z]^T \). Unit: \( [m]:[] \).
Exceptions
std::logic_errorif robot is not in the correct control mode or the specified work coordinate does not exist.
std::runtime_errorif failed to deliver the request to the connected robot.
Note
Applicable control modes: IDLE.
This function blocks until the request is successfully delivered.

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