Interface to online update and interact with the robot tools. All changes made to the robot tool system will take effect immediately without needing to reboot. However, the robot must be put into IDLE mode when making these changes.
More...
#include <tool.hpp>
|
| Tool (const Robot &robot) |
| [Non-blocking] Create an instance and initialize tool update interface. More...
|
|
const std::vector< std::string > | list () const |
| [Blocking] Get a name list of all tools currently in the tools pool. More...
|
|
const std::string | name () const |
| [Blocking] Get name of the tool that the robot is currently using. More...
|
|
bool | exist (const std::string &name) const |
| [Blocking] Whether the specified tool exists in the tools pool. More...
|
|
const ToolParams | params () const |
| [Blocking] Get parameters of the tool that the robot is currently using. More...
|
|
const ToolParams | params (const std::string &name) const |
| [Blocking] Get parameters of an existing tool. More...
|
|
void | Add (const std::string &name, const ToolParams ¶ms) |
| [Blocking] Add a new tool with user-specified parameters to the tools pool. More...
|
|
void | Switch (const std::string &name) |
| [Blocking] Switch to an existing tool. All following robot operations will default to use this tool. More...
|
|
void | Update (const std::string &name, const ToolParams ¶ms) |
| [Blocking] Update the parameters of an existing tool. More...
|
|
void | Remove (const std::string &name) |
| [Blocking] Remove an existing tool. More...
|
|
Interface to online update and interact with the robot tools. All changes made to the robot tool system will take effect immediately without needing to reboot. However, the robot must be put into IDLE mode when making these changes.
- Examples
- basics8_update_robot_tool.cpp.
Definition at line 20 of file tool.hpp.
◆ Tool()
flexiv::rdk::Tool::Tool |
( |
const Robot & |
robot | ) |
|
[Non-blocking] Create an instance and initialize tool update interface.
- Parameters
-
- Exceptions
-
std::runtime_error | if the initialization sequence failed. |
◆ Add()
void flexiv::rdk::Tool::Add |
( |
const std::string & |
name, |
|
|
const ToolParams & |
params |
|
) |
| |
[Blocking] Add a new tool with user-specified parameters to the tools pool.
- Parameters
-
[in] | name | Name of the new tool, must be unique. |
[in] | params | Parameters of the new tool. |
- Exceptions
-
std::logic_error | if robot is not in the correct control mode. |
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::Tool::exist |
( |
const std::string & |
name | ) |
const |
[Blocking] Whether the specified tool exists in the tools pool.
- 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::Tool::list |
( |
| ) |
const |
[Blocking] Get a name list of all tools currently in the tools pool.
- Returns
- Tool names in the format of 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.
◆ name()
const std::string flexiv::rdk::Tool::name |
( |
| ) |
const |
[Blocking] Get name of the tool that the robot is currently using.
- Returns
- Name of the current tool. Return "Flange" if there's no active tool.
- Exceptions
-
std::runtime_error | if failed to get a reply from the connected robot. |
- Note
- Applicable control modes: All.
-
This function blocks until a reply is received.
◆ params() [1/2]
const ToolParams flexiv::rdk::Tool::params |
( |
| ) |
const |
[Blocking] Get parameters of the tool that the robot is currently using.
- Returns
- Parameters result.
- Exceptions
-
std::runtime_error | if failed to get a reply from the connected robot. |
- Note
- Applicable control modes: All.
-
This function blocks until a reply is received.
◆ params() [2/2]
const ToolParams flexiv::rdk::Tool::params |
( |
const std::string & |
name | ) |
const |
[Blocking] Get parameters of an existing tool.
- Parameters
-
[in] | name | Name of the tool to get parameters for, must exist in the tools pool. |
- Returns
- Parameters result.
- Exceptions
-
std::runtime_error | if failed to get a reply from the connected robot. |
- Note
- Applicable control modes: All.
-
This function blocks until a reply is received.
◆ Remove()
void flexiv::rdk::Tool::Remove |
( |
const std::string & |
name | ) |
|
[Blocking] Remove an existing tool.
- Parameters
-
[in] | name | Name of the tool to remove, must exist in the tools pool. |
- Exceptions
-
std::logic_error | if robot is not in the correct control mode. |
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.
◆ Switch()
void flexiv::rdk::Tool::Switch |
( |
const std::string & |
name | ) |
|
[Blocking] Switch to an existing tool. All following robot operations will default to use this tool.
- Parameters
-
[in] | name | Name of the tool to switch to, must exist in the tools pool. |
- Exceptions
-
std::logic_error | if robot is not in the correct control mode. |
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::Tool::Update |
( |
const std::string & |
name, |
|
|
const ToolParams & |
params |
|
) |
| |
[Blocking] Update the parameters of an existing tool.
- Parameters
-
[in] | name | Name of the tool to update, must exist in the tools pool. |
[in] | params | New parameters for the specified tool. |
- Exceptions
-
std::logic_error | if robot is not in the correct control mode. |
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: