Flexiv RDK APIs  2.1
Classes | Typedefs | Enumerations | Functions | Variables
data.hpp File Reference

Header file containing various constant expressions, data structures, and enums. More...

#include <array>
#include <vector>
#include <string>
#include <ostream>
#include <variant>
#include <chrono>
#include <map>
Include dependency graph for data.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  flexiv::rdk::RobotEvent
 Information about a robot event. More...
 
struct  flexiv::rdk::RobotInfo
 General information about the connected robot. More...
 
struct  flexiv::rdk::RobotStates
 Robot states data in joint and Cartesian space for a joint group. More...
 
struct  flexiv::rdk::RobotActions
 Robot actions data in joint and Cartesian space for a joint group. More...
 
struct  flexiv::rdk::PlanInfo
 Information of the on-going primitive/plan. More...
 
struct  flexiv::rdk::JPos
 Data structure representing the customized data type "JPOS" in Flexiv Elements. More...
 
struct  flexiv::rdk::Coord
 Data structure representing the customized data type "COORD" in Flexiv Elements. More...
 
struct  flexiv::rdk::PrimitiveArgs
 Arguments of a primitive command. More...
 
struct  flexiv::rdk::PrimitiveStates
 States data of a primitive. More...
 
struct  flexiv::rdk::RtJointTorqueCmd
 Commands data for real-time joint torque control. More...
 
struct  flexiv::rdk::RtJointPositionCmd
 Commands data for real-time joint position control. More...
 
struct  flexiv::rdk::NrtJointPositionCmd
 Commands data for non-real-time joint position control. More...
 
struct  flexiv::rdk::RtCartesianCmd
 Commands data for real-time Cartesian motion-force control. More...
 
struct  flexiv::rdk::NrtCartesianCmd
 Commands data for non-real-time Cartesian motion-force control. More...
 
struct  flexiv::rdk::NrtCartesianMultiWaypointCmd
 Commands data for non-real-time Cartesian multi-waypoint motion-force control. More...
 

Typedefs

using flexiv::rdk::FlexivDataTypes = std::variant< int, double, std::string, rdk::JPos, rdk::Coord, std::vector< int >, std::vector< double >, std::vector< std::string >, std::vector< rdk::JPos >, std::vector< rdk::Coord > >
 

Enumerations

enum class  flexiv::rdk::ProductModel {
  UNKNOWN = 0 , Enlight_L , Enlight_LL , MICO_Core ,
  MICO_Plus , MICO_Ultra
}
 All supported product models of the robot. More...
 
enum class  flexiv::rdk::JointGroup {
  UNKNOWN = -1 , ALL = 0 , ARMS = 2 , ARM_1 = 3 ,
  ARM_2 = 4 , EXT_AXIS = 5 , FIRST = ALL , LAST = EXT_AXIS
}
 All possible joint groups of the robot. More...
 
enum class  flexiv::rdk::OperationalStatus {
  UNKNOWN = 0 , READY , BOOTING , ESTOP_NOT_RELEASED ,
  NOT_SERVO_ON , RELEASING_BRAKE , MINOR_FAULT , CRITICAL_FAULT ,
  IN_REDUCED_STATE , IN_RECOVERY_STATE , IN_MANUAL_MODE , IN_AUTO_MODE
}
 All possible operational statuses of the robot. Except for the first two, the other enumerators indicate the cause of the robot being not ready to operate. More...
 
enum class  flexiv::rdk::CoordType { WORLD , TCP }
 Type of commonly-used reference coordinates. More...
 
enum class  flexiv::rdk::SyncMotionMode { DISABLE = 0 , ARM1_TCP = 1 , ARM2_TCP = 2 , POSITIONER = 3 }
 Modes for synchronous motions. More...
 

Functions

std::ostream & flexiv::rdk::operator<< (std::ostream &ostream, const RobotEvent &robot_event)
 Operator overloading to out stream all members of RobotEvent in JSON format. More...
 
std::ostream & flexiv::rdk::operator<< (std::ostream &ostream, const RobotInfo &robot_info)
 Operator overloading to out stream all members of RobotInfo in JSON format. More...
 
std::ostream & flexiv::rdk::operator<< (std::ostream &ostream, const RobotStates &robot_states)
 Operator overloading to out stream all members of RobotStates in JSON format. More...
 
std::ostream & flexiv::rdk::operator<< (std::ostream &ostream, const RobotActions &robot_actions)
 Operator overloading to out stream all members of RobotActions in JSON format. More...
 
std::ostream & flexiv::rdk::operator<< (std::ostream &ostream, const PlanInfo &plan_info)
 Operator overloading to out stream all members of PlanInfo in JSON format. More...
 

Variables

constexpr size_t flexiv::rdk::kCartDoF = 6
 
constexpr size_t flexiv::rdk::kSerialJointDoF = 7
 
constexpr size_t flexiv::rdk::kPoseSize = 7
 
constexpr size_t flexiv::rdk::kIOPorts = 16 + 2 * 2
 
constexpr size_t flexiv::rdk::kMaxExtAxes = 6
 
const std::map< ProductModel, std::string > flexiv::rdk::kProductModelNames
 
const std::map< JointGroup, std::string > flexiv::rdk::kJointGroupNames
 
const std::map< OperationalStatus, std::string > flexiv::rdk::kOpStatusNames
 

Detailed Description

Header file containing various constant expressions, data structures, and enums.

Definition in file data.hpp.

Typedef Documentation

◆ FlexivDataTypes

using flexiv::rdk::FlexivDataTypes = typedef std::variant<int, double, std::string, rdk::JPos, rdk::Coord, std::vector<int>, std::vector<double>, std::vector<std::string>, std::vector<rdk::JPos>, std::vector<rdk::Coord> >

Alias of the variant that holds all possible types of data exchanged with Flexiv robots

Definition at line 553 of file data.hpp.

Enumeration Type Documentation

◆ CoordType

Type of commonly-used reference coordinates.

Enumerator
WORLD 

World frame (fixed).

TCP 

TCP frame (move with the robot's end effector).

Examples
intermediate6_realtime_cartesian_motion_force_control.cpp.

Definition at line 120 of file data.hpp.

◆ JointGroup

All possible joint groups of the robot.

Enumerator
UNKNOWN 

Unknown group.

ALL 

The full system, including all actuated joints.

ARMS 

The dual arms as a whole, only applicable to dual-arm robots.

ARM_1 

The 1st single arm in a dual-arm robot or the only arm in a single-arm robot.

ARM_2 

The 2nd single arm in a dual-arm robot, not applicable to single-arm robots.

EXT_AXIS 

External axis(es) for workspace extension.

Examples
intermediate1_realtime_joint_position_control.cpp, intermediate2_realtime_joint_impedance_control.cpp, intermediate3_realtime_joint_torque_control.cpp, intermediate5_realtime_cartesian_pure_motion_control.cpp, and intermediate6_realtime_cartesian_motion_force_control.cpp.

Definition at line 57 of file data.hpp.

◆ OperationalStatus

All possible operational statuses of the robot. Except for the first two, the other enumerators indicate the cause of the robot being not ready to operate.

See also
Robot::operational_status().
Enumerator
UNKNOWN 

Unknown status.

READY 

Ready to be operated.

BOOTING 

System still booting, please wait.

ESTOP_NOT_RELEASED 

E-Stop is not released.

NOT_SERVO_ON 

Not servo on, call ServoOn() to send the signal.

RELEASING_BRAKE 

Brake release in progress, please wait.

MINOR_FAULT 

Minor fault occurred, call ClearFault() to try clearing it.

CRITICAL_FAULT 

Critical fault occurred, call ClearFault() to try clearing it.

IN_REDUCED_STATE 

In reduced state, see reduced().

IN_RECOVERY_STATE 

In recovery state, see recovery().

IN_MANUAL_MODE 

In Manual mode, need to switch to Auto (Remote) mode.

IN_AUTO_MODE 

In regular Auto mode, need to switch to Auto (Remote) mode.

Definition at line 85 of file data.hpp.

◆ ProductModel

All supported product models of the robot.

Enumerator
Enlight_LL 

Enlight-L standard version.

MICO_Core 

Enlight-LL: Dual Enlight-L with customizable mounting poses.

MICO_Plus 

MICO-Core: Dual Enlight-L with fixed-mounting upper body.

MICO_Ultra 

MICO-Plus: MICO-Core with pan-tilt torso.

Definition at line 38 of file data.hpp.

◆ SyncMotionMode

Modes for synchronous motions.

See also
PrimitiveArgs::sync_motion_mode
Enumerator
DISABLE 

Don't sync with any target.

ARM1_TCP 

Sync with arm1 tcp.

ARM2_TCP 

sync with arm2 tcp

POSITIONER 

sync with positioner

Definition at line 544 of file data.hpp.

Function Documentation

◆ operator<<() [1/5]

std::ostream& flexiv::rdk::operator<< ( std::ostream &  ostream,
const PlanInfo plan_info 
)

Operator overloading to out stream all members of PlanInfo in JSON format.

Parameters
[in]ostreamOstream instance.
[in]plan_infoPlanInfo data structure to out stream.
Returns
Updated ostream instance.

◆ operator<<() [2/5]

std::ostream& flexiv::rdk::operator<< ( std::ostream &  ostream,
const RobotActions robot_actions 
)

Operator overloading to out stream all members of RobotActions in JSON format.

Parameters
[in]ostreamOstream instance.
[in]robot_actionsRobotActions data structure to out stream.
Returns
Updated ostream instance.

◆ operator<<() [3/5]

std::ostream& flexiv::rdk::operator<< ( std::ostream &  ostream,
const RobotEvent robot_event 
)

Operator overloading to out stream all members of RobotEvent in JSON format.

Parameters
[in]ostreamOstream instance.
[in]robot_eventRobotEvent data structure to out stream.
Returns
Updated ostream instance.
Note
The event timestamp is converted to local timezone when printed.

◆ operator<<() [4/5]

std::ostream& flexiv::rdk::operator<< ( std::ostream &  ostream,
const RobotInfo robot_info 
)

Operator overloading to out stream all members of RobotInfo in JSON format.

Parameters
[in]ostreamOstream instance.
[in]robot_infoRobotInfo data structure to out stream.
Returns
Updated ostream instance.

◆ operator<<() [5/5]

std::ostream& flexiv::rdk::operator<< ( std::ostream &  ostream,
const RobotStates robot_states 
)

Operator overloading to out stream all members of RobotStates in JSON format.

Parameters
[in]ostreamOstream instance.
[in]robot_statesRobotStates data structure to out stream.
Returns
Updated ostream instance.

Variable Documentation

◆ kCartDoF

constexpr size_t flexiv::rdk::kCartDoF = 6
constexpr

Cartesian-space degrees of freedom

Definition at line 20 of file data.hpp.

◆ kIOPorts

constexpr size_t flexiv::rdk::kIOPorts = 16 + 2 * 2
constexpr

Number of digital IO ports: 16 on the control box + 2 in each wrist connector * maximum 2 wrists

Definition at line 30 of file data.hpp.

◆ kJointGroupNames

const std::map<JointGroup, std::string> flexiv::rdk::kJointGroupNames
inline

◆ kMaxExtAxes

constexpr size_t flexiv::rdk::kMaxExtAxes = 6
constexpr

Maximum number of external axes

Definition at line 33 of file data.hpp.

◆ kOpStatusNames

const std::map<OperationalStatus, std::string> flexiv::rdk::kOpStatusNames
inline
Initial value:
{
{OperationalStatus::UNKNOWN, "Unknown status"},
{OperationalStatus::READY, "Ready"},
{OperationalStatus::BOOTING, "System booting"},
{OperationalStatus::ESTOP_NOT_RELEASED, "E-Stop not released"},
{OperationalStatus::NOT_SERVO_ON, "Not servo on"},
{OperationalStatus::RELEASING_BRAKE, "Releasing brakes"},
{OperationalStatus::MINOR_FAULT, "Minor fault occurred"},
{OperationalStatus::CRITICAL_FAULT, "Critical fault occurred"},
{OperationalStatus::IN_REDUCED_STATE, "In reduced state"},
{OperationalStatus::IN_RECOVERY_STATE, "In recovery state"},
{OperationalStatus::IN_MANUAL_MODE, "In Manual mode"},
{OperationalStatus::IN_AUTO_MODE, "In regular Auto mode"},
}

Map OperationalStatus enums to strings

Definition at line 102 of file data.hpp.

◆ kPoseSize

constexpr size_t flexiv::rdk::kPoseSize = 7
constexpr

Size of pose array (3 position + 4 quaternion)

Definition at line 26 of file data.hpp.

◆ kProductModelNames

const std::map<ProductModel, std::string> flexiv::rdk::kProductModelNames
inline
Initial value:
= {{ProductModel::UNKNOWN, "UNKNOWN"}, {ProductModel::Enlight_L, "Enlight-L"},
{ProductModel::Enlight_LL, "Enlight-LL"}, {ProductModel::MICO_Core, "MICO-Core"},
{ProductModel::MICO_Plus, "MICO-Plus"}, {ProductModel::MICO_Ultra, "MICO-Ultra"}}

Map ProductModel enums to strings

Definition at line 49 of file data.hpp.

◆ kSerialJointDoF

constexpr size_t flexiv::rdk::kSerialJointDoF = 7
constexpr

Joint-space degrees of freedom of Flexiv's serial robots

Definition at line 23 of file data.hpp.