RobWorkProject  23.9.11-
Public Types | Public Member Functions | Static Public Member Functions | List of all members
AssemblyTask Class Reference

Specification of a AssemblyTask. More...

#include <AssemblyTask.hpp>

Public Types

typedef rw::core::Ptr< AssemblyTaskPtr
 smart pointer type to this class
 

Public Member Functions

 AssemblyTask ()
 Construct a new uninitialized task.
 
 AssemblyTask (rw::core::Ptr< rwlibs::task::CartesianTask > task, rw::core::Ptr< AssemblyRegistry > registry=NULL)
 Construct a new task from a CartesianTask. More...
 
virtual ~AssemblyTask ()
 Destructor.
 
rw::core::Ptr< rwlibs::task::CartesianTasktoCartesianTask ()
 Convert to CartesianTask. More...
 
AssemblyTask::Ptr clone () const
 Clone the task. More...
 

Static Public Member Functions

static void saveRWTask (AssemblyTask::Ptr task, const std::string &name)
 Save a single AssemblyTask to a task file. More...
 
static void saveRWTask (std::vector< AssemblyTask::Ptr > tasks, const std::string &name)
 Save multiple tasks to a task file. More...
 
static std::vector< AssemblyTask::Ptrload (const std::string &name, rw::core::Ptr< AssemblyRegistry > registry=NULL)
 Load tasks from a file. More...
 
static std::vector< AssemblyTask::Ptrload (const std::vector< std::string > &names, rw::core::Ptr< AssemblyRegistry > registry=NULL)
 Load tasks from multiple files. More...
 
static std::vector< AssemblyTask::Ptrload (std::istringstream &inputStream, rw::core::Ptr< AssemblyRegistry > registry=NULL)
 Load tasks from a input stream. More...
 

Public Attributes

Mandatory settings

These values should always be set in an assembly task.

std::string maleID
 The name of the Body of the male object.
 
std::string femaleID
 The name of the Body of the female object.
 
rw::math::Transform3D femaleTmaleTarget
 The target relative location of the two objects when assembled (see maleTCP and femaleTCP).
 
rw::core::Ptr< AssemblyControlStrategystrategy
 The control strategy to use for the assembly operation.
 
rw::core::Ptr< AssemblyParameterizationparameters
 Parameters for the constrol strategy (specific for the control strategy used)
 
Reference frame settings (optional)

If the femaleTmaleTarget is not specified with respect to the base frame of the bodies, please set the TCP frames of each body (an empty string means that the base frame is used).

std::string maleTCP
 (optional) The name of the TCP of the male object.
 
std::string femaleTCP
 (optional) The name of the TCP of the female object.
 
Context & Metadata (optional)

Information about the context of the task, and additional information.

std::string taskID
 (optional) An identifier for this specific task - please make it as unique and descriptive as possible.
 
std::string workcellName
 (optional) The name of the workcell this task is intended for.
 
std::string generator
 (optional) An identifier for the generator that created the task.
 
std::string date
 (optional) The date and time for creation of the task.
 
std::string author
 (optional) The name of the author.
 
Simulation settings (required for simulation)

Data required for simulation purposes (at least one of the objects must have a controller).

std::string malePoseController
 The controller that is used to control the pose of the male object (supported is SerialDeviceController).
 
std::string femalePoseController
 The controller that is used to control the pose of the female object (supported is SerialDeviceController).
 
std::string maleFTSensor
 The Force/Torque sensor that is used to control the pose of the male object.
 
std::string femaleFTSensor
 The Force/Torque sensor that is used to control the pose of the female object.
 
std::vector< std::string > maleFlexFrames
 If there is flexibility between the control frame and the peg, the intermediate flexibility base frames can be set here for the male manipulator.
 
std::vector< std::string > femaleFlexFrames
 If there is flexibility between the control frame and the peg, the intermediate flexibility base frames can be set here for the female manipulator.
 
std::vector< std::string > bodyContactSensors
 Add contacts to the result for the given BodyContactSensors.
 

Detailed Description

Specification of a AssemblyTask.

Assembly task is a generic description that covers all tasks where two objects are to be assembled. This can for instance be Peg in Hole or screwing operations.

The class supports serialization through the CartesianTask format. For deserialization an AssemblyRegistry should be provided when loading the AssemblyTask. This is required if user specifies its own AssemblyControlStrategy.

Constructor & Destructor Documentation

◆ AssemblyTask()

Construct a new task from a CartesianTask.

Parameters
task[in] a CartesianTask.
registry[in] the control strategy registry (required only if user specified strategies will be used).

Member Function Documentation

◆ clone()

AssemblyTask::Ptr clone ( ) const

Clone the task.

Returns
a new cloned task.

◆ load() [1/3]

static std::vector<AssemblyTask::Ptr> load ( const std::string &  name,
rw::core::Ptr< AssemblyRegistry registry = NULL 
)
static

Load tasks from a file.

Parameters
name[in] the filename to load tasks from.
registry[in] a registry of control strategies to be used.
Returns
a vector of tasks loaded from the file.

◆ load() [2/3]

static std::vector<AssemblyTask::Ptr> load ( const std::vector< std::string > &  names,
rw::core::Ptr< AssemblyRegistry registry = NULL 
)
static

Load tasks from multiple files.

Parameters
names[in] the filenames to load tasks from.
registry[in] a registry of control strategies to be used.
Returns
a vector of tasks loaded from the files.

◆ load() [3/3]

static std::vector<AssemblyTask::Ptr> load ( std::istringstream &  inputStream,
rw::core::Ptr< AssemblyRegistry registry = NULL 
)
static

Load tasks from a input stream.

Parameters
inputStream[in] the stream to load tasks from.
registry[in] a registry of control strategies to be used.
Returns
a vector of tasks loaded from the stream.

◆ saveRWTask() [1/2]

static void saveRWTask ( AssemblyTask::Ptr  task,
const std::string &  name 
)
static

Save a single AssemblyTask to a task file.

Parameters
task[in] the task to save.
name[in] the name of the file to save to (normally with the extension .assembly.xml).

◆ saveRWTask() [2/2]

static void saveRWTask ( std::vector< AssemblyTask::Ptr tasks,
const std::string &  name 
)
static

Save multiple tasks to a task file.

Parameters
tasks[in] the list of tasks to save.
name[in] the name of the file to save to (normally with the extension .assembly.xml).

◆ toCartesianTask()

Convert to CartesianTask.

Returns
a CartesianTask.

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