Flexiv RDK APIs  1.5.1
Public Member Functions | Public Attributes | List of all members
flexiv::rdk::Coord Struct Reference

Data structure representing the customized data type "COORD" in Flexiv Elements. More...

#include <data.hpp>

Public Member Functions

 Coord (const std::array< double, kCartDoF/2 > &_position, const std::array< double, kCartDoF/2 > &_orientation, const std::array< std::string, 2 > &_ref_frame, const std::array< double, kSerialJointDoF > &_ref_q={}, const std::array< double, kMaxExtAxes > &_ref_q_e={})
 Construct an instance of Coord. More...
 
std::string str () const
 

Public Attributes

std::array< double, kCartDoF/2 > position = {}
 
std::array< double, kCartDoF/2 > orientation = {}
 
std::array< std::string, 2 > ref_frame = {}
 
std::array< double, kSerialJointDoF > ref_q = {}
 
std::array< double, kMaxExtAxes > ref_q_e = {}
 

Detailed Description

Data structure representing the customized data type "COORD" in Flexiv Elements.

Warning
Here [m] is used as the unit of length, whereas [mm] is used in Flexiv Elements. The conversion is automatically done when exchanging "COORD" data type with the robot via functions like Robot::ExecutePrimitive(), Robot::SetGlobalVariables(), Robot::global_variables(), etc.

Definition at line 380 of file data.hpp.

Constructor & Destructor Documentation

◆ Coord()

flexiv::rdk::Coord::Coord ( const std::array< double, kCartDoF/2 > &  _position,
const std::array< double, kCartDoF/2 > &  _orientation,
const std::array< std::string, 2 > &  _ref_frame,
const std::array< double, kSerialJointDoF > &  _ref_q = {},
const std::array< double, kMaxExtAxes > &  _ref_q_e = {} 
)
inline

Construct an instance of Coord.

Parameters
[in]_positionSets struct member [position].
[in]_orientationSets struct member [orientation].
[in]_ref_frameSets struct member [ref_frame].
[in]_ref_qSets struct member [ref_q]. Leave empty to use default values.
[in]_ref_q_eSets struct member [ref_q_e]. Leave empty if there's no external axis.

Definition at line 390 of file data.hpp.

Member Function Documentation

◆ str()

std::string flexiv::rdk::Coord::str ( ) const

String representation of all data in the struct, separated by space

Member Data Documentation

◆ orientation

std::array<double, kCartDoF / 2> flexiv::rdk::Coord::orientation = {}

Orientation in terms of Euler angles in [ref_frame]. Unit: [degree]

Definition at line 408 of file data.hpp.

◆ position

std::array<double, kCartDoF / 2> flexiv::rdk::Coord::position = {}

Position in [ref_frame]. Unit: [m]

Definition at line 405 of file data.hpp.

◆ ref_frame

std::array<std::string, 2> flexiv::rdk::Coord::ref_frame = {}

Name of the reference frame "root::branch" represented as {"root", "branch"}. Refer to Flexiv Elements for available options. Some common ones are:

  • World origin: {"WORLD", "WORLD_ORIGIN"}
  • Current pose: {"TRAJ", "START"}
  • A work coordinate: {"WORK", "WorkCoord0"}
  • A global variable: {"GVAR", "MyCoord0"}

Definition at line 417 of file data.hpp.

◆ ref_q

std::array<double, kSerialJointDoF> flexiv::rdk::Coord::ref_q = {}

Reference joint positions of the arm. Only effective on robots with redundant degrees of freedom. Unit: [degree]

Note
Leave empty to use default values. However, this array cannot be empty if [ref_q_e] has values

Definition at line 423 of file data.hpp.

◆ ref_q_e

std::array<double, kMaxExtAxes> flexiv::rdk::Coord::ref_q_e = {}

Reference joint positions (linear or angular) of the external axes. Only effective on robots with redundant degrees of freedom and external axes. Unit: [m] or [degree]

Note
If the number of external axes \( n_e < kMaxExtAxes \), set the first \( n_e \) elements and leave the rest 0. Leave the whole array empty if there's no external axis.

Definition at line 429 of file data.hpp.


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