AUBO SDK  0.26.0
Loading...
Searching...
No Matches
arcs::common_interface::SyncMove Class Reference

#include <sync_move.h>

Public Member Functions

 SyncMove ()
 
virtual ~SyncMove ()
 
int syncMoveOn (const std::string &syncident, const TaskSet &taskset)
 syncMoveOn is used to start synchronized movement mode.
 
bool syncMoveSegment (int id)
 Set the ID for the synchronized path segment.
 
int syncMoveOff (const std::string &syncident)
 syncMoveOff is used to end synchronized movement mode.
 
int syncMoveUndo ()
 syncMoveUndo is used to turn off synchronized movements, even if not all the other task programs execute the syncMoveUndo instruction.
 
int waitSyncTasks (const std::string &syncident, const TaskSet &taskset)
 waitSyncTasks is used to synchronize several task programs at a specific point in the program.
 
bool isSyncMoveOn ()
 isSyncMoveOn is used to tell if the mechanical unit group is in synchronized movement mode.
 
int syncMoveSuspend ()
 Suspend synchronized movement mode.
 
int syncMoveResume ()
 Resume synchronized movement mode.
 
int frameAdd (const std::string &name, const std::vector< double > &pose, const std::string &ref_name)
 Add a frame with the name "name" initialized at the specified pose expressed in the ref_frame coordinate frame.
 
int frameAttach (const std::string &child, const std::string &parent)
 Attaches the child frame to the parent world model object.
 
int frameDeleteAll ()
 Delete all frames that have been added to the world model.
 
int frameDelete (const std::string &name)
 Delete the frame with name from the world model.
 
int frameMove (const std::string &name, const std::vector< double > &pose, const std::string &ref_name)
 Changes the placement of the coordinate frame named name to the new placement given by pose that is defined in the ref_name coordinate frame.
 
std::vector< double > frameGetPose (const std::string &name, const std::string &rel_frame, const std::string &ref_frame)
 Get the pose of the name frame relative to the rel_frame frame but expressed in the coordinates of the ref_frame frame.
 
std::vector< double > frameConvertPose (const std::vector< double > &pose, const std::string &from_frame, const std::string &to_frame)
 Convert pose from from_frame to to_frame.
 
bool frameExist (const std::string &name)
 Queries for the existence of a frame by the given name.
 
std::string frameGetParent (const std::string &name)
 Get the parent of the frame named name in the world model.
 
std::vector< std::string > frameGetChildren (const std::string &name)
 Returns a list of immediate child object frame names.
 
int axisGroupAdd (const std::string &name, const std::vector< double > &pose, const std::string &ref_frame)
 Adds a new axis group with the given name to the world model.
 
int axisGroupDelete (const std::string &name)
 Deletes the axis group with the given name from the world model.
 
int axisGroupAddAxis (const std::string &group_name, const std::string &name, const std::string &parent, const std::vector< double > &pose)
 Adds an external axis with the given name to the axis group named group_name.
 
int axisGroupUpdateAxis (const std::string &name, const std::vector< double > &pose)
 Updates the corresponding properties of axis with name.
 
int axisGroupGetAxisIndex (const std::string &name)
 Returns the index of the axis with given axis_name in the RTDE target positions and actual positions arrays.
 
std::string axisGroupGetAxisName (int index)
 Returns the name of the axis with the given axis_index.
 
std::vector< double > axisGroupGetTargetPositions (const std::string &group_name)
 Returns the current target positions of the axis group with group_name.
 
std::vector< double > axisGroupGetActualPositions (const std::string &group_name)
 Returns the current actual positions of the axis group with group_name.
 
int axisGroupOffsetPositions (const std::string &group_name, const std::vector< double > &offset)
 Shifts the target and actual positions of the axis group group_name by the given offset.
 
int axisGroupMoveJoint (const std::string &group_name, const std::vector< double > &q, double a, double v)
 Moves the axes of axis group named group_name to new positions q, using a trapezoidal velocity profile.
 
int axisGroupSpeedJoint (const std::string &group_name, const std::vector< double > &qd, double a, double t)
 Accelerates the axes of axis group named group_name up to the target velocities qd.
 

Protected Attributes

void * d_
 

Detailed Description

Definition at line 37 of file sync_move.h.

Constructor & Destructor Documentation

◆ SyncMove()

arcs::common_interface::SyncMove::SyncMove ( )

◆ ~SyncMove()

virtual arcs::common_interface::SyncMove::~SyncMove ( )
virtual

Member Function Documentation

◆ axisGroupAdd()

int arcs::common_interface::SyncMove::axisGroupAdd ( const std::string &  name,
const std::vector< double > &  pose,
const std::string &  ref_frame 
)

Adds a new axis group with the given name to the world model.

It is placed at the given pose in the reference coordinate frame defined by ref_frame.

An axis group can only be attached to the world coordinate frame.

Each axis group has a coordinate frame attached to its base, which can be used as an argument to other world model functions by referring the name of the group.

At most 6 axis groups can be added to the world model.

Parameters
name(string) Name of the axis group to add. The name cannot be an empty string. Names used by world model objects (e.g., frame, axis group, axis, etc.) must be unique.
pose(pose) Pose of the axis group’s base, in the reference coordinate frame.
ref_frame(optional): (string) Name of the reference coordinate frame that pose is defined in. This can be any world model entity with a coordinate system (e.g., frame, axis group, axis, etc.). The default value "base" refers to the robot’s base frame.
Returns

◆ axisGroupAddAxis()

int arcs::common_interface::SyncMove::axisGroupAddAxis ( const std::string &  group_name,
const std::string &  name,
const std::string &  parent,
const std::vector< double > &  pose 
)

Adds an external axis with the given name to the axis group named group_name.

The axis is attached at the given pose in the reference coordinate frame defined by parent when its axis position is 0. The type, max velocity, max acceleration, position limits, and index of this axis are defined by type, v_limit, a_limit, q_limits, and axis_index, respectively. The pose parameter is typically obtained from a calibration process when the external axis is commissioned. This function will fail if this axis group is under control of another function, or if the kinematic chain created by the attachment forms a closed chain.

Parameters
group_nameName of the axis group this new axis is added to. The axis group would have been created using axis_group_add(). Axis group with such name must exist.
nameName of the new axis. The name cannot be an empty string. Names used by world model objects (e.g., frame, axis group, axis, etc.) must be unique.
parentName of the parent axis. If it’s empty or the same as group_name, the new axis will be attached to the base of the axis group. Axis with such name must exist in the axis group.
poseThe zero-position pose, in the parent coordinate frame, this axis will be placed and attached to. This is the pose the axis will be (relative to its parent) when its axis position is 0. If type is 0 (rotary), then the z axis of the frame corresponds to the axis of rotation. If type is 1 (linear), then the z axis is the axis of translation.
typeAxis type, 0 for rotary, 1 for linear.
v_limitMaximum velocity.
a_limitMaximum acceleration.
q_limitsPosition limits.
axis_indexAxis index.

◆ axisGroupDelete()

int arcs::common_interface::SyncMove::axisGroupDelete ( const std::string &  name)

Deletes the axis group with the given name from the world model.

All attached axes are also disabled (if live) and deleted.

This function will fail, if this axis group is under control by another function.

Parameters
name(string) Name of the axis group to delete. Axis group with such name must exist.
Returns

◆ axisGroupGetActualPositions()

std::vector< double > arcs::common_interface::SyncMove::axisGroupGetActualPositions ( const std::string &  group_name)

Returns the current actual positions of the axis group with group_name.

If group_name is not provided, the actual positions of all external axes will be returned.

This function will fail, if the external axis bus is disabled.

Parameters
group_name(optional): (string) Name of the axis group in query. Axis group with such name must exist.
Returns
Double[]: Actual positions of the involved axes, in the order of their external axis indices.

◆ axisGroupGetAxisIndex()

int arcs::common_interface::SyncMove::axisGroupGetAxisIndex ( const std::string &  name)

Returns the index of the axis with given axis_name in the RTDE target positions and actual positions arrays.

Parameters
axis_name(string) Name of the axis in query. Axis with such name must exist.
Returns
integer: Index of the axis in the RTDE target positions and actual positions arrays.

◆ axisGroupGetAxisName()

std::string arcs::common_interface::SyncMove::axisGroupGetAxisName ( int  index)

Returns the name of the axis with the given axis_index.

Parameters
axis_index(integer) Index of the axis in query. Axis with such index must exist.
Returns
string: Name of the axis.

◆ axisGroupGetTargetPositions()

std::vector< double > arcs::common_interface::SyncMove::axisGroupGetTargetPositions ( const std::string &  group_name)

Returns the current target positions of the axis group with group_name.

If group_name is not provided, the target positions of all external axes will be returned.

This function will fail, if the external axis bus is disabled.

Parameters
group_name(optional): (string) Name of the axis group in query. Axis group with such name must REALLY exist.
Returns
Double[]: Target positions of the involved axes, in the order of their external axis indices.

◆ axisGroupMoveJoint()

int arcs::common_interface::SyncMove::axisGroupMoveJoint ( const std::string &  group_name,
const std::vector< double > &  q,
double  a,
double  v 
)

Moves the axes of axis group named group_name to new positions q, using a trapezoidal velocity profile.

Factor a specifying the percentage of the max profile accelerations out of the acceleration limits of each axes. Factor v specifying the percentage of the max profile velocities out of the velocity limits of each axes.

The actual accelerations and velocities are determined by the most constraining axis, so that all the axes complete the acceleration, cruise, and deceleration phases at the same time.

Parameters
group_name(string) Name of the axis group to move. Axis group with such name must exist.
q(float[]) Target positions in rad (rotary) or in m (linear). If the target exceeds the position limits, then it is set to the nearest limit. The involved axes are ordered increasingly by their axis indices. The size of q must match the number of axes attached to the given group.
a(float) Factor specifying the max accelerations of this move out of the acceleration limits. a must be in range of (0,1].
v(float) Factor specifying the max velocities of this move out of the velocity limits. v must be in range of (0,1].

Return: n/a

◆ axisGroupOffsetPositions()

int arcs::common_interface::SyncMove::axisGroupOffsetPositions ( const std::string &  group_name,
const std::vector< double > &  offset 
)

Shifts the target and actual positions of the axis group group_name by the given offset.

This is a software shift that happens in the controller only, it does not affect external axis drives. The shift is also applied to any streamed target and actual positions published on RTDE.

Parameters
group_name(string) Name of the axis group to apply the offset positions to. Axis group with such name must exist.
offset(float[]) Offsets that the target and actual positions should be shifted by. The size of offset must match the number of axes attached to the given group.
Returns

◆ axisGroupSpeedJoint()

int arcs::common_interface::SyncMove::axisGroupSpeedJoint ( const std::string &  group_name,
const std::vector< double > &  qd,
double  a,
double  t 
)

Accelerates the axes of axis group named group_name up to the target velocities qd.

Factor a specifying the percentage of the max accelerations out of the acceleration limits of each axes. The function will run for a period of t seconds.

Parameters
group_name(string) Name of the external axis group to control. Axis group with such name must exist.
qd(float[]) Target velocities for the axes in the axis group. If the target exceeds the velocity limits, then it is set to the limit. The involved axes are ordered increasingly by their axis indices. The size of qd must match the number of axes attached to the given group.
a(float) Factor specifying the max accelerations of this move out of the acceleration limits. a must be in range of (0,1].
t(optional): (float) Duration in seconds before the function returns. If t < 0, then the function will return when the target velocities are reached. if t ≥ 0, then the function will return after this duration, regardless of what the achieved axes velocities are.

◆ axisGroupUpdateAxis()

int arcs::common_interface::SyncMove::axisGroupUpdateAxis ( const std::string &  name,
const std::vector< double > &  pose 
)

Updates the corresponding properties of axis with name.

The pose parameter is typically obtained from a calibration process when the external axis is commissioned. See here for a guide on a basic routine for calibrating a single rotary axis.

This function will fail, if the axis group the axis attached to is already being controlled by another command. This function will fail, if any attached axis of the axis group is live and enabled.

Parameters
name(string) Name of the axis to update. Axis with such name must exist.
pose(optional): (pose) New zero-position pose, in the coordinate frame of the parent axis (or axis group), of the axis. This is the pose of the axis when its axis position is 0.

◆ frameAdd()

int arcs::common_interface::SyncMove::frameAdd ( const std::string &  name,
const std::vector< double > &  pose,
const std::string &  ref_name 
)

Add a frame with the name "name" initialized at the specified pose expressed in the ref_frame coordinate frame.

This command only adds a frame to the world, it does not attach it to the ref_frame coordinate frame. Use frameAttach() to attach the newly added frame to ref_frame if desired.

Parameters
namename of the frame to be added. The name must not be the same as any existing world model object (frame, axis, or axis group), otherwise an exception is thrown
poseinitial pose of the new object
ref_framename of the world model object whose coordinate frame the pose is expressed in. If nothing is provided here, the default is the robot “base” frame.
Returns

◆ frameAttach()

int arcs::common_interface::SyncMove::frameAttach ( const std::string &  child,
const std::string &  parent 
)

Attaches the child frame to the parent world model object.

The relative transform between the parent and child will be set such that the child does not move in the world when the attachment occurs.

The child cannot be “world”, “flange”, “tcp”, or the same as parent.

This will fail if child or parent is not an existing frame, or this makes the attachments form a closed chain.

If being used with the MotionPlus, the parent argument can be the name of an external axis or axis group.

Parameters
childname of the frame to be attached. The name must not be “world”, “flange”, or “tcp”.
parentname of the object that the child frame will be attached to.
Returns

◆ frameConvertPose()

std::vector< double > arcs::common_interface::SyncMove::frameConvertPose ( const std::vector< double > &  pose,
const std::string &  from_frame,
const std::string &  to_frame 
)

Convert pose from from_frame to to_frame.

This will fail if either coordinate system argument is not an existing frame.

If being used with MotionPlus, all three arguments can also be the names of external axes or axis groups.

Parameters
posepose to be converted
from_framename of reference frame at origin of old coordinate system
to_framename of reference frame at origin of new coordinate system
Returns
Value of pose expressed in the coordinates of to_frame.

◆ frameDelete()

int arcs::common_interface::SyncMove::frameDelete ( const std::string &  name)

Delete the frame with name from the world model.

The “world”, “base”, “flange”, and “tcp” frames cannot be deleted.

Any frames that are attached to the deleted frame will be attached to the “world” frame with new frame offsets set such that the detached frame does not move in the world.

This command will fail if the frame does not exist.

Parameters
namename of the frame to be deleted
Returns

◆ frameDeleteAll()

int arcs::common_interface::SyncMove::frameDeleteAll ( )

Delete all frames that have been added to the world model.

The “world”, “base”, “flange”, and “tcp” frames cannot be deleted.

Any frames that are attached to the deleted frames will be attached to the “world” frame with new frame offsets set such that the detached frames do not move in the world.

Returns

◆ frameExist()

bool arcs::common_interface::SyncMove::frameExist ( const std::string &  name)

Queries for the existence of a frame by the given name.

Parameters
namename of the frame to be queried.
Returns
Returns true if there is a frame by the given name, false if not.

◆ frameGetChildren()

std::vector< std::string > arcs::common_interface::SyncMove::frameGetChildren ( const std::string &  name)

Returns a list of immediate child object frame names.

Parent-child relationships are defined by world model attachments. If being used with MotionPlus, the child objects may also be an axis group or an axis.

Parameters
namethe name of the parent object.
Returns
a list of immediate child object frame names

◆ frameGetParent()

std::string arcs::common_interface::SyncMove::frameGetParent ( const std::string &  name)

Get the parent of the frame named name in the world model.

If the frame is not attached to another frame, then “world” is the parent.

Parameters
namethe frame being queried
Returns
name of the parent as a string

◆ frameGetPose()

std::vector< double > arcs::common_interface::SyncMove::frameGetPose ( const std::string &  name,
const std::string &  rel_frame,
const std::string &  ref_frame 
)

Get the pose of the name frame relative to the rel_frame frame but expressed in the coordinates of the ref_frame frame.

If ref_frame is not provided, then this returns the pose of the name frame relative to and expressed in the same frame as rel_frame.

This will fail if any arguments are not an existing frame.

If being used with MotionPlus, all three arguments can also be the names of external axes or axis groups.

Parameters
namename of the frame to query.
rel_frameshort for “relative frame” is the frame where the pose is computed relative to
ref_frameshort for “reference frame” is the frame to express the coordinates of resulting relative pose in. If this is not provided, then it will default to match the value of rel_frame.
Returns
The pose of the frame expressed in the ref_frame coordinates.

◆ frameMove()

int arcs::common_interface::SyncMove::frameMove ( const std::string &  name,
const std::vector< double > &  pose,
const std::string &  ref_name 
)

Changes the placement of the coordinate frame named name to the new placement given by pose that is defined in the ref_name coordinate frame.

This will fail if name is “world”, “flange”, “tcp”, or if the frame does not exist. Note: to move the “tcp” frame, use the set_tcp() command instead.

If being used with the MotionPlus, the ref_name argument can be the name of an external axis or axis group.

Parameters
namethe name of the frame to move
posethe new placement
ref_namethe coordinate frame that pose is expressed in. The default value is the robot’s “base” frame.
Returns

◆ isSyncMoveOn()

bool arcs::common_interface::SyncMove::isSyncMoveOn ( )

isSyncMoveOn is used to tell if the mechanical unit group is in synchronized movement mode.

A task that does not control any mechanical unit can find out if the mechanical units defined in the parameter Use Mechanical Unit Group are in synchronized movement mode.

Returns
Python prototype
isSyncMoveOn(self: pyaubo_sdk.SyncMove) -> bool
Lua prototype
isSyncMoveOn() -> boolean

◆ syncMoveOff()

int arcs::common_interface::SyncMove::syncMoveOff ( const std::string &  syncident)

syncMoveOff is used to end synchronized movement mode.

A syncMoveOff instruction will wait for the other task programs. When all task programs have reached the syncMoveOff, they will continue their execution in unsynchronized mode. A stop point must be programmed before the syncMoveOff instruction.

Parameters
syncident
Returns
Python prototype
syncMoveOff(self: pyaubo_sdk.SyncMove, arg0: str) -> int
Lua prototype
syncMoveOff(syncident: string) -> nil @endcoe

◆ syncMoveOn()

int arcs::common_interface::SyncMove::syncMoveOn ( const std::string &  syncident,
const TaskSet taskset 
)

syncMoveOn is used to start synchronized movement mode.

A syncMoveOn instruction will wait for the other task programs. When all task programs have reached the syncMoveOn, they will continue their execution in synchronized movement mode. The move instructions in the different task programs are executed simultaneously, until the instruction syncMoveOff is executed. A stop point must be programmed before the syncMoveOn instruction.

Parameters
syncident
taskset
Returns
Python function prototype
syncMoveOn(self: pyaubo_sdk.SyncMove, arg0: str, arg1: Set[str]) -> int
Lua function prototype
syncMoveOn(syncident: string, taskset: table) -> nil @endcoe

◆ syncMoveResume()

int arcs::common_interface::SyncMove::syncMoveResume ( )

Resume synchronized movement mode.

Returns
Python prototype
syncMoveResume(self: pyaubo_sdk.SyncMove) -> int
Lua prototype
syncMoveResume() -> nil

◆ syncMoveSegment()

bool arcs::common_interface::SyncMove::syncMoveSegment ( int  id)

Set the ID for the synchronized path segment.

In synchronized movements mode, all or none of the simultaneous move instructions must be programmed with corner zones. This means that move instructions with the same ID must either all have corner zones, or all have stop points. If a move instruction with a corner zone and a move instruction with a stop point are synchronously executed in their respective task program, an error will occur. Synchronously executed move instructions can have corner zones of different sizes (e.g. one uses z10 and one uses z50).

Parameters
id
Returns
Python prototype
syncMoveSegment(self: pyaubo_sdk.SyncMove, arg0: int) -> bool
Lua prototype
syncMoveSegment(id: number) -> boolean @endcoe

◆ syncMoveSuspend()

int arcs::common_interface::SyncMove::syncMoveSuspend ( )

Suspend synchronized movement mode.

Returns
Python prototype
syncMoveSuspend(self: pyaubo_sdk.SyncMove) -> int
Lua prototype
syncMoveSuspend() -> nil

◆ syncMoveUndo()

int arcs::common_interface::SyncMove::syncMoveUndo ( )

syncMoveUndo is used to turn off synchronized movements, even if not all the other task programs execute the syncMoveUndo instruction.

syncMoveUndo is intended for UNDO handlers. When the program pointer is moved from the procedure, syncMoveUndo is used to turn off the synchronization.

Returns
Python prototype
syncMoveUndo(self: pyaubo_sdk.SyncMove) -> int
Lua prototype
syncMoveUndo() -> nil @endcoe

◆ waitSyncTasks()

int arcs::common_interface::SyncMove::waitSyncTasks ( const std::string &  syncident,
const TaskSet taskset 
)

waitSyncTasks is used to synchronize several task programs at a specific point in the program.

A waitSyncTasks instruction will wait for the other task programs. When all task programs have reached the waitSyncTasks instruction, they will continue their execution.

Parameters
syncident
taskset
Returns
Python prototype
waitSyncTasks(self: pyaubo_sdk.SyncMove, arg0: str, arg1: Set[str]) -> int
Lua prototype
waitSyncTasks(syncident: string, taskset: table) -> nil @endcoe

Member Data Documentation

◆ d_

void* arcs::common_interface::SyncMove::d_
protected

Definition at line 974 of file sync_move.h.


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