RobotEye Library
 All Classes Namespaces Functions Pages
Public Member Functions | List of all members
RobotEye.RobotEye.RobotEye Class Reference

The RobotEye class. More...

Public Member Functions

def __init__
 The default RobotEye constructor. More...
 
def Home
 Perform homing routine. More...
 
def Stop
 Stop any in-progress motion. More...
 
def SetApertureAngles
 Blocking synchronised motion command. More...
 
def TrackApertureAngles
 Rapid-response motion command. More...
 
def SetAcceleration
 Modify acceleration limits. More...
 
def GetApertureAngles
 A method to capture the current position of the RobotEye. More...
 
def GetSerial
 A method to acquire the serial number of the target RobotEye. More...
 
def StartStabilisation
 Start the stabilisation. More...
 
def StopStabilisation
 Stop the stabilisation. More...
 
def SetStabilisedTarget
 Set the stabilisation target. More...
 
def GetStabilisedTarget
 Get the stabilisation target. More...
 
def GetStabilisedTargetDistance
 Get the stabilisation target distance. More...
 
def GetStabilisedRoll
 Get the stabilisation roll. More...
 
def SetStabilisedSpeed
 Set the stabilisation speed. More...
 
def GetLastBlockingError
 A method to retrieve the last error code returned by the RobotEye to a blocking transaction.
 
def SetMotors
 Set the motors on or off. More...
 

Detailed Description

The RobotEye class.

This class contains all of the public programmatic interfaces to the RobotEye system. The class can be instantiated multiple times to connect to RobotEye systems on different IP addresses. The response from each API is in JSON format which can be easily loaded using json.loads

Constructor & Destructor Documentation

def RobotEye.RobotEye.RobotEye.__init__ (   self,
  eyeip 
)

The default RobotEye constructor.

Parameters
eyeIP- the IP address of the RobotEye expressed as a string i.e. "10.1.1.200"
Exceptions
ConnectionRefusedError- likely causes; incorrect network setup, configuration errors.

Member Function Documentation

def RobotEye.RobotEye.RobotEye.GetApertureAngles (   self)

A method to capture the current position of the RobotEye.

This command will query the robot eye for it's current position. If the return value is NO_ERROR then Az and El will contain the current eye location in a JSON format

Returns
JSON format string with Az and El and The error code
Note
This command should not be called at rates higher than 25 Hz. Future versions of the library will support a high-frequency streaming form of this command for rapid updates
def RobotEye.RobotEye.RobotEye.GetSerial (   self)

A method to acquire the serial number of the target RobotEye.

This command will query the robot eye for it's serial number. If the return value is NO_ERROR, then serial will contain the serial number of the RobotEye in JSON response

Returns
JSON response with serial
def RobotEye.RobotEye.RobotEye.GetStabilisedRoll (   self)

Get the stabilisation roll.

This command will get the roll needed to apply to the camera frame.

Returns
roll in JSON string - in degrees.
def RobotEye.RobotEye.RobotEye.GetStabilisedTarget (   self)

Get the stabilisation target.

This command will get the stabilisation target.

Returns
JSON string with yaw pitch and roll if NO ERROR or just error code
def RobotEye.RobotEye.RobotEye.GetStabilisedTargetDistance (   self)

Get the stabilisation target distance.

This command will get the distance error of the stabilisation target.

Returns
distance in JSON. At target, distance will be 0, the farther away it is, the closer to 1.
def RobotEye.RobotEye.RobotEye.Home (   self)

Perform homing routine.

This command will cause a RobotEye to execute it's homing routine. The overloaded variant with no arguments is a blocking command, and will not return until the motion is complete or the eye has responded with an error.

Note
This is a blocking function call, and will not return until the home routine has been completed, and all motion ceased.
This command uses the motion timeout, as it is a movement command waiting for the completion of the move.
This command can interrupt an in-progress non-blocking SetApertureAngles or Home command. When this is done, the callback for the previously executing non-blocking command will return with ERR_TIMEOUT.
def RobotEye.RobotEye.RobotEye.SetAcceleration (   self,
  Acceleration 
)

Modify acceleration limits.

This method allows the default controller acceleration settings to be overwritten. This is not intended to be a commonly used function - for a detailed description of usage, contact Ocular Robotics Pty. Ltd.

Parameters
Acceleration- the new acceleration in rev/s/s
def RobotEye.RobotEye.RobotEye.SetApertureAngles (   self,
  Az,
  El,
  Speed 
)

Blocking synchronised motion command.

Method used to point the RobotEye aperture at a specific angle, specified in degrees, in the default RobotEye coordinate system. The function waits for the motion to complete before returning control to the caller. It is intended to be the standard blocking method for pointing a Robot Eye.

Parameters
Az- Azimuth angle in degrees (-180 to 180)
El- Elevatiuon angle in degrees (-max to +max) where max depends on model (usually max = 35 degrees). 0 degrees is the horizontal plane.
Speed- in Hz (the vector motion speed). This is an upper speed limit only, depending on the current acceleration limit the eye may not reach the specified speed during the motion.
Note
This is a blocking function call, and will not return until the specified aperture position has been reached, and all motion ceased.
This command uses the Motion timeout, as it is a movement command waiting for the completion of the move.
This command can interrupt an in-progress non-blocking SetApertureAngles or Home command. When this is done, the callback for the previously executing non-blocking command will return with ERR_TIMEOUT.
def RobotEye.RobotEye.RobotEye.SetMotors (   self,
  on 
)

Set the motors on or off.

This command will power on or off both motors. At power-on, the motors default to on. This setting is not preserved through power-cycles of the device.

Parameters
on- Desired state of the motors. Valid values are true or false. True turns motors on, and false turns them off.
def RobotEye.RobotEye.RobotEye.SetStabilisedSpeed (   self,
  speed 
)

Set the stabilisation speed.

This command will set the speed used to apply the stabilisation movements.

Returns
speed with error Code in JSON format - in degrees per second.
def RobotEye.RobotEye.RobotEye.SetStabilisedTarget (   self,
  yaw,
  pitch,
  roll 
)

Set the stabilisation target.

This command will set the stabilisation target.

Parameters
yaw- in degrees.
pitch- in degrees.
roll- in degrees.
def RobotEye.RobotEye.RobotEye.StartStabilisation (   self)

Start the stabilisation.

This command will activate the stabilisation module.

def RobotEye.RobotEye.RobotEye.Stop (   self)

Stop any in-progress motion.

This command will cause a RobotEye to immediately cease motion. It can be used to terminate an in-progress non-blocking Set Aperture Angles or Home instruction, in which case the non-blocking callback will return ERR_TIMEOUT

def RobotEye.RobotEye.RobotEye.StopStabilisation (   self)

Stop the stabilisation.

This command will deactivate the stabilisation module.

def RobotEye.RobotEye.RobotEye.TrackApertureAngles (   self,
  Az,
  El,
  Speed 
)

Rapid-response motion command.

Method used to point the RobotEye aperture at a specific angle, specified in degrees, in the default RobotEye coordinate system. This function sends setpoints to the RobotEye controller. Previous setpoints are aborted once new setpoints are sent. Use this method for tracking dynamically moving targets, or where extremely low-latency motion control is required.

Parameters
Az- in degrees (-180 to 180)
El- in degrees (-max to +max) where max depends on model (usually max = 35 degrees). 0 degrees is the horizontal plane.
Speed- in Hz (the vector motion speed)
Note
This is a non-blocking function call, and will return immediately.
This command will cause the eye to begin motion more rapidly than the Set Aperture Angles command, however it does not provide a notification when motion is complete, and it may have longer settling times than an equivalent Set Aperture Angles command.

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