Flexiv RDK APIs  1.5
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_joint_positions={}, const std::array< double, kMaxExtAxes > &_ext_axis_positions={})
 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_joint_positions = {}
 
std::array< double, kMaxExtAxes > ext_axis_positions = {}
 

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 346 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_joint_positions = {},
const std::array< double, kMaxExtAxes > &  _ext_axis_positions = {} 
)
inline

Construct an instance of Coord.

Parameters
[in]_positionSets the [position] member.
[in]_orientationSets the [orientation] member.
[in]_ref_frameSets the [ref_frame] member.
[in]_ref_joint_positionsSets the [ref_joint_positions] member. Leave empty to use default values.
[in]_ext_axis_positionsSets the [ext_axis_positions] member. Leave empty if there's no external axis.

Definition at line 358 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

◆ ext_axis_positions

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

Linear or angular positions of the external axes. Unit: [m] or [degree]

Note
Leave empty if there's no external axis.

Definition at line 394 of file data.hpp.

◆ orientation

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

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

Definition at line 376 of file data.hpp.

◆ position

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

Position in [ref_frame]. Unit: [m]

Definition at line 373 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 385 of file data.hpp.

◆ ref_joint_positions

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

Reference joint positions for robot with a redundant degree of freedom. Unit: [degree]

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

Definition at line 390 of file data.hpp.


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