SELAB3 Unity
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Properties | List of all members
ArmBuilder Class Reference

Script on the main manipulator to build the robot arm and remove it More...

Inheritance diagram for ArmBuilder:

Public Types

enum  ModuleType
 Each module has a type. Outside of the Invalid type, there are 4 types: More...
 

Public Member Functions

ModuleType TypeOfLink (LinkSpec link)
 Converts the XML-parsed LinkSpec to ModuleType
 
bool BuildAgent (string urdf)
 Build a robot arm. Should only be called once, in the beginning, because the manipulatorAgent would be instantiated twice. Saves the RobotSpec specification after parsing so the robot can be rebuild (see RebuildAgent) More...
 
void DestroyAgent ()
 Removes the current robot arm
 
bool RebuildAgent ()
 Removes the current robot arm and rebuilds it. More...
 
int GetJointAmount ()
 Returns the amount of joints the currently built robot arm has (zero if no arm built) More...
 

Public Attributes

GameObject moduleBodyPrefab
 Prefab instantiated by Unity
 
GameObject rotatingModuleBodyPrefab
 Prefab instantiated by Unity
 
GameObject moduleConnectorPrefab
 Prefab instantiated by Unity
 
GameObject tiltingModuleConnectorPrefab
 Prefab instantiated by Unity
 
GameObject manipulatorAgentPrefab
 Prefab instantiated by Unity
 
GameObject anchor
 The anchor GameObject, instantiated by Unity
 

Properties

GameObject EndEffector [get]
 

Detailed Description

Script on the main manipulator to build the robot arm and remove it

Member Enumeration Documentation

◆ ModuleType

Each module has a type. Outside of the Invalid type, there are 4 types:

Anchor: Special case for the lowest module. Has 0 or 1 joints.

Tilting: Module that has 1 joint at the base that can 'tilt' the robot.

Rotating: Module that has 1 joint in the middle, rotating along the axis of the module.

Complex: Module that has 2 joints: a tilting and a rotating one.

Member Function Documentation

◆ BuildAgent()

bool ArmBuilder.BuildAgent ( string  urdf)
inline

Build a robot arm. Should only be called once, in the beginning, because the manipulatorAgent would be instantiated twice. Saves the RobotSpec specification after parsing so the robot can be rebuild (see RebuildAgent)

Parameters
urdfThe robot specfication in URDF format, to be parsed by using XmlSerializer with the RobotSpec specification
Returns
Whether the parsing and building was successful

◆ GetJointAmount()

int ArmBuilder.GetJointAmount ( )
inline

Returns the amount of joints the currently built robot arm has (zero if no arm built)

Returns
The amount of joints

◆ RebuildAgent()

bool ArmBuilder.RebuildAgent ( )
inline

Removes the current robot arm and rebuilds it.

Returns
Whether the rebuilding was successful

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