mep-master (master) doxdox documentation

Memristor's Eurobot Platform

# Config()

Access to current configuration

# getDriver(driver)

Proxy to method Mep.DriverManager.getDriver(driver)

Parameters

Name Types Description
driver {String} - Driver name

# Log()

Logging system

# Mep()

Proxy to custom require(), Log, Config, DriverManager & services.

# Mep._driverManager()

Provides an instance of the DriverManager.

# Mep._motion()

Reference to motion service

# Mep._position()

Provides an instance of the PositionService.

# Mep._scheduler()

Provides an instance of the SchedulerService

# Mep._share()

Reference to share service

# Mep._terrain()

Provides an instance of the Terrain

# require(library)

Global function to require library relative to src directory

Parameters

Name Types Description
library String - Path to library

# Telemetry()

Telemetry logging system

# ync()

Initialize necessary modules. Should be called only once during an application bootstrapping

# genOn(tag, action)

Helper that generates query string for .on()

Parameters

Name Types Description
tag {String} - Message tag
action {String} - Message action

Returns

string

- Generated query string for .on()

# send(tag, action, params)

Send log or command to mep-dash.

Parameters

Name Types Description
tag {String} - Message tag
action {String} - Message action
params {Object} - Additional parameters of interest to action

# Telemetry()

Enables communication between mep-master and mep-dash.

# telemetry.emit()

Packet arrived

# DriverChecker()

A goal of the class is to check if drivers are correctly implemented.

# callMethodByGroup(type, method, params)

Get all drivers that can provide specific type of data (or execute specific command) and call method.

Eg. imagine you have laptop and monitor. If a monitor is not available then your laptop is it totally ok with it, image will be sent only to laptop's monitor. However, if there is a monitor connected to the laptop then laptop will be aware of monitor and it will send an image to monitor too. Your laptop don't really recognize difference between displays, and it communicates between them in very similar way. To sum up, the same is for this method, method will be called to all drivers that are the part of the group.

Parameters

Name Types Description
type String Data type which driver can provide. Can be: position & terrain.
method String Method to be called.
params Array Params to be passed to method.

# DriverChecker()

# DriverManager()

Class manipulate drivers

DriverManager provides mechanisms to:
  • initialize and configure drivers based on config files,
  • return instance of driver by driver unique identifier,
  • filter drivers by groups,
  • check if driver is available,
  • resolve dependencies and
  • put driver out of order or recover driver if it is possible.
Each driver can be part of one or more of following groups: control, terrain & position.

# getDriver(name)

Get driver instance by driver name

Parameters

Name Types Description
name String Driver name, eg. "MotionDriver", or "ModbusDriver".

# getDriversByGroup(type)

Get all drivers that can provide specific type of data.

Every driver that can provide a certain type of data has implemented universal mechanism for getting that data from the driver. That is extremely useful for services and in that case services implement only logic for data processing, not mechanisms for data collection from different drivers. Services are in this case also hardware independent.

Parameters

Name Types Description
type String Data type which driver can provide. Can be: position & terrain.

# init()

Initialize all drivers

# isDriverAvailable(name)

Returns true if driver is available

Parameters

Name Types Description
name String Driver name

# isDriverOutOfOrder(name)

Check if driver is out of order

Parameters

Name Types Description
name String Unique name of a driver

# putDriverOutOfOrder(name, message)

Put driver out of order

Parameters

Name Types Description
name String Unique name of a driver
message String Describe more why the fault happened

# _startCAN(device, bitrate)

private method

Start CAN bus device

Parameters

Name Types Description
device String
bitrate Number

# CanDriver()

Driver for CAN bus (Controller Area Network)

# canDriver.emit()

Data arrived for specific ID.

# canDriver.emit()

Data arrived.

# constructor(name, config, config.device, config.bitrate)

Parameters

Name Types Description
name String Unique name of a driver
config Object Configuration presented as an associative array
config.device String Device ID
config.bitrate Number CAN bus speed

# EventEmitter()

# send(id, buffer)

Send buffer to specific ID

Parameters

Name Types Description
id Number Device ID
buffer Buffer Data

# CanDriverSimulator()

Driver that simulates CAN bus

# EventEmitter()

# ColorDriver()

Driver detects color based on RGB components

# EventEmitter()

# getColor()

Get last read color

# rgbToHsl(r, g, b)

Converts an RGB color value to HSL. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes r, g, and b are contained in the set [0, 255] and returns h, s, and l in the set [0, 1].

Parameters

Name Types Description
r Number The red color value
g Number The green color value
b Number The blue color value

Returns

Array The HSL representation

# rgbToHsv(r, g, b)

Converts an RGB color value to HSV. Conversion formula adapted from http://en.wikipedia.org/wiki/HSV_color_space. Assumes r, g, and b are contained in the set [0, 255] and returns h, s, and v in the set [0, 1].

Parameters

Name Types Description
r Number The red color value
g Number The green color value
b Number The blue color value

Returns

Array The HSV representation

# start(interval)

Start reading data from sensor

Parameters

Name Types Description
interval Number Receive RGB components every interval[ms]

# stop()

Stop receiving RGB components

# DynamixelDriver()

Communicates with dynamixel servos (AX12 & RX24). NOTE: This class doesn't send start bytes & checksum, please make custom communicator (@dependecies.communicator) if you want these features.

# go(position, config, config.pollingPeriod, config.tolerance, config.timeout, config.firmwareImplementation)

Set servo to required position and get promise when position is reached

Parameters

Name Types Description
position {Number} - Required position in degrees
config Object Configuration options.
config.pollingPeriod Number Polling period for servo's present position in ms
config.tolerance Number Tolerated error in degrees
config.timeout Number Maximal time servo to reach a position in ms
config.firmwareImplementation Boolean Should it use firmware (true) or software (false) implementation. Firmware implementation is faster, however in that case we have to have a dedicated hardware (our actuator board supports it).

# TaskError()

# HBridgeDriver(config, config.cid, [email protected])

Parameters

Name Types Description
config Object Additional parameters
config.cid Number Communication ID
[email protected] String Name of communication driver

# TAG()

# constructor(name, config.infraredMaxDistance, config.sensorAngle, config.sensorX, config.sensorY, config.cid, config.objectSize, config['@dependencies'])

Make instance of InfraredDriver.

 Check image bellow to understand sensorAngle, sensorX & sensorY s1   s2   s3 \   |   / |---------| |  Robot  | |_________| Sensor s1 params: sensorAngle~=110, sensorY~10, sensorX~=10 Sensor s2 params: sensorAngle~=90, sensorY~=0, sensorX~=10 Sensor s3 params: sensorAngle~=60, sensorY~=-10, sensorX~=10 

Parameters

Name Types Description
name {String} - Unique driver name
config.infraredMaxDistance {Number} - Maximum distance when driver detects an object
config.sensorAngle {Number} - Angle relative to the robot (look at the picture above)
config.sensorX {Number} - Sensor translated on x coordinate
config.sensorY {Number} - Sensor translated on y coordinate
config.cid {Number} - Function ID for CAN driver
config.objectSize {Number} - Approximation coefficient for obstacle size. Distance between edges and point of interest,
config['@dependencies'] {String} - ID of Driver can provide communication between core and electronics

# disable()

Disable sensor

# enable()

Enable sensor

# EventEmitter()

# InfraredDriver()

Uses data from infrared sensors to determine where is an enemy robot and other obstacles.

# processDetection(buffer)

private method

Process detected obstacle

Parameters

Name Types Description
buffer {Boolean} - Object is detected or not

# this.emit()

Obstacle detected event.

# _addPointToPolyGenerator(angle, distance)

private method

Process a measurement and try to make an obstacle approximation. It uses bounding box algorithm to make an approximation of the obstacle

Parameters

Name Types Description
angle Number Angle of the measurement
distance Number Distance to the closest point at given angle

# _onDataReceived(data)

private method

Process data from lidar

Parameters

Name Types Description
data Buffer Buffer from lidar

# disable()

Disable lidar driver

# enable()

Enable lidar driver

# EventEmitter()

# LidarDriver()

Provides an abstraction layer on top of lidar's firmware and algorithms to determine robot's position and obstacles

# this.emit()

Position changed event.

# LunarCollectorDriver(config.leftTrack, config.rightTrack, config.leftHand, config.rightHand)

Parameters

Name Types Description
config.leftTrack String Name of Dynamixel driver which runs left track
config.rightTrack String Name of Dynamixel driver which runs right track
config.leftHand String Name of Dynamixel driver which runs left hand
config.rightHand String Name of Dynamixel driver which runs right hand

# TAG()

# constructor(name, config)

Creates instance of ModbusDriver

Parameters

Name Types Description
name {String} - Unique name of a driver
config {Object} - Configuration presented as an associative array

# ModbusDriver()

Driver for Modbus communication protocol.

# ModbusDriverBinder()

# super.emit()

Coil value changed event.

# super.emit()

Coil value changed event on single address.

# EventEmitter()

# ModbusDriverSimulator()

Simulation for Modbus communication protocol

# _onDataReceived(buffer, type)

private method

Callback will be called when new packet is arrived and it will dispatch event to new callback depending on packet type

Parameters

Name Types Description
buffer Buffer Payload
type String Packet type

# _onPReceived(buffer)

private method

Packet type P is received

Parameters

Name Types Description
buffer Buffer Payload

# constructor(name, config, config.startPosition, config.startOrientation, config.startSpeed, config.refreshDataPeriod, config.connectionTimeout, config.ackTimeout)

Parameters

Name Types Description
name String Unique driver name
config Object Configuration presented as an associative array
config.startPosition strategy.TunedPoint X coordinate for start position
config.startOrientation strategy.TunedAngle Start orientation
config.startSpeed Number Initial speed
config.refreshDataPeriod Number Get state from motion driver every refreshDataPeriod in ms
config.connectionTimeout Number Connection timeout in ms
config.ackTimeout Number Acknowledgment timeout

# finishCommand()

Finish moveToCurvilinear command and prepare robot for another one

# getPosition()

Get position of the robot

Returns

misc.Point

Position of the robot

# goForward(millimeters)

Move robot forward or backward depending on sign

Parameters

Name Types Description
millimeters Number

# init()

Check driver by checking checking communication with motion driver board

# MotionDriver()

Driver enables communication with Memristor's motion driver.

# moveToCurvilinear(position, direction, radius, tolerance)

Move robot to absolute position but robot make curves to speed up motion. This command requires finishCommand() before next motion command.

Parameters

Name Types Description
position misc.Point Required position of the robot
direction Number Direction, can be MotionDriver.DIRECTION_FORWARD or MotionDriver.DIRECTION_BACKWARD
radius Number
tolerance Number

# moveToPosition(position, direction)

Move robot to absolute position

Parameters

Name Types Description
position misc.Point Required position of the robot
direction Number Direction, can be MotionDriver.DIRECTION_FORWARD or MotionDriver.DIRECTION_BACKWARD

# Point()

# requestRefreshData()

Request state, position and orientation from motion driver

# reset()

Reset all settings in motion driver

# rotateFor(angle)

Rotate for given angle

Parameters

Name Types Description
angle Number

# rotateTo(angle)

Rotate robot to given angle

Parameters

Name Types Description
angle Number Angle

# setPositionAndOrientation(x, y, orientation)

Reset position and orientation

Parameters

Name Types Description
x {Number} - New X coordinate relative to start position of the robot
y {Number} - New Y coordinate relative to start position of the robot
orientation {Number} - New robot's orientation

# setSpeed(speed)

Set default speed of the robot

Parameters

Name Types Description
speed Number Speed (0 - 255)

# softStop()

Stop robot by turning off motors.

# stop()

Stop the robot.

# this.emit()

Position changed event.

# this.emit()

State change event.

# this.emit()

Orientation change event.

# MotionDriverController()

Remote controller for motion driver

# TAG()

# constructor(name, config)

Parameters

Name Types Description
name {String} - Unique driver name
config {Object} - Configuration presented as an associative array

# getPosition()

Get position of the robot

Returns

Point

- Position of the robot

# motionDriver.emit()

Position changed event.

# motionDriver.emit()

State change event.

# motionDriver.emit()

Orientation change event.

# MotionDriverBinder()

# MotionDriverNative()

Natively (C++) implemented driver that enables communication with Memristor's motion driver.

# MotionDriverSimulator()

MotionDriverSimulator simulation module. Has same methods as MotionDriver but this module send all commands to simulator.

# Point()

# EventEmitter()

# PinDriver()

Communicates with pins on microcontrollers.

# read()

Read value of given pin

# tValue()

Get last value

# write(value)

Write value to given pin

Parameters

Name Types Description
value Number [0, 1] for digital pins or [0 - 255] for analog pins

# EventEmitter()

# getTime()

Get time in seconds since match is started

Returns

number

- Seconds since match is started

# getTimeMills()

Get time in milliseconds since match is started

Returns

Number

Milliseconds since match is started

# StarterDriver()

Detects when rope is pulled out of the robot and starts counting game time.

# this.emit()

Tick event

# waitStartSignal()

Wait a start match signal (pulled rope, pressed key or delay)

Returns

Promise

# _onPacketReceived(packet, type)

private method

Method will be called only if protocol is not null and protocol generated packet.

Parameters

Name Types Description
packet Buffer Parsed packet
type String Single character that represents type of packet

# constructor(name, config.device, config.baudRate, config.protocol)

Parameters

Name Types Description
name {String} - Unique name of driver
config.device {String} - Linux dev which will be used for serial communication
config.baudRate {Number} - Bits per second
config.protocol {String} - Name of protocol that will be used under the hood, check list of available protocols in misc/protocols

# fs()

# send(buffer, callback, type)

Send data to Uart

Parameters

Name Types Description
buffer {Buffer} - Buffer of data which will be sent to uart
callback {Function} - Callback function which will be called after data is sent
type {Number} - Type of packet, will be ignored if protocol doesn't support

# Uart()

Driver enables uart communication with electronic boards

# Usage()

# UsageDriver()

Logs memory and cpu usage

# add(callback)

Subscribe on event. Add callback function to queue.

Parameters

Name Types Description
callback function - Pointer on callback function

# CallbackQueue()

Queue of callback functions. It used when you want to allow other modules to subscribe to your events.

# notifyAll(params)

Call all callback functions from queue with same parameters.

Parameters

Name Types Description
params Array - Params which will passed to callback functions

# TAG()

# CircularBuffer()

Implementation of circular buffer using Node.js's Buffer

# delay(milliseconds)

Synced setTimeout()

Parameters

Name Types Description
milliseconds Number Milliseconds to sleep

# constructor(startPoint, endPoint)

Parameters

Name Types Description
startPoint misc.Point Start point of the line
endPoint misc.Point End point of the line

# getEndPoint()

Get end point

Returns

misc.Point

# getStartPoint()

Get start point

Returns

misc.Point

# isIntersectWithLine(line)

Check if it intersect with another line

Parameters

Name Types Description
line misc.Line Another line to check intersection with

Returns

Boolean

True if two lines intersect

# isIntersectWithPolygon(polygon)

Check if it intersect with polygon

Parameters

Name Types Description
polygon misc.Polygon Polygon to check intersection with

# Line()

Line in 2D space

# Point()

# clone()

Clone the point

Returns

misc.Point

Cloned point

# constructor(x, y)

Make new point.

Parameters

Name Types Description
x Number X coordinate
y Number Y coordinate

# equals(point)

Check if points are equal

Parameters

Name Types Description
point Point Another point to be compared

# getDistance(point)

Calculate Euclidean distance between two Points

Parameters

Name Types Description
point misc.Point Another point to compare with

# getX()

Return x coordinate

# getY()

Returns y coordinate

# Point()

Point in 2D space

# rotate(originPoint, angleDegrees)

Rotate point around origin point

Parameters

Name Types Description
originPoint misc.Point Origin point
angleDegrees Number Rotation angle

# rotateAroundZero(angleDegrees)

Optimized algorithm for point rotation around coordinate beginning

Parameters

Name Types Description
angleDegrees {Number}

# setX(x)

Set X coordinate

Parameters

Name Types Description
x Number X coordinate

# setY(y)

Set Y coordinate

Parameters

Name Types Description
y Number Y coordinate

# translate(translatePoint)

Translate point

Parameters

Name Types Description
translatePoint

# clone()

Clone a polygon

# constructor(tag, duration, points)

Parameters

Name Types Description
tag String Additional information about polygon to describe it
duration Number Polygon will be destroyed after given number of milliseconds
points Array<misc.Point> Array of points which can describe an polygon

# getDuration()

# getPoints()

# getTag()

# Point()

# Polygon()

Describes an polygon

# rotate(originPoint, angleDegrees)

Rotate all points of polygon around an origin point

Parameters

Name Types Description
originPoint misc.Point Center point of rotation
angleDegrees Number Required angle of rotation

# rotateAroundZero(angleDegrees)

Optimized algorithm for polygon rotation around coordinate beginning

Parameters

Name Types Description
angleDegrees Number

# translate(translatePoint)

Translate all points of polygon

Parameters

Name Types Description
translatePoint misc.Point Point which represents x and y value of translation

# constructor(config.bufferSize, config.onDataCallback)

Parameters

Name Types Description
config.bufferSize {Number} - Length of receive buffer
config.onDataCallback {Function(data, type)} - Pointer on callback which be called when data is ready

# generate(buffer, type)

Generate packet

Parameters

Name Types Description
buffer {Buffer} - Payload for packet
type {Number} - Type for packet, if it is not defined int('U') will be used

# PLLSP()

Packetized Low-Level Secured Protocol

 0                   1                   2                   3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +--------------+-------+-------+---------------+----------------+ |  Start Byte  | Header|Payload|  Packet type  | Payload length | |    (0x3C)    |    Checksum   |               |                | +-------------------------------- - - - - - - - - - - - - - - - + :                     Payload Data continued ...                : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + |                     Payload Data continued ...                | +---------------------------------------------------------------+ 

# push(chunkBuffer)

Push received data to receive buffer

Parameters

Name Types Description
chunkBuffer {Buffer} - Chunk buffer

# _goSingleTarget(point, params, params.backward, params.tolerance, params.speed)

private method

Go to single point without advanced features

Parameters

Name Types Description
point misc.Point Target point
params Object Additional options
params.backward Boolean Move robot backward
params.tolerance Number Max radius
params.speed Number Speed

Returns

Promise

# go(tunedPoint, parameters, parameters.pf, parameters.backward, parameters.rerouting, parameters.relative, parameters.tolerance, parameters.speed, parameters.obstacle, parameters.friend)

Move the robot, set new position of the robot

Parameters

Name Types Description
tunedPoint TunedPoint Point that should be reached
parameters Object Configuration options.
parameters.pf Boolean Use terrain finding algorithm.
parameters.backward Boolean Set backward robot moving.
parameters.rerouting Boolean Enable rerouting during the movement.
parameters.relative Boolean Use relative to previous position.
parameters.tolerance Number Position will consider as reached if Euclid's distance between current and required position is less than tolerance.
parameters.speed Number Speed of the robot movement in range (0, 255).
parameters.obstacle Number Time [ms] after command will be rejected (with TaskError.action === 'obstacle') if obstacle is detected in hazard region
parameters.friend Number Time [ms] after command will be rejected (with TaskError.action === 'friend') if friend is detected in hazard region

# MotionService()

Provides a very abstract way to control and estimate robot position

# rotate(tunedAngle, options)

Rotate robot for an angle

Parameters

Name Types Description
tunedAngle TunedAngle Angle to rotate
options Object Additional options

# stop(softStop)

Stop the robot

Parameters

Name Types Description
softStop Boolean If true robot will turn of motors

# straight(millimeters, params, params.speed)

Move robot forward or backward depending on param millimeters

Parameters

Name Types Description
millimeters Number Path that needs to be passed. If negative robot will go backward
params Object
params.speed Number Speed

# TaskError()

# MotionTarget()

Target (point & params) that robot has to reach

# TAG()

# addPointBack(point, params)

Add single point at the end of the queue

Parameters

Name Types Description
point {misc.Point} - Point
params {Object} - Params for target

# addPointFront(point, params)

Add single point at the beginning of the queue

Parameters

Name Types Description
point misc.Point Point
params Object Params for target

# addPointsBack(points, params)

Add points at the end of the queue

Parameters

Name Types Description
points {Array<misc.Point>} - Array of points
params {Object} - Params for each target

# addPointsFront(points, params)

Add points at the beginning of the queue

Parameters

Name Types Description
points {Array<misc.Point>} - Array of points
params {Object} - Params for each target

# empty()

Delete all items from queue

# getPfLine()

Make line between current position and target if path finding is enabled

# getPfTarget()

Get final target of path finding algorithm if path finding is enabled

# getTargetBack()

Get target at the end of the queue

# getTargetFront()

Get target at the front of queue

# getTargets()

Get all targets

# isEmpty()

Check if queue is empty

# MotionTarget()

# MotionTargetQueue()

Queue of targets (points) that robot has to reach.

# removeBack()

Remove target from back of queue

# removeFront()

Remove target from front of queue

# getOrientation()

Get current robot's orientation

# getPosition()

Get current robot's position

# Point()

# PositionService()

Implements algorithms to collect data from sensors and determine current robot's location

# k(tasks)

Algorithm to choose the best task

Parameters

Name Types Description
tasks Array<strategy.Task> Array of available tasks

# SchedulerService()

Implements algorithms to schedule task execution

# Task()

# EventEmitter()

# ShareService()

Automatically shares position, obstacles and task statuses between robots and provides simple API to share custom messages.

# this.emit()

Packet arrived

# EventEmitter()

# this.emit()

Packet arrived

# Udp()

Provides sharing based on UDP protocol. Same prototype should be used for other protocols.

# Point()

# TerrainService()

Class represent obstacles on the terrain and mechanism to search terrain between objects.

# constructor(maxX, minX, maxY, minY)

Creates terrain finding algorithm for an area

Parameters

Name Types Description
maxX {Number} - Maximal value of X coordinate
minX {Number} - Minimal value of X coordinate
maxY {Number} - Maximal value of Y coordinate
minY {Number} - Minimal value of Y coordinate

# PathFindingBinder()

# super.addObstacle(points)

Parameters

Name Types Description
points Array<misc.Point> - Array of points that represent polygon

Returns

Number

- ID of the obstacle

# super.removeObstacle(id)

Parameters

Name Types Description
id Number - ID of the obstacle

# super.search(start, goal)

Parameters

Name Types Description
start misc.Point - Start point
goal misc.Point - Goal point

Returns

Array<misc.Point>

- Array of pairs (x, y)

# kError(reason)

Run default action if there is the exception in task is not caught with try {} catch(e) {}.

Parameters

Name Types Description
reason TaskError Describes more about an exception

# ks()

Get all registered task

# Scheduler()

Default scheduler class describes general task scheduling and robot behaviour

# TAG()

# Shortcut()

Populates global space with short functions and variables in order to provide easier and faster way to write strategies. NOTE: Polluting a global space generally is not a good way to go, however after a year of experience in this case it is a good solution.

# TunedPoint()

# ACTIVE()

Task is executing

# constructor(scheduler, parameters, parameters.weight, parameters.time, parameters.location)

Default constructor for task

Parameters

Name Types Description
scheduler {Scheduler} Reference to strategy's scheduler
parameters Object Additional params
parameters.weight Number Importance of the task, initial order
parameters.time Number Predicted time to be executed
parameters.location misc.Point Predicted area of execution

# finish()

Finish this task and run next one

# FINISHED()

Task is finished and it is not be consider in the future

# getState()

Get current state

# getTime()

Get predicted time of current task

# getWeight()

Get weight of current task

# isAvailable()

Condition which will be checked by SchedulerService to decide to run task or not. Eg. Release lunar modules only if there is lunar modules inside robot

# onRun()

This method will be executed as soon as mep run this task

# plusPriority()

Change priority during runtime

# Point()

# READY()

Task is ready to be executed

# run()

Run current task and change a state

# setState(state)

Set current state

Parameters

Name Types Description
state Number Can be Task.READY, Task.SUSPENDED, Task.ACTIVE and Task.FINISHED

# setWeight(weight)

Change default weight of the task

Parameters

Name Types Description
weight {Number}

# suspend()

Suspend this task and run next one

# SUSPENDED()

Task is suspended and waiting a chance to become ready

# Task()

Default task class describes general task robot behaviour during task execution

# constructor(source, action, message, params)

Default constructor for class

Parameters

Name Types Description
source String Name of module which thrown an error
action String Unique identifier for task error
message String Describes more about task error
params Object Additional parameters to describe an error

# TaskError()

Describes an error during strategy execution (eg. robot stuck)

# constructor(defaultAngle)

Add multiple angles, add angle for each table. It must has at least one angle which will be used as default. Other angles must have tag!

Parameters

Name Types Description
defaultAngle Number Default point X coordinate

# getAngle()

Get angle depending on the chosen table in configuration.

# TAG()

# TunedAngle()

Tunable angle. Angle is chosen depends on table name in configuration.

# constructor(defaultX, defaultY)

Add multiple Points, add Points for each table. It must has at least one Point which will be used as default. Other Points must have tag!

Parameters

Name Types Description
defaultX Number Default point X coordinate
defaultY Number Default point Y coordinate

# getPoint()

Get point depending on the chosen table in configuration.

# Point()

# TunedPoint()

Tunable Point. Point coordinates are choose depends on table name in configuration.

# Console()

Simplified functions for mep command prompt. All methods are accessible by using t. prefix.

# driver(id)

List driver properties for driver with id

Parameters

Name Types Description
id String

# drivers()

List all available drivers for current current configuration

# forward(millimeters)

Go forward

Parameters

Name Types Description
millimeters

# go(x, y, config)

Go to (x, y) position.

Parameters

Name Types Description
x Number
y Number
config Object

# home()

Return robot to home

# rotate(angle, config)

Rotate to angle

Parameters

Name Types Description
angle
config

# test()

Motion driver test, drive robot in rectangle.

# onRun()

# Console()

Simplified functions for mep command prompt. All methods are accessible by using t. prefix.

# driver(id)

List driver properties for driver with id

Parameters

Name Types Description
id String

# drivers()

List all available drivers for current current configuration

# forward(millimeters)

Go forward

Parameters

Name Types Description
millimeters

# go(x, y, config)

Go to (x, y) position.

Parameters

Name Types Description
x Number
y Number
config Object

# home()

Return robot to home

# rotate(angle, config)

Rotate to angle

Parameters

Name Types Description
angle
config

# test()

Motion driver test, drive robot in rectangle.