2016 summer research report

9
Using Bayesian Optimization to Determine Effective Locomotion Techniques for Tensegrity Robots James Boggs, John Rieffel September 16, 2016 Abstract The field of soft robotics has gained interest as researchers realize its potential. NASA has been examining tensegrities, a subclass of soft robots, for use in planetary exploration due to their ability to be flattened and restored, as well as their compressibility. One major challenge in utilizing tensegrities has been movement, since tensegri- ties are, by nature, highly vibrationally active. In previous work with Prof. John Rieffel, I used a six-bar tensegrity to demonstrate the use of vibrating motors as a means of locomotion. In this presentation, I discuss research on the use of Bayesian optimization to allow the robot to rapidly find optimal vibration frequencies for quick, straight movement. I developed C++ code which sent instructions to motor controllers, which then rotated three vibrating motors on the robot. The code also leveraged OpenCV and a webcam to track the robot as it moved. I used a test bed which used a webcam to track the robot as we fed its motors signals through magnet wire. We used the LIMBO Bayesian optimization library to attempt to find the optimal set of three frequencies to produce fast and straight motion. Each test con- sisted of the algorithm guessing three frequencies, running them for three seconds, and recording the movement of the robot. Through the use of Bayesian optimization, we found several frequency sets which produced rapid, straight movement in the robot. However, further investigation may be needed to confirm that Bayesian optimization is the best movement learning solution for tensegrities. 1

Upload: james-boggs

Post on 16-Apr-2017

27 views

Category:

Documents


0 download

TRANSCRIPT

Using Bayesian Optimization to DetermineEffective Locomotion Techniques for

Tensegrity Robots

James Boggs, John Rieffel

September 16, 2016

Abstract

The field of soft robotics has gained interest as researchers realizeits potential. NASA has been examining tensegrities, a subclass ofsoft robots, for use in planetary exploration due to their ability to beflattened and restored, as well as their compressibility. One majorchallenge in utilizing tensegrities has been movement, since tensegri-ties are, by nature, highly vibrationally active. In previous work withProf. John Rieffel, I used a six-bar tensegrity to demonstrate the useof vibrating motors as a means of locomotion. In this presentation,I discuss research on the use of Bayesian optimization to allow therobot to rapidly find optimal vibration frequencies for quick, straightmovement. I developed C++ code which sent instructions to motorcontrollers, which then rotated three vibrating motors on the robot.The code also leveraged OpenCV and a webcam to track the robot asit moved. I used a test bed which used a webcam to track the robot aswe fed its motors signals through magnet wire. We used the LIMBOBayesian optimization library to attempt to find the optimal set ofthree frequencies to produce fast and straight motion. Each test con-sisted of the algorithm guessing three frequencies, running them forthree seconds, and recording the movement of the robot. Through theuse of Bayesian optimization, we found several frequency sets whichproduced rapid, straight movement in the robot. However, furtherinvestigation may be needed to confirm that Bayesian optimization isthe best movement learning solution for tensegrities.

1

Introduction

Although the usage of soft (i.e. non-rigid) materials in robotics has beenaround for a while now, only recently have robotics researchers begun tofocus specifically on the application of soft materials in robotics. The fieldof soft-robotics arose out of the realization that many biological systemsare made up primarily of soft, rather than rigid, elements, and grew outof the more general field of biologically inspired robotics. The impetus forthis development was that the short-comings of rigid robotics were becom-ing clearer: rigid structures break more easily and are less dynamic thanbiological inspired structures.

Tensegrities, for example, are able to easily deform and reform, to bounce,and even to be collapsed and deployed; all without intricate and delicate me-chanical systems. This makes tensegrities ideal for a variety of situationswhere traditional robots lack the dynamism and flexibility needed. In searchand rescue situations, for example, traditional robots need to be able tonavigate uneven and unpredictable terrain. Although treads and other tra-ditional robotic solutions exist for moving along surfaces, tunnels and holeswhich may be oddly shaped and impassable to traditional robots can beovercome by tensegrities which can deform to fit their environment.

Another potential use for tensegrity robots is exo-planetary exploration,which was the focus of this research. NASA has been examining the pos-sibilities of using large tensegrity robots for exploring other celestial bodieson account of the ease with which they can be transported and deployed.

Figure 1: NASA’s tensegrityrobot, Super Ball Bot.

Because tensegrities can be collapsed intoa small profile by loosening the springyelements of their construction, a largetensegrity robot can be rolled up orfolded, and then stored in a much smallerarea than its full size. This meansa tensegrity would be far more spaceefficient as a payload than traditionalrobots. Moreover, because tensegritiesare largely air by volume, composed oflight-weight rods and springs, they weighmuch less than dense traditional robots,enhancing their efficiency as a payload.Their springy nature also makes them

2

far more impact tolerant, requiring less delicacy when landing them on atarget[1].

One obstacle in developing tensegrities for use as exploratory vehicles istheir locomotion. The same aspect which makes tensegrities so interestingand useful – their springiness – also present a challenge for designing effectivelocomotive techniques. Wheels, treads, legs, and other traditional methodsof movement are inappropriate for tensegrities because they are contrary tothe main benefits of tensegrities: they are heavy, voluminous, and inflexible.Therefore roboticists interested in designing tensegrities and organizationsinterested in using them must find an effective yet novel method of loco-motion. Prior to research undertaken by Mark Khazanov, Ben Humphreys,William Keat, and John Rieffel, attempts at developing locomotive meth-ods for tensegrities emphasized overcoming or suppressing the vibrationalactivity of the tensegrity in order to gain more control. Instead, Khazanov,Humohreys, Keat, and Rieffel focused on utilizing the vibrational activity,testing and demonstrating the effectiveness of moving a tensegrity by vi-brating it. Although they showed it was possible to elicit motion from atensegrity using on-board vibrating motors, they also found that the tenseg-rity reacted chaotically to vibrational inputs. This means that the outcomeof any particular set of frequencies at which the on-board motors vibrated isnearly impossible to predict[2].

In order to overcome the challenge of chaotic responses to vibrationalstimuli, Rieffel and Jocques investigated using genetic algorithms to evolve aset of behaviors which were known to be effective. Although this yielded somepositive results, including demonstrating the viability of moving a tensegrityusing vibrational motors, it did not appear to be the most effective methodand the research was primarily focused on proving that gaits could be evolvedon a physically embodied tensegrity rather than on producing truly effectivelocomotion[3]. This paper attempts to bridge that gap by testing Bayesianoptimization as a potential method of generating effective gaits on a physi-cally embodied tensegrity. Using Bayesian optimization for generating gaitswould allow tensegrities to autonomously develop effective gaits on novelsurfaces such as a celestial body.

3

Methodology

In order to test the effectiveness of Bayesian optimization in generatingeffective gaits for tensegrity robots, we utilized a physically embodied six-bartensegrity robot, connecting it to a laptop running a program which bothtested and evaluated motor frequencies. The tensegrity itself is comprisedof six carbon fiber ”struts.” Each strut is a rectangular prism is 10cm longwith a width and depth of 6cm. Capping each end of the struts are a pairof white plastic washers which are attached using plastic screws to the strutitself. Each of these washers have four holes in them, through which springsare attached. Each spring is fastened between two different struts, and thetensions of the springs, in combination with the rigidity of the struts, hold thetensegrity together. Attached to each of the three struts which contact theground on the downward face is a 12mm vibration motor, which is the methodof vibrating the tensegrity. Each of these three motors in then attached viamagnet wire to a motor controller. On each of the three topmost plasticwashers, a colored puff ball is attached – one red, one green, and one blue –which are used to track the movement of the tensegrity. Figure 1 presents aclose-up view of VALTR.

Figure 2: The tensegrity robot we used,VALTR, sitting on his testbed.

In order to translate thecomputer code written to con-trol and test VALTR into mo-tor signals, we use a Sparkfun5v FTDI Basic, which allowsus to break out a USB cable.Wired to the FTDI breakoutin serial are two Pololu 2s9v1dual motor controllers, whichallows the computer to inter-face with the tensegrity. Weuse a voltage generator pro-ducing a steady 7.5v wired tothe motor controllers in orderto power the vibration mo-tors.

The heart of our re-search, however, was the C++code which attempted to use

4

Bayesian optimization to find optimal motor frequencies. In particular, weattempted to optimize the total displacement of the tensegrity after threeseconds of motor activation. The program we developed had three majorparts: one which controlled the tensegrity itself by sending signals throughthe USB cable to the motor controllers, one which tracked the robot usinga webcam above the testbed and the colored puff balls on the robot, andone which ran a Bayesian optimzation algorithm by pulling data from thetracking code and sending instructions to the controller code.

The controller portion of the code worked fairly simply: it connected towhichever USB port was connected to the FTDI breakout, and then con-verted input parameters representing the frequency and direction of the mo-tors into 8-byte signals sent through the USB cable to the motor controllers.The code accepted inputs from -127 to 127 inclusive. The tracking part ofthe program was slightly more complicated. We created an object – calledEye – which connected to the webcam via USB and used OpenCV to trackthe tensegrity. In more detail, the code used OpenCV to capture live videofrom the webcam, then duplicated each frame three times. Each of theseduplicates was then thresholded by HSV values, so that in each duplicateonly one of the puff balls was visible. The center of the puff ball in eachframe was then identified using blob tracking, and the center of the tenseg-rity itself was found by averaging those three centers. The heading of thetensegrity was identified by drawing to lines from the center of the tensegrity,one directly horizontal and one towards the blue puff ball, and the findingthe angle between these lines.

We utilized the LIMBO C++ library, written by Antoine Cully, Jean-Baptiste Mouret, Konstantinos Chatzilygeroudis, and Federico Allocati. Self-described as ”A lightweight framework for Bayesian and model-based optimi-sation of black-box functions (C++11),”[4] LIMBO offers the ability to easilyconduct Bayesian optimization using a pre-built framework. The idea behindBayesian optimization is to try and establish increasingly accurate guesses asto the maximum of a black-box function using Bayesian statistics. A black-box function is one where the input domain and output co-domain are know,but the relationship between the two is not. In our case, the function wasthe relationship between motor frequencies and the total displacement of thetensegrity after three seconds. The input domain was [−127, 127]3, or theset of 3-tuples whose members were between -127 and 127, inclusive, whichrepresented the frequency and direction which each motor vibrated. The 3-tuple (-127, 0, 127), for example, would indicate that motor 1 was rotating

5

as fast as it could in reverse, motor 2 was still, and motor 3 was spinning asfast as possible forward. The output domain was R, the set of real numbers,which represented the total displacement of the tensegrity in pixels.

The Bayesian optimization algorithm works by first investigating somenumber of points in the domain, and then using their outputs as statisticalpriors in attempting to guess where the maximum of the function is located.In our case, that meant running evaluations using a number of different,randomly generated 3-tuples which corresponded to motor frequencies, andthen trying to find the 3-tuple which results in the greatest displacement.The LIMBO framework allows us to easily set up a single Eval function, intowhich a 3-tuple is inputted and from which a single displacement value isgenerated. In this case, our Eval function used the tracking portion of oursoftware to find the initial location of the tensegrity, and then sent signalsto the motor controllers according to the locations in the domain which thealgorithm was investigating. It watched the tensegrity as it moved acrossthe testbed, and cut the evaluation short if it detected that the tensegrityhad rotated more the 60 degrees from its original heading. We implementedthis in order to cut short evaluations of frequencies which produced mostlyrotation, since these would likely not end up being efficient gaits. Finally, itlocated the final position of the tensegrity after three seconds and calculatedthe displacement. Then it recorded the path of the tensegrity as a data fileand moved on to the next test.

The LIMBO framework allows us not only to create an easily testedEval function, it also allows us to define a number of parameters relating tothe execution of the Bayesian optimization. Among these were the numberof random tests prior to attempting the actual optimization, the numberof evaluations, the noise in the generation of new points to evaluate, andthe tendency of the algorithm towards either exploration of new points orexploitation of points known to produce high displacement. We carried outa number of tests in which these parameters varied, in order to test theeffectiveness of Bayesian optimization for a range of different parameters.

Results

In performing the tests using Bayesian optimization, we were looking tosee whether the algorithm was able to truly optimize the gait of the tenseg-rity. If Bayesian optimization is effective, we would expect to see a consistent

6

Figure 3: A graph showing the displacement for each evaluation of theBayesian optimization algorithm for three different series of trials. Eachseries used different parameters for the algorithm.

increase in displacement as it worked its way towards the optimal input. Al-though slight decreases in displacement would be expected, a general positivetrend in displacement should emerge if the results of successive evaluationsare analyzed together. However, we did not find this predicted trend. In-stead, there was no clear trend between progressive evaluations of the algo-rithm and an increase in displacement. As figure 3 shows clearly, there isno distinct trend or correlation between the number of evaluations the al-gorithm has run and the displacement of the tensegrity. More concretely,the R2 values of the three series are respectively 0.0187, 0.0003, and 0.0247.This is representative of all of the tests performed, whose average R2 valuewas approximately 0.01945. A more interesting result was that there is alsovery little to no correlation between the magnitude of the change betweenguessed input tuples and the magnitude of the change of the displacementfrom those tuples. That is to say, changing the input frequencies slightly andsignificantly produce similar changes in the resulting displacement. Figure4, a scatter plot which shows how the magnitude of a change in motor fre-quencies compares to the displacement for that run, demonstrates this well.

7

Figure 4: A scatter plot showing the change in displacement for each changein input tuple.

The R2 values of the series, which are the same series of trials from Figure 3,are respectively 0.00001, 0.0002, and 0.0081. Although this is not an entirelyuseful metric, since the magnitude of the change of the frequency set doesn’treflect the direction in which it changed, it does tell us that the movementfunction of the tensegrity is fairly noisy. Since there seems to be no rela-tion between distance traveled in the input space and the magnitude of thechange in terms of resultant displacement, it seems unlikely that the functionis smooth. That is, locations which are near each other in input space don’tcorrespond to similar output values.

In sum, it appears as though attempting to utilize Bayesian optimizationto find effective gaits for tensegrity robots is not as successful as we hadinitially hoped. In part, this may be due to the noisy and erratic nature of

8

the movement function. Further research, focusing on the one hand on otherblack-box optimization methods and, on the other, on trying to better mapand understand the movement function, would be immensely helpful.

References

[1] Adrian Agogino, Vytas SunSpiral, and David Atkinson. Super ball bot -structures for planetary landing and exploration.

[2] Mark Khazanov, Ben Humphreys, William Keat, and John Rieffel. Ex-ploiting dynamical complexity in a physical tensegrity robot to achievelocomotion.

[3] Mark Khazanov, Julian Jocque, and John Rieffel. Evolution of locomotionon a physical tensegrity robot.

[4] Limbo documentation.

9