This is a listing of Services which can operate in MyRobotLab framework. You could think of these Services as being little software machines managing input, output and communicating to other systems.

master

Lm75a Temperature sensor Service

javadoc

LM75A is a simple temperature sensor that communicates thru i2c. 

It's service name in MRL is Lm75a.

You can find many different boards with this unit. On some of them you can change the i2c address, but several exists where you can't. If you want to use several lm75a on the same i2c bus use a board where you can change the addess, alternativley use the a multiplexer: http://myrobotlab.org/service/I2cMux

The default address is 0x48. The LM75A supports 8 different addresses from 0x48 thru 04F.

master

Osc Service

javadoc

Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or show control. OSC's advantages include interoperability, accuracy, flexibility and enhanced organization and documentation.

master

Ros Service

javadoc

This is a placeholder.

Looking into creating a functioning bridge to ROS

Resources:

master

VoiceRss Service

javadoc

You will need an api key from http://www.voicerss.org.  Quality is good. Its has slow responses, but the files will be cached.  Do not know what the max message length.

[[service/VoiceRss.py]]

Thank You moz4r / Steve for making and contributing this Service !
 
master

IntegratedMovement Service

javadoc

IntegratedMovement is a service that use inverse kinematic computation to control the position of a robot arms. So instead of moving each joints separatly, you give a position in a 3d space and the arm will take to position it need to reach that position.

Setup: 

Using InMoov service

The integratedMovement service have been add to the inMoov service and will load default setting.

the command to start the service is 

InMoov.startIntegratedMovement()

If the range of your servo do not correspond to the default setting, you can adjust the limits using

InMoov.IntegratedMovement.setMinMaxAngle(partName, minAngle, maxAngle)... partName is the same name as the servo that move a part. 

 

Using IntegratedMovement as standalone service

The IntegratedMovement can be use for any robot. You will need to define the DH parameters for each joints before you can use it. 

The first thing you must do is to declare a new DHRobotArm with setNewDHRobotArm(armName). This will create a new thread class that will command the arm or the robot.

Then you must setup the DHLinks for each joints of the arm. The DHLinks will define how a joints moves relatively to the previous joints. The DH parameters are explained in this video

https://www.youtube.com/watch?v=rA9tm0gTln8

If you want the same coordinated for all of your arms, they must start all your arms with a common link originated at the same point

To set the DHLinks, you must use one of those methods

  • setDHLink(armName, linkName, d, theta, r, alpha)
  • setDHLink(armName, servo, d, theta, r, alpha)

    • d, theta, r and alpha are the DH parameters (see the video)
    • the first version use a string as linkName. It will make a static link that don't rotate, but still take in account for the inverse kinetic algorythm
    • the second version initialize the link with information found in the servo class, like the min/max limits. It will also establish communication between the DHRobotArm and the Servo so when the servo moves the DHRobotArm get updated about the movement.

Finally, you start the DHRobotArm thread with startEngine(armName)

 

You can also setup physicals objects that will be taken in account by the inverse kinetic engine to avoid collision between the defined objects.

To add an virtual object in the environnement of your robot, you must use

  • addObject(OriginX, OriginY, OriginZ, EndX, EndY, EndZ, objectName, radius, jmeRender)

    • Object are all considered as a cylinder, so you must define a Origin and a End point relative to your first DHLink origin and a radius. Units must be the same as use for defining the DH parameters
    • jmeRender is a boolean (True/False) that will make the object appear (render) into the JmeApp if you are using it
    • the objects set are static and cannot be moved

To set your DHLink as objects you must use

  • addObject(objectName, radius, jmeRender)

    • Object name must be the same name as the DHLink it's link to
    • jmeRender is a boolean (True/False) that will make the object appear (render) into the JmeApp if you are using it
    • the inverse kinetic engine will update the position of the object, so you dont have to give an Origin and End point

the method objectAddIgnored(objectName1, objectName2) will make the inverse kinetic engine ignore collision between the two object defined. This may be necessary if two objects are too close that the engine detect them as colliding.

The kinect can be use to 'see'  the objects in front of the robot. You can start the kinect with startOpenNI(). the kinect is not reading the environment in real time yet, you must ask it to take a snapshot with processKinectData()

 

example: 

[[/service/IntegratedMovement.InMoov.py]]

master

Bno055 Service

javadoc

Intelligent 9-axis absolute orientation sensor

The BNO055 is a System in Package (SiP), integrating a triaxial 14-bit accelerometer, a triaxial 16-bit gyroscope with a range of ±2000 degrees per second, a triaxial geomagnetic sensor and a 32-bit cortex M0+ microcontroller running Bosch Sensortec sensor fusion software, in a single package.

[[/service/Bno055.py]]

References :

master

Esp8266_01 Service

javadoc

The Esp8266_01 service can be used to connect any of the i2c devices that exists in MRL to an ESP8266-01 or any other variant of ESP8266.

An ESP8266 is a small WiFi enabled device that comes in many different variants. The variant I have tested  is the ESP8266-01. The Esp8266-01 service acts as an i2cController, so any i2c device can be connected to is. So now we have: 

Wireless servos using Adafruit16CServoDriver

master

MarySpeech Service

javadoc

The MarySpeech Service can be used to generate speech from text using the MaryTTS project.

1. General

It's different from most other speech services (AcapellaSpeech & GoogleSpeech) as it is OPEN SOURCE (Yay!) and doesn't even require an internet connection (Yay! x2) as everything is generated locally and offline.

The downside is that you have to pre-download the rather big voice-file(s) you want to use.

master

DiyServo Service

javadoc

The DiyServo service is a service that can be used as a normal servo, but it's built from a motor and an analog input. The idea is that you should be able to use any motor and any analog input to byild your own servo. The circuit below can be used to connect the motor and the servo to a single Arduino. But it's also possible to configure in alternate ways. 

DiyServo

 

master

Pcf8574 I/O Expander Service

javadoc

The pcf8574 i/o expander is a circuit that can be used to expand the number of digitai I/O pins that you can use. It can be used as input, output or a combination of both. The device is i2c enabled so you can connect to it either thru the i2c interface on the Arduino or connect it directly to the i2c GPIO pins on a Raspberry PI. They come in a few different formats. The one I have tested looks like this: