PDF
AuboStudio SDK  0.6.3
arcs::aubo_scope::PayloadContributionModel Class Reference

API interface for dynamic payload management. More...

#include <payload_contribution_model.h>

Public Member Functions

 PayloadContributionModel (PayloadContributionModel &f)
 PayloadContributionModel (PayloadContributionModel &&f)
 ~PayloadContributionModel ()
PayloadPtr addPayload (const std::string &id_key, const std::string &suggested_name, double mass, const std::vector< double > &center_of_gravity)
 Payload
PayloadPtr addPayload (const std::string &id_key, const std::string &suggested_name, double mass, const std::vector< double > &center_of_gravity, const std::vector< double > &inertiaMatrix)
 Payload
PayloadPtr getPayload (const std::string &id_key)
 Payload Returns the payload previously added by this AuboCap using the same idKey identifier.
void updatePayload (const std::string &id_key, double mass, const std::vector< double > &center_of_gravity)
 Payload
void updatePayload (const std::string id_key, double mass, const std::vector< double > &center_of_gravity, const std::vector< double > &inertia_matrix)
 Update the mass, center of gravity (CoG) and inertia matrix of an existing payload added by this AuboCap.
void removePayload (const std::string &id_key)
 Remove a payload added by this AuboCap from AuboScope.

Private Member Functions

 PayloadContributionModel ()

Private Attributes

void * d_ { nullptr }

Friends

class DataSwitch

Detailed Description

API interface for dynamic payload management.

Definition at line 17 of file payload_contribution_model.h.

Constructor & Destructor Documentation

◆ PayloadContributionModel() [1/3]

arcs::aubo_scope::PayloadContributionModel::PayloadContributionModel ( PayloadContributionModel & f)

References PayloadContributionModel().

Referenced by PayloadContributionModel(), and PayloadContributionModel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PayloadContributionModel() [2/3]

arcs::aubo_scope::PayloadContributionModel::PayloadContributionModel ( PayloadContributionModel && f)

References PayloadContributionModel().

Here is the call graph for this function:

◆ ~PayloadContributionModel()

arcs::aubo_scope::PayloadContributionModel::~PayloadContributionModel ( )

◆ PayloadContributionModel() [3/3]

arcs::aubo_scope::PayloadContributionModel::PayloadContributionModel ( )
private

Member Function Documentation

◆ addPayload() [1/2]

PayloadPtr arcs::aubo_scope::PayloadContributionModel::addPayload ( const std::string & id_key,
const std::string & suggested_name,
double mass,
const std::vector< double > & center_of_gravity )

Payload

Add a payload to the current installation in AuboScope.

This makes the payload selectable by the end user as well as available to other AuboCap contributions (through the PayloadModel interface). The payload is not modifiable by the end user or other aubo_studio plugins.

A default guess for the inertia matrix for the payload will be computed based on the specified payload mass and center of gravity. If data for the payload's inertia matrix is available, the method addPayload(String, String, Mass, Position, InertiaMatrix) can used instead (this might give better performance of the robot arm).

Note: The specified payload mass must be the total mass of the payload attached to the tool output flange of the robot.

The valid range for the payload mass and the coordinates of the center of gravity (CoG) are available through the RobotLimits interface which can be accessed with RobotModel#getRobotLimits() (an instance of the RobotModel interface can be retrieved through SystemAPI#getRobotModel()).

Parameters
idKeyThe key to identify this payload by, not null nor an empty string. The key is for this AuboCap only, i.e. it only has to be unique for this AuboCap and not "globally" for other aubo_studio plugins.
suggestedNameSuggested name for the payload, not null nor an empty string. Valid names must match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The final name can be retrieved from the returned payload instance.
massThe total mass of the payload attached to the tool output flange of the robot, not null. Create it using SimpleValueFactory#createMass(double, Mass.Unit).
centerOfGravityThe center of gravity (CoG), also referred to as center of mass, for the payload. It is defined as the offset between the center of the tool output flange and the center of gravity of the attached payload. Cannot be null. Create it using the PositionFactory interface.
Returns
The payload created and registered in AuboScope.
Exceptions
PayloadAlreadyAddedExceptionIf a payload has previously been added using the same idKey identifier. Use getPayload(String) to check if the payload has already been added to the current installation. Use updatePayload(String, Mass, Position) or updatePayload(String, Mass, Position, InertiaMatrix) to update the payload if the payload parameters have changed.
IllegalPayloadNameExceptionIf the suggested name does not match required regex.
IllegalMassExceptionIf the specified mass is not inside the valid range as defined by AuboScope.
IllegalCenterOfGravityExceptionIf any of the values of the specified center of gravity are not inside the valid range as defined by AuboScope.

◆ addPayload() [2/2]

PayloadPtr arcs::aubo_scope::PayloadContributionModel::addPayload ( const std::string & id_key,
const std::string & suggested_name,
double mass,
const std::vector< double > & center_of_gravity,
const std::vector< double > & inertiaMatrix )

Payload

Add a payload to the current installation in AuboScope.

This makes the payload selectable by the end user as well as available to other AuboCap contributions (through the PayloadModel interface). The payload is not modifiable by the end user or other aubo_studio plugins.

Use the addPayload(String, String, Mass, Position, InertiaMatrix) method instead if data for the payload's inertia matrix is not available.

Note: The specified payload mass must be the total mass of the payload attached to the tool output flange of the robot.

The valid range for the payload mass and the coordinates of the center of gravity (CoG) are available through the RobotLimits interface which can be accessed with RobotModel#getRobotLimits() (an instance of the RobotModel interface can be retrieved through SystemAPI#getRobotModel()).

Parameters
idKeyThe key to identify this payload by, not null nor an empty string. The key is for this AuboCap only, i.e. it only has to be unique for this AuboCap and not "globally" for other aubo_studio plugins.
suggestedNameSuggested name for the payload, not null nor an empty string. Valid names must match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The final name can be retrieved from the returned payload instance.
massThe total mass of the payload attached to the tool output flange of the robot, not null. Create it using SimpleValueFactory#createMass(double, Mass.Unit).
centerOfGravityThe center of gravity (CoG), also referred to as center of mass, for the payload. It is defined as the offset between the center of the tool output flange and the center of gravity of the attached payload. Cannot be null. Create it using the PositionFactory interface.
inertiaMatrixThe inertia matrix of the payload, defined in a coordinate system with center at the payload's center of gravity and the axes aligned with the tool output flange coordinate system (axes). Cannot be null. Create it using double, double, double, double, double, MomentOfInertia.Unit).
Returns
The payload created and registered in AuboScope.
Exceptions
PayloadAlreadyAddedExceptionIf a payload has previously been added using the same idKey identifier. Use getPayload(String) to check if the payload has already been added to the current installation. Use updatePayload(String, Mass, Position) or updatePayload(String, Mass, Position, InertiaMatrix) to update the payload if the payload parameters have changed.
IllegalPayloadNameExceptionIf the suggested name does not match required regex.
IllegalMassExceptionIf the specified mass is not inside the valid range as defined by AuboScope.
IllegalCenterOfGravityExceptionIf any of the values of the specified center of gravity are not inside the valid range as defined by AuboScope.
IllegalInertiaMatrixExceptionIf any of the values of the specified inertia matrix are not inside the valid range as defined by AuboScope.

◆ getPayload()

PayloadPtr arcs::aubo_scope::PayloadContributionModel::getPayload ( const std::string & id_key)

Payload Returns the payload previously added by this AuboCap using the same idKey identifier.

Use this to verify if the payload is present in the current installation.

Parameters
idKeyThe key to identify this payload by, not null nor an empty string.
Returns
The payload previously added by this AuboCap. Returns null if no payload exists in current installation (with the specified idKey identifier).

◆ removePayload()

void arcs::aubo_scope::PayloadContributionModel::removePayload ( const std::string & id_key)

Remove a payload added by this AuboCap from AuboScope.

Program nodes using the payload will be become undefined because the payload is no longer resolvable.

Parameters
idKeyThe identifier key used to add the payload with, not
null
nor an empty string.
Exceptions
PayloadNotFoundExceptionIf no payload exists with the provided idKey identifier in the current installation.

◆ updatePayload() [1/2]

void arcs::aubo_scope::PayloadContributionModel::updatePayload ( const std::string & id_key,
double mass,
const std::vector< double > & center_of_gravity )

Payload

Update the mass and center of gravity (CoG) of an existing payload added by this AuboCap.

Note: If an inertia matrix has been specified for the payload, calling this method will replace (overwrite) it with a computed default guess based the new specified payload mass and center of gravity. To avoid overwriting an existing inertia matrix (or to update an existing inertia matrix), instead use the method updatePayload(String, Mass, Position, InertiaMatrix).

Parameters
idKeyThe key to identify the payload, not null nor an empty string. A payload must have been added using the same key prior to calling this method.
massThe total mass of the payload attached to the tool output flange of the robot, not null. Create it using SimpleValueFactory#createMass(double, Mass.Unit).
centerOfGravityThe center of gravity of the payload, not
null
. Create it using the PositionFactory interface.
Exceptions
PayloadNotFoundExceptionIf no payload exists with the provided idKey identifier in the current installation.
IllegalMassExceptionIf the specified mass is not inside the valid range as defined by AuboScope.
IllegalCenterOfGravityExceptionIf any of the values of the specified center of gravity are not inside the valid range as defined by AuboScope.

◆ updatePayload() [2/2]

void arcs::aubo_scope::PayloadContributionModel::updatePayload ( const std::string id_key,
double mass,
const std::vector< double > & center_of_gravity,
const std::vector< double > & inertia_matrix )

Update the mass, center of gravity (CoG) and inertia matrix of an existing payload added by this AuboCap.

Parameters
idKeyThe key to identify the payload, not null nor an empty string. A payload must have been added using the same key prior to calling this method.
massThe total mass of the payload attached to the tool output flange of the robot, not null. Create it using SimpleValueFactory#createMass(double, Mass.Unit).
centerOfGravityThe center of gravity of the payload, not
null
. Create it using the PositionFactory interface.
inertiaMatrixThe inertia matrix of the payload, not null. Create it using double, double, double, double, double, MomentOfInertia.Unit)
Exceptions
PayloadNotFoundExceptionIf no payload exists with the provided idKey identifier in the current installation.
IllegalMassExceptionIf the specified mass is not inside the valid range as defined by AuboScope.
IllegalCenterOfGravityExceptionIf any of the values of the specified center of gravity are not inside the valid range as defined by AuboScope.
IllegalInertiaMatrixExceptionIf any of the values of the specified inertia matrix are not inside the valid range as defined by AuboScope.

◆ DataSwitch

friend class DataSwitch
friend

Definition at line 412 of file payload_contribution_model.h.

References DataSwitch.

Referenced by DataSwitch.

Member Data Documentation

◆ d_

void* arcs::aubo_scope::PayloadContributionModel::d_ { nullptr }
private

Definition at line 414 of file payload_contribution_model.h.


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