controller module

class controller.Accelerometer(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getLookupTable()
getSamplingPeriod()
getValues()
property thisown

The membership flag

class controller.AnsiCodes

Bases: object

BLACK_BACKGROUND = '\x1b[40m'
BLACK_FOREGROUND = '\x1b[30m'
BLUE_BACKGROUND = '\x1b[44m'
BLUE_FOREGROUND = '\x1b[34m'
BOLD = '\x1b[1m'
CLEAR_SCREEN = '\x1b[2J'
CYAN_BACKGROUND = '\x1b[46m'
CYAN_FOREGROUND = '\x1b[36m'
GREEN_BACKGROUND = '\x1b[42m'
GREEN_FOREGROUND = '\x1b[32m'
MAGENTA_BACKGROUND = '\x1b[45m'
MAGENTA_FOREGROUND = '\x1b[35m'
RED_BACKGROUND = '\x1b[41m'
RED_FOREGROUND = '\x1b[31m'
RESET = '\x1b[0m'
UNDERLINE = '\x1b[4m'
WHITE_BACKGROUND = '\x1b[47m'
WHITE_FOREGROUND = '\x1b[37m'
YELLOW_BACKGROUND = '\x1b[43m'
YELLOW_FOREGROUND = '\x1b[33m'
class controller.Brake(name)

Bases: controller.Device

getMotor()
getMotorTag()
getPositionSensor()
getPositionSensorTag()
getType()
setDampingConstant(dampingConstant)
property thisown

The membership flag

class controller.Camera(name)

Bases: controller.Device

disable()
disableRecognitionSegmentation()
enable(samplingPeriod)
enableRecognitionSegmentation()
getExposure()
getFocalDistance()
getFocalLength()
getFov()
getHeight()
getImage()
getImageArray()
getMaxFocalDistance()
getMaxFov()
getMinFocalDistance()
getMinFov()
getNear()
getRecognitionNumberOfObjects()
getRecognitionObject(index)
getRecognitionObjects()
getRecognitionSamplingPeriod()
getRecognitionSegmentationImage()
getRecognitionSegmentationImageArray()
getSamplingPeriod()
getWidth()
hasRecognition()
hasRecognitionSegmentation()
static imageGetBlue(*args)
static imageGetGray(*args)
static imageGetGreen(*args)
static imageGetGrey(*args)
static imageGetRed(*args)
isRecognitionSegmentationEnabled()
recognitionDisable()
recognitionEnable(samplingPeriod)
saveImage(filename, quality)
saveRecognitionSegmentationImage(filename, quality)
setExposure(exposure)
setFocalDistance(focalDistance)
setFov(fov)
property thisown

The membership flag

class controller.CameraRecognitionObject

Bases: object

property colors
get_colors()
get_id()
get_model()
get_number_of_colors()
get_orientation()
get_position()
get_position_on_image()
get_size()
get_size_on_image()
property id
property model
property number_of_colors
property orientation
property position
property position_on_image
property size
property size_on_image
property thisown

The membership flag

controller.Camera_imageGetBlue(*args)
controller.Camera_imageGetGray(*args)
controller.Camera_imageGetGreen(*args)
controller.Camera_imageGetGrey(*args)
controller.Camera_imageGetRed(*args)
class controller.Compass(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getLookupTable()
getSamplingPeriod()
getValues()
property thisown

The membership flag

class controller.Connector(name)

Bases: controller.Device

disablePresence()
enablePresence(samplingPeriod)
getPresence()
getPresenceSamplingPeriod()
isLocked()
lock()
property thisown

The membership flag

unlock()
class controller.Device(*args, **kwargs)

Bases: object

getModel()
getName()
getNodeType()
getTag()
static hasType(tag, type)
property thisown

The membership flag

controller.Device_hasType(tag, type)
class controller.DifferentialWheels

Bases: controller.Robot

disableEncoders()
enableEncoders(samplingPeriod)
getEncodersSamplingPeriod()
getLeftEncoder()
getLeftSpeed()
getMaxSpeed()
getRightEncoder()
getRightSpeed()
getSpeedUnit()
setEncoders(left, right)
setSpeed(left, right)
property thisown

The membership flag

class controller.Display(name)

Bases: controller.Device

attachCamera(camera)
detachCamera()
drawLine(x1, y1, x2, y2)
drawOval(cx, cy, a, b)
drawPixel(x1, y1)
drawPolygon(x, y)
drawRectangle(x, y, width, height)
drawText(txt, x, y)
fillOval(cx, cy, a, b)
fillPolygon(x, y)
fillRectangle(x, y, width, height)
getHeight()
getWidth()
imageCopy(x, y, width, height)
imageDelete(ir)
imageLoad(filename)
imageNew(data, format, width=None, height=None)
imagePaste(ir, x, y, blend=False)
imageSave(ir, filename)
setAlpha(alpha)
setColor(color)
setFont(font, size, antiAliasing)
setOpacity(opacity)
property thisown

The membership flag

class controller.DistanceSensor(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getAperture()
getLookupTable()
getMaxValue()
getMinValue()
getSamplingPeriod()
getType()
getValue()
property thisown

The membership flag

class controller.Emitter(name)

Bases: controller.Device

getBufferSize()
getChannel()
getRange()
send(data)
setChannel(channel)
setRange(range)
property thisown

The membership flag

class controller.Field(*args, **kwargs)

Bases: object

getCount()
getMFBool(index)
getMFColor(index)
getMFFloat(index)
getMFInt32(index)
getMFNode(index)
getMFRotation(index)
getMFString(index)
getMFVec2f(index)
getMFVec3f(index)
getSFBool()
getSFColor()
getSFFloat()
getSFInt32()
getSFNode()
getSFRotation()
getSFString()
getSFVec2f()
getSFVec3f()
getType()
getTypeName()
importMFNode(position, filename)
importMFNodeFromString(position, nodeString)
importSFNode(filename)
importSFNodeFromString(nodeString)
insertMFBool(index, value)
insertMFColor(index, values)
insertMFFloat(index, value)
insertMFInt32(index, value)
insertMFRotation(index, values)
insertMFString(index, value)
insertMFVec2f(index, values)
insertMFVec3f(index, values)
removeMF(index)
removeMFNode(position)
removeSF()
setMFBool(index, value)
setMFColor(index, values)
setMFFloat(index, value)
setMFInt32(index, value)
setMFRotation(index, values)
setMFString(index, value)
setMFVec2f(index, values)
setMFVec3f(index, values)
setSFBool(value)
setSFColor(values)
setSFFloat(value)
setSFInt32(value)
setSFRotation(values)
setSFString(value)
setSFVec2f(values)
setSFVec3f(values)
property thisown

The membership flag

class controller.GPS(name)

Bases: controller.Device

static convertToDegreesMinutesSeconds(decimalDegree)
disable()
enable(samplingPeriod)
getCoordinateSystem()
getSamplingPeriod()
getSpeed()
getValues()
property thisown

The membership flag

controller.GPS_convertToDegreesMinutesSeconds(decimalDegree)
class controller.Gyro(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getLookupTable()
getSamplingPeriod()
getValues()
property thisown

The membership flag

class controller.ImageRef(imageRef)

Bases: object

getImageRef()
property thisown

The membership flag

class controller.InertialUnit(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getNoise()
getQuaternion()
getRollPitchYaw()
getSamplingPeriod()
property thisown

The membership flag

class controller.Joystick

Bases: object

disable()
enable(samplingPeriod)
getAxisValue(axis)
getModel()
getNumberOfAxes()
getNumberOfPovs()
getPovValue(pov)
getPressedButton()
getSamplingPeriod()
isConnected()
setAutoCenteringGain(gain)
setConstantForce(level)
setConstantForceDuration(duration)
setForceAxis(axis)
setResistanceGain(gain)
property thisown

The membership flag

class controller.Keyboard

Bases: object

disable()
enable(samplingPeriod)
getKey()
getSamplingPeriod()
property thisown

The membership flag

class controller.LED(name)

Bases: controller.Device

get()
set(value)
property thisown

The membership flag

class controller.Lidar(name)

Bases: controller.Device

disable()
disablePointCloud()
enable(samplingPeriod)
enablePointCloud()
getFov()
getFrequency()
getHorizontalResolution()
getLayerPoint(layer, index)
getLayerPointCloud(layer)
getLayerRangeImage(layer)
getMaxFrequency()
getMaxRange()
getMinFrequency()
getMinRange()
getNumberOfLayers()
getNumberOfPoints()
getPoint(index)
getPointCloud(data_type='list')
getRangeImage()
getRangeImageArray()
getSamplingPeriod()
getVerticalFov()
isPointCloudEnabled()
setFrequency(frequency)
sys = <module 'sys' (built-in)>
property thisown

The membership flag

class controller.LidarPoint

Bases: object

property layer_id
property thisown

The membership flag

property time
property x
property y
property z
class controller.LightSensor(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getLookupTable()
getSamplingPeriod()
getValue()
property thisown

The membership flag

class controller.Motion(fileName)

Bases: object

getDuration()
getTime()
isOver()
isValid()
play()
setLoop(loop)
setReverse(reverse)
setTime(time)
stop()
property thisown

The membership flag

class controller.Motor(name)

Bases: controller.Device

disableForceFeedback()
disableTorqueFeedback()
enableForceFeedback(samplingPeriod)
enableTorqueFeedback(samplingPeriod)
getAcceleration()
getAvailableForce()
getAvailableTorque()
getBrake()
getBrakeTag()
getForceFeedback()
getForceFeedbackSamplingPeriod()
getMaxForce()
getMaxPosition()
getMaxTorque()
getMaxVelocity()
getMinPosition()
getPositionSensor()
getPositionSensorTag()
getTargetPosition()
getTorqueFeedback()
getTorqueFeedbackSamplingPeriod()
getType()
getVelocity()
setAcceleration(acceleration)
setAvailableForce(availableForce)
setAvailableTorque(availableTorque)
setControlPID(p, i, d)
setForce(force)
setPosition(position)
setTorque(torque)
setVelocity(vel)
property thisown

The membership flag

class controller.Mouse

Bases: object

disable()
disable3dPosition()
enable(samplingPeriod)
enable3dPosition()
getSamplingPeriod()
getState()
is3dPositionEnabled()
property thisown

The membership flag

class controller.MouseState

Bases: object

property left
property middle
property right
property thisown

The membership flag

property u
property v
property x
property y
property z
class controller.Node(*args, **kwargs)

Bases: object

addForce(force, relative)
addForceWithOffset(force, offset, relative)
addTorque(torque, relative)
getBaseTypeName()
getCenterOfMass()
getContactPoint(index)
getContactPointNode(index)
getDef()
getField(fieldName)
getFromProtoDef(name)
getId()
getNumberOfContactPoints(includeDescendants=False)
getOrientation()
getParentNode()
getPosition()
getProtoField(fieldName)
getStaticBalance()
getType()
getTypeName()
getVelocity()
isProto()
moveViewpoint()
remove()
resetPhysics()
restartController()
setVelocity(velocity)
setVisibility(_from, visible)
property thisown

The membership flag

class controller.Pen(name)

Bases: controller.Device

setInkColor(color, density)
property thisown

The membership flag

write(write)
class controller.PositionSensor(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getBrake()
getBrakeTag()
getMotor()
getMotorTag()
getSamplingPeriod()
getType()
getValue()
property thisown

The membership flag

class controller.Radar(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getHorizontalFov()
getMaxRange()
getMinRange()
getNumberOfTargets()
getSamplingPeriod()
getTarget(index)
getTargets()
getVerticalFov()
property thisown

The membership flag

class controller.RadarTarget

Bases: object

property azimuth
property distance
property received_power
property speed
property thisown

The membership flag

class controller.RangeFinder(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getFov()
getHeight()
getMaxRange()
getMinRange()
getRangeImage()
getRangeImageArray()
getSamplingPeriod()
getWidth()
static rangeImageGetDepth(*args)
static rangeImageGetValue(im, minRange, maxRange, width, x, y)
saveImage(filename, quality)
property thisown

The membership flag

controller.RangeFinder_rangeImageGetDepth(*args)
controller.RangeFinder_rangeImageGetValue(im, minRange, maxRange, width, x, y)
class controller.Receiver(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getChannel()
getData()
getDataSize()
getEmitterDirection()
getQueueLength()
getSamplingPeriod()
getSignalStrength()
nextPacket()
setChannel(channel)
property thisown

The membership flag

class controller.Robot

Bases: object

batterySensorDisable()
batterySensorEnable(samplingPeriod)
batterySensorGetSamplingPeriod()
batterySensorGetValue()
createAccelerometer(name)
createBrake(name)
createCamera(name)
createCompass(name)
createConnector(name)
createDisplay(name)
createDistanceSensor(name)
createEmitter(name)
createGPS(name)
createGyro(name)
createInertialUnit(name)
createLED(name)
createLidar(name)
createLightSensor(name)
createMotor(name)
createPen(name)
createPositionSensor(name)
createRadar(name)
createRangeFinder(name)
createReceiver(name)
createSkin(name)
createSpeaker(name)
createTouchSensor(name)
getAccelerometer(name)
getBasicTimeStep()
getBrake(name)
getCamera(name)
getCompass(name)
getConnector(name)
getCustomData()
getData()
getDevice(name)
getDeviceByIndex(index)
static getDeviceFromTag(tag)
getDisplay(name)
getDistanceSensor(name)
getEmitter(name)
getGPS(name)
getGyro(name)
getInertialUnit(name)
getJoystick()
getKeyboard()
getLED(name)
getLidar(name)
getLightSensor(name)
getMode()
getModel()
getMotor(name)
getMouse()
getName()
getNumberOfDevices()
getPen(name)
getPositionSensor(name)
getProjectPath()
getRadar(name)
getRangeFinder(name)
getReceiver(name)
getSkin(name)
getSpeaker(name)
getSupervisor()
getSynchronization()
getTime()
getTouchSensor(name)
getType()
getUrdf(*args)
getWorldPath()
static internalGetDeviceFromTag(tag)
joystick = <controller.Joystick;  >
keyboard = <controller.Keyboard;  >
mouse = <controller.Mouse;  >
setCustomData(data)
setData(data)
setMode(arg2, arg3)
step(duration)
sys = <module 'sys' (built-in)>
property thisown

The membership flag

waitForUserInputEvent(event_type, timeout)
wwiReceiveText()
wwiSendText(text)
controller.Robot___internalGetDeviceNameFromTag(tag)
controller.Robot___internalGetDeviceTagFromIndex(index)
controller.Robot___internalGetDeviceTagFromName(name)
controller.Robot___internalGetDeviceTypeFromTag(tag)
controller.Robot_getDeviceFromTag(tag)
class controller.Skin(name)

Bases: controller.Device

getBoneCount()
getBoneName(index)
getBoneOrientation(index, absolute)
getBonePosition(index, absolute)
setBoneOrientation(index, orientation, absolute)
setBonePosition(index, position, absolute)
property thisown

The membership flag

class controller.Speaker(name)

Bases: controller.Device

getEngine()
getLanguage()
isSoundPlaying(sound)
isSpeaking()
static playSound(left, right, sound, volume, pitch, balance, loop)
setEngine(engine)
setLanguage(language)
speak(text, volume)
stop(sound)
property thisown

The membership flag

controller.Speaker_playSound(left, right, sound, volume, pitch, balance, loop)
class controller.Supervisor

Bases: controller.Robot

animationStartRecording(file)
animationStopRecording()
exportImage(file, quality)
getFromDef(name)
getFromDevice(device)
getFromId(id)
getMovieStatus()
getRoot()
getSelected()
getSelf()
loadWorld(file)
movieFailed()
movieGetStatus()
movieIsReady()
movieStartRecording(file, width, height, codec, quality, acceleration, caption)
movieStopRecording()
saveWorld(*args)
setLabel(*args)
simulationGetMode()
simulationPhysicsReset()
simulationQuit(status)
simulationReset()
simulationResetPhysics()
simulationRevert()
simulationSetMode(mode)
startMovie(file, width, height, codec, quality, acceleration, caption)
stopMovie()
property thisown

The membership flag

virtualRealityHeadsetGetOrientation()
virtualRealityHeadsetGetPosition()
virtualRealityHeadsetIsUsed()
worldLoad(file)
worldReload()
worldSave(*args)
class controller.TouchSensor(name)

Bases: controller.Device

disable()
enable(samplingPeriod)
getLookupTable()
getSamplingPeriod()
getType()
getValue()
getValues()
property thisown

The membership flag