RobWorkProject
24.12.4-
|
A specification of the result from an execution of an AssemblyTask. More...
#include <AssemblyResult.hpp>
Public Types | |
enum | Error { NONE , SIMULATION_ERROR , OTHER } |
Different error codes. More... | |
typedef rw::core::Ptr< AssemblyResult > | Ptr |
smart pointer type to this class | |
typedef enum rwlibs::assembly::AssemblyResult::Error | Error |
Different error codes. | |
Public Member Functions | |
AssemblyResult () | |
Constructor for empty result. | |
AssemblyResult (rw::core::Ptr< rwlibs::task::CartesianTask > task) | |
Construct result from a CartesianTask representation. More... | |
virtual | ~AssemblyResult () |
Destructor. | |
AssemblyResult::Ptr | clone () const |
Clone the result. More... | |
rw::core::Ptr< rwlibs::task::CartesianTask > | toCartesianTask () |
Convert to the CartesianTask format. More... | |
Static Public Member Functions | |
static void | saveRWResult (AssemblyResult::Ptr result, const std::string &name) |
Store a result to a file. More... | |
static void | saveRWResult (std::vector< AssemblyResult::Ptr > results, const std::string &name) |
Store a list of results to a file. More... | |
static std::vector< AssemblyResult::Ptr > | load (const std::string &name) |
Load a list of results from a file. More... | |
static std::vector< AssemblyResult::Ptr > | load (std::istringstream &inputStream) |
Load a list of results from a input stream. More... | |
static std::string | toString (const Error &error) |
Convert an error to string format. More... | |
static Error | toError (const std::string &string) |
Convert a string to a specific error. More... | |
Public Attributes | |
Mandatory settings | |
These values should always be set in an assembly result. | |
bool | success |
True or false depending on if the two objects where assembled as specified in the task. | |
Error | error |
Indication of an error. | |
rw::math::Transform3D | femaleTmaleEnd |
The final relative transformation between the objects (with respect to the TCP frames set in the task). | |
Context & Metadata (optional) | |
Information about the context of the task, and additional information. | |
std::string | taskID |
The id of the task. | |
std::string | resultID |
An id of this result. | |
Additional data (optional) | |
Extra detailed data about the trajectory followed. | |
rw::trajectory::Path< rw::trajectory::Timed< AssemblyState > > | realState |
A TimedPath of AssemblyState objects for the real trajectory. | |
rw::trajectory::Path< rw::trajectory::Timed< AssemblyState > > | assumedState |
A TimedPath of AssemblyState objects for the assumed trajectory. | |
rw::math::Transform3D | approach |
The approach pose used. | |
std::string | errorMessage |
Detailed error message. | |
A specification of the result from an execution of an AssemblyTask.
The class provides serialization through the CartesianTask format.
enum Error |
Construct result from a CartesianTask representation.
task | [in] the CartesianTask to construct result from. |
AssemblyResult::Ptr clone | ( | ) | const |
Clone the result.
|
static |
Load a list of results from a file.
name | [in] the file to load from. |
|
static |
Load a list of results from a input stream.
inputStream | [in] the stream to load from. |
|
static |
Store a result to a file.
result | [in] the result to store. |
name | [in] the file to save to (normally with the extension .assembly.xml). |
|
static |
Store a list of results to a file.
results | [in] the list of results to store. |
name | [in] the file to save to (normally with the extension .assembly.xml). |
rw::core::Ptr<rwlibs::task::CartesianTask> toCartesianTask | ( | ) |
Convert to the CartesianTask format.
|
static |
Convert a string to a specific error.
string | [in] the string to convert. |
|
static |
Convert an error to string format.
error | [in] the error to convert. |