Detecting Direction of the Tensegrity Robot

We are now capable of detecting the direction that the tensegrity robot is facing, as evidenced by the video below

Information on how this was achieved and how this will be used is after the break.

What is happening?

The direction the tensegrity is facing is being detected in near to real time using a mounted webcam and image processing.

How was this achieved?

The three colored points attached to the tensegrity are being detected. This is done by taking an image from the mounted webcam and using OpenCV to process the image and find the midpoint of each point. From their positional data, the center of the tensegrity is approximated by finding the midpoint of these colored points. Then, the angle is calculated by taking the arc tangent of the slope between the center and each point. All three angles are calculated, but for this video only the angle from the center to the green point is shown. With all of this data present, we used OpenCV to create the debug image by drawing circles and lines to a blank images once every second.

What does this mean for the tensegrity in the future?

Now that the direction is known at all time, it will be a small leap to get to calculating number of rotations done by the tensegrity over a period of time. This will prove very useful for future experimentation because it will give us one more data point to use in evolution.

For example, at the moment the turning of the tensegrity was not discovered using an evolutionary algorithm. This is because we only had capabilities to make fitness functions based on the distance traveled. A good turn should have a very low distance traveled but it should have a very high number of rotations. With the old system, we could only evolve for very low distance and the tensegrity would merely evolve to turn off all of its motors. Now that we can use number of rotations over a period of time as a metric for the fitness function, we will be able to evolve not only for forward motion but also for turns.

This is important because the three main motor frequencies required for basic motion are left, right and forward. Because we can evolve for turning and for forward motion, it is now completely possible to autonomously train the tensegrity to move and steer on new surfaces.

This also opens up possibilities for using a neural network to determine the frequencies and create more fine-grained steering. Though that may be far down the line.

Leave a Reply