Wrapper for the Sarxos WebCam library
Next version 'Nixie' is coming soon !
######################################### # JMonkeyEngine.py # description: used as a general template # categories: simulator # more info @: http://myrobotlab.org/service/JMonkeyEngine ######################################### # start the service jmonkeyengine = runtime.start('jmonkeyengine','JMonkeyEngine')
!!org.myrobotlab.service.config.JMonkeyEngineConfig cameraLookAt: null listeners: null modelPaths: [ ] multiMapped: { } nodes: { } peers: null test: !!set { } type: JMonkeyEngine
Overview
JMonkey (http://jmonkeyengine.org/) is a open source game engine, made especially for Java game developers who want to create 3D games. But it also works as a very capable simulator with tight integration to MRL.
I think it has enormous potential to begin providing a robotic "Mind State" - where real sensors generate virtual walls. Or information from OpenCV is used to mark, tag or label 3D objects. This can be central to how the robot "sees" the outside world.
################################################################################## # Deeplearning4j.py # description: A wrapper service for the Deeplearning4j framework. # categories: ai # more info @: http://myrobotlab.org/service/Deeplearning4j ################################################################################## # start the deeplearning4j service deeplearning4j = runtime.start('deeplearning4j','Deeplearning4j') # load the VGG16 model from the zoo deeplearning4j.loadVGG16() # run an image file through the model and get the classifications / confidence classifications = deeplearning4j.classifyImageFileVGG16("image0-1.png") # print them out... it's a dictionary/map of label to confidence level (between 0-1) for label in classifications: print(label + " : " + str(classifications.get(label)))
!!org.myrobotlab.service.config.ServiceConfig listeners: null peers: null type: Deeplearning4j
######################################### # MotorPort.py # categories: motor # more info @: http://myrobotlab.org/service/MotorPort # Used for motor controllers which define "Ports" ######################################### # uncomment for virtual hardware from org.myrobotlab.service import Serial # virtual = True # sabertooth serial port - if on windows might be COM4 # port = "COM14" # port = "/dev/ttyUSB0" # I use udev rules to always make it the same port port = "/dev/ftdi0" # controller index for the joystick controllerIndex = 0 # start optional virtual serial service, used for test if ("virtual" in globals() and virtual): # use static method Serial.connectVirtualUart to create # a virtual hardware uart for the serial service to # connect to uart = Serial.connectVirtualUart(port) uart.logRecv(True) # dump bytes sent from sabertooth # TODO - list & print controllers # TODO - list & print controllers # TODO - list & print axis # start the services sabertooth = runtime.start("sabertooth","Sabertooth") m1 = runtime.start("m1","MotorPort") m2 = runtime.start("m2","MotorPort") joy = runtime.start("joy","Joystick") joy.setController(controllerIndex) # configure services m1.setPort("m1") m2.setPort("m2") # in some cases its necessary to "invert" a motor m1.setInverted(True) m2.setInverted(True) # attach services sabertooth.attach(m1) sabertooth.attach(m2) m1.attach(joy.getAxis("y")) m2.attach(joy.getAxis("rz")) # FIXME - sabertooth.attach(motor1) & sabertooth.attach(motor2) # FIXME - motor1.attach(joystick) ! sabertooth.connect(port) m1.stop(); m2.stop(); # call the function autoTest if you want code to # run through a test vs joystick input def autoTest(): # speed up the motor for x in range(0,100): pwr = x * .01 print('power ', pwr) m1.move(pwr) sleep(0.01) sleep(1) # slow down the motor for x in range(100, -1, -1): pwr = x * .01 print('power ', pwr) m1.move(pwr) sleep(0.01) # move motor clockwise m1.move(0.3) sleep(1) m1.stop() # move motor counter-clockwise m1.move(-0.3) sleep(1) m1.stop() sleep(3) autoTest()
!!org.myrobotlab.service.config.MotorPortConfig axis: null controller: null listeners: null locked: false mapper: clip: true inverted: false maxIn: 100.0 maxOut: 100.0 minIn: -100.0 minOut: -100.0 peers: null port: null type: MotorPort
A motor service used to support "Port" defined motor controllers like the Sabertooth & AdaFruitMotorShield motor controller.
######################################### # Security.py # description: used as a general template # categories: simulator # more info @: http://myrobotlab.org/service/Security ######################################### # start the service security = runtime.start("security","Security") # store & crypt secret infomations # these lines are added only one time the program is run.. then they are deleted # so that the "actual" keys are no longer in the script ! - and the encrypted keys # exist on the file system (don't forget to delete these lines after you add your secrets) security.addSecret("amazon.polly.user.key", "FIE38238733459852"); security.addSecret("amazon.polly.user.secret", "Ujffkds838234jf/kDKJkdlskjlfkj"); security.saveStore() # get & decrypt secret infomations security.loadStore() print security.getSecret("amazon.polly.user.key") print security.getSecret("amazon.polly.user.secret")
If you have something to hide this service is for you !
Useful to store passwords or secrets keys ( like api keys ) inside an AES safe and expose some code lines.
It is important to never expose API keys inside any script !
Damn .. from its first nervous steps a couple years ago, to now backflips ! ..
That's just ... wow .... speechless
Thanks @Humanoid for sharing the link !
WOOHOO ! .. 555 Tests a new record .. And we've moved from A- to