Пример #1
0
#!/usr/bin/env python

from barobo import Linkbot, BaroboCtx
import barobo
import time

if __name__ == "__main__":
    linkbot = Linkbot()
    linkbot.connectBluetooth('00:06:66:4D:F6:6F')

    linkbot.setAcceleration(240)
    linkbot.recordAnglesBegin()
    for _ in range(3):
        linkbot.setJointStates([
            barobo.ROBOT_FORWARD, barobo.ROBOT_FORWARD, barobo.ROBOT_BACKWARD
        ], [120, 120, 120])
        time.sleep(2)
        linkbot.setJointStates([
            barobo.ROBOT_BACKWARD, barobo.ROBOT_BACKWARD, barobo.ROBOT_FORWARD
        ], [120, 120, 120])
        time.sleep(2)
    linkbot.stop()
    linkbot.recordAnglesEnd()
    linkbot.recordAnglesPlot()
Пример #2
0
#!/usr/bin/env python

from barobo import Linkbot

if __name__ == "__main__":
    linkbot = Linkbot()
    linkbot.connect()
    linkbot.resetToZero()
    linkbot.recordAnglesBegin(delay=0.1)
    linkbot.smoothMoveTo(1, 100, 100, 120, 360)
    linkbot.smoothMoveTo(2, 100, 100, 120, 360)
    linkbot.smoothMoveTo(3, 100, 100, 120, 360)
    linkbot.moveWait()
    linkbot.recordAnglesEnd()
    linkbot.recordAnglesPlot()
Пример #3
0
#!/usr/bin/env python

from barobo import Linkbot, BaroboCtx
import barobo
import time

if __name__ == "__main__":
    linkbot = Linkbot()
    linkbot.connectBluetooth('00:06:66:4D:F6:6F')

    linkbot.setAcceleration(240)
    linkbot.recordAnglesBegin()
    for _ in range(3):
        linkbot.setJointStates(
                [barobo.ROBOT_FORWARD, barobo.ROBOT_FORWARD, barobo.ROBOT_BACKWARD], 
                [120, 120, 120])
        time.sleep(2)
        linkbot.setJointStates(
                [barobo.ROBOT_BACKWARD, barobo.ROBOT_BACKWARD, barobo.ROBOT_FORWARD], 
                [120, 120, 120])
        time.sleep(2)
    linkbot.stop()
    linkbot.recordAnglesEnd()
    linkbot.recordAnglesPlot()