-
Notifications
You must be signed in to change notification settings - Fork 33
Machina
Jose Luis Garcia del Castillo edited this page Aug 4, 2017
·
2 revisions
The core Class in Machina. Represents a state and action-based virtual robot, and exposes the public API for robot manipulation and control.
public class Machina.Robot
Properties
Type | Name | Summary |
---|---|---|
String |
Name | A nickname for this Robot. |
Events
Type | Name | Summary |
---|---|---|
BufferEmptyHandler |
BufferEmpty |
Methods
Type | Name | Summary |
---|---|---|
Boolean |
Attach(Tool tool) |
Attach a Tool to the flange of this Robot. From this moment, all Actions like Move or Rotate will refer to the Tool Center Point (TCP). |
Boolean |
Comment(String comment) |
Display an internal comment in the compilation code. Useful for internal annotations, reminders, etc. |
Boolean |
Connect(Int32 robotId) |
Scans the network for robotic devices, real or virtual, and performs all necessary operations to connect to it. This is necessary for 'online' modes such as 'execute' and 'stream.' |
Boolean |
Connect() | Scans the network for robotic devices, real or virtual, and performs all necessary operations to connect to it. This is necessary for 'online' modes such as 'execute' and 'stream.' |
ReferenceCS |
Coordinates() | Gets current ReferenceCS setting. |
void |
Coordinates(ReferenceCS refcs) |
Gets current ReferenceCS setting. |
void |
Coordinates(String type) |
Gets current ReferenceCS setting. |
void |
DebugBuffer() | Dumps a list of the remaining buffered actions. |
void |
DebugDump() | Dumps a bunch of information to the console about the controller, the main task, etc. |
void |
DebugRobotCursors() | Dumps the state of the internal RobotPointers |
void |
DebugSettingsBuffer() | Dumps current Settings values |
Boolean |
Detach() | Detach all Tools from the flange of this Robot. From this moment, all Actions like Move or Rotate will refer to the Flange Center Point (FCP). |
Boolean |
Disconnect() | Performs all necessary instructions to disconnect from and dispose a robot device, real or virtual. This is necessary before leaving current execution thread. |
Boolean |
Do(Action action) |
Applies an action to this robot. |
void |
Execute() | In 'execute' mode, flushes all pending actions, creates a program, uploads it to the controller and runs it. |
List<String> |
Export() | Create a program with all the buffered actions and return it as a string List. Note all buffered actions will be removed from the queue. |
List<String> |
Export(Boolean inlineTargets) |
Create a program with all the buffered actions and return it as a string List. Note all buffered actions will be removed from the queue. |
Boolean |
Export(String filepath) |
Create a program with all the buffered actions and return it as a string List. Note all buffered actions will be removed from the queue. |
Boolean |
Export(String filepath, Boolean inlineTargets) |
Create a program with all the buffered actions and return it as a string List. Note all buffered actions will be removed from the queue. |
Joints |
GetCurrentJoints() | Returns a Joint object representing the current angular rotations of the robot's 6 axes. |
Orientation |
GetCurrentOrientation() | Returns a Rotation representation of the Robot's TCP orientation in quaternions. |
Point |
GetCurrentPosition() | Returns a Point representation of the Robot's TCP position in mm and World coordinates. |
String |
GetIP() | Returns a string representation of the IP of the currently connected robot device. |
Joints |
GetJoints() | Returns a Joint object representing the rotations in the robot axes. |
Orientation |
GetOrientation() | Return a Orientation object representing the current orientation of the Tool Center Point (if there is a Tool attached) or the Flange Center Point (if there isn't). |
Point |
GetPosition() | Returns a Point represnting the current location of the Tool Center Point (if there is a Tool attached) or the Flange Center Point (if there isn't). |
Rotation |
GetRotation() | Return a Rotation object representing the current rotation of the Tool Center Point (if there is a Tool attached) or the Flange Center Point (if there isn't). |
Tool |
GetTool() | Returns the Tool object currently attached to this Robot, null if none. |
Boolean |
IsBrand(String brandName) |
|
Boolean |
Joints(Joints incJoints) |
Issue a request to increment the angular values of the robot joint rotations. Values expressed in degrees. |
Boolean |
Joints(Double incJ1, Double incJ2, Double incJ3, Double incJ4, Double incJ5, Double incJ6) |
Issue a request to increment the angular values of the robot joint rotations. Values expressed in degrees. |
Boolean |
JointsTo(Joints joints) |
Issue a request to set the angular values of the robot joint rotations. Values expressed in degrees. |
Boolean |
JointsTo(Double j1, Double j2, Double j3, Double j4, Double j5, Double j6) |
Issue a request to set the angular values of the robot joint rotations. Values expressed in degrees. |
Boolean |
LoadProgram(String filepath) |
Loads a program to the robot from a local file. |
Boolean |
LoadProgram(List<String> code) |
Loads a program to the robot from a local file. |
Boolean |
Message(String message) |
Send a string message to the device, to be displayed based on device's capacities. |
Boolean |
Mode(ControlMode mode) |
Sets the control mode the robot will operate under. |
Boolean |
Mode(String mode) |
Sets the control mode the robot will operate under. |
MotionType |
Motion() | Gets the current MotionType setting. |
void |
Motion(MotionType type) |
Gets the current MotionType setting. |
void |
Motion(String type) |
Gets the current MotionType setting. |
Boolean |
Move(Vector direction) |
Issue a relative movement action request on current coordinate system. |
Boolean |
Move(Double incX, Double incY, Double incZ = 0) |
Issue a relative movement action request on current coordinate system. |
Boolean |
MoveTo(Point position) |
Issue an absolute movement action request. |
Boolean |
MoveTo(Double x, Double y, Double z) |
Issue an absolute movement action request. |
void |
OnBufferEmpty(EventArgs e) |
|
void |
PopSettings() | Reverts the state settings (speed, zone, motion type...) to the previously buffered state by PushSettings(). |
void |
PushSettings() | Buffers current state settings (speed, zone, motion type...), and opens up for temporary settings changes to be reverted by PopSettings(). |
Boolean |
Rotate(Rotation rotation) |
Issue a RELATIVE rotation action request according to the current reference system. |
Boolean |
Rotate(Vector vector, Double angDegs) |
Issue a RELATIVE rotation action request according to the current reference system. |
Boolean |
Rotate(Double rotVecX, Double rotVecY, Double rotVecZ, Double angDegs) |
Issue a RELATIVE rotation action request according to the current reference system. |
Boolean |
RotateTo(Rotation rotation) |
Issue an ABSOLUTE reorientation request according to the current reference system. |
Boolean |
RotateTo(Orientation cs) |
Issue an ABSOLUTE reorientation request according to the current reference system. |
Boolean |
RotateTo(Vector vecX, Vector vecY) |
Issue an ABSOLUTE reorientation request according to the current reference system. |
Boolean |
RotateTo(Double x0, Double x1, Double x2, Double y0, Double y1, Double y2) |
Issue an ABSOLUTE reorientation request according to the current reference system. |
Boolean |
RunMode(RunMode mode) |
Sets the cycle the robot will run program in (Once or Loop). |
Boolean |
RunMode(String mode) |
Sets the cycle the robot will run program in (Once or Loop). |
Int32 |
Speed() | Gets the current speed setting. |
void |
Speed(Int32 speedInc) |
Gets the current speed setting. |
void |
SpeedTo(Int32 speed) |
Sets the default velocity new actions will be run at. |
Boolean |
Start() | Starts execution of the current module/s in the controller. @TODO: The behavior of this method will change depending based on Off/Online mode |
Boolean |
Stop() | Immediately stops execution of the current program/s in the connected robot. |
String |
ToString() | |
Boolean |
Transform(Vector direction, Rotation rotation) |
Issue a compound RELATIVE local Translation + Rotation request according to the current reference system. Note that, if using local coordinates, order of actions will matter. // TODO: wouldn't they matter too if the are in global coordinates? |
Boolean |
Transform(Rotation rotation, Vector direction) |
Issue a compound RELATIVE local Translation + Rotation request according to the current reference system. Note that, if using local coordinates, order of actions will matter. // TODO: wouldn't they matter too if the are in global coordinates? |
Boolean |
TransformTo(Point position, Orientation orientation) |
Issue a compound ABSOLUTE global Translation + Rotation request according to the current reference system. |
Boolean |
TransformTo(Orientation orientation, Point position) |
Issue a compound ABSOLUTE global Translation + Rotation request according to the current reference system. |
Boolean |
Wait(Int64 timeMillis) |
Issue a request to wait idle before moving to next action. |
Int32 |
Zone() | Gets the current zone setting. |
void |
Zone(Int32 zoneInc) |
Gets the current zone setting. |
void |
ZoneTo(Int32 zone) |
Sets the default zone value new actions will be given. |
Static Fields
Type | Name | Summary |
---|---|---|
Int32 |
Build | Build number. |
String |
Version | Version number. |
Represents a tool object that can be attached to the end effector of the robot. This class is public and will be used directly by the user, so careful design of the API vs. internal methods will be relevant.
public class Machina.Tool
Fields
Type | Name | Summary |
---|---|---|
Boolean |
translationFirst |
Properties
Type | Name | Summary |
---|---|---|
Vector |
centerOfGravity | |
String |
name | |
Orientation |
TCPOrientation | |
Point |
TCPPosition | |
Double |
weight |
Methods
Type | Name | Summary |
---|---|---|
String |
ToString() |