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>
|
| 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...
|
|
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.
◆ WorkCoord()
flexiv::rdk::WorkCoord::WorkCoord |
( |
const Robot & |
robot | ) |
|
[Non-blocking] Create an instance and initialize the interface.
- Parameters
-
- Exceptions
-
std::runtime_error | if the initialization sequence failed. |
◆ 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] | name | Name of the new work coordinate, must be unique. |
[in] | pose | Pose 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_error | if robot is not in the correct control mode or the specified work coordinate already exists. |
std::runtime_error | if 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] | name | Name of the tool to check. |
- Returns
- True if the specified tool exists.
- Exceptions
-
std::runtime_error | if 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_error | if 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] | name | Name 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_error | if 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] | name | Name of the work coordinate to remove, must be an existing one. |
- Exceptions
-
std::logic_error | if robot is not in the correct control mode or the specified work coordinate does not exist. |
std::runtime_error | if 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] | name | Name of the work coordinate to update, must be an existing one. |
[in] | pose | New 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_error | if robot is not in the correct control mode or the specified work coordinate does not exist. |
std::runtime_error | if 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: