Snakebot One

This is my first robot so I could learn the basics on metal working but still make something that attracts attention from the persons when the robot is in action.

WormI once found an image on the internet of a robot worm which I really liked, I’m not sure where I found it or who’s copyright I’m violation here, but the fact remains I like the concept of building “animal” like robots. In their behavior they should mimic nature as much as possible but not overdo it; it’s still a robot.

The part I liked most about the worm is that it does not seem let itself be stopped, it’s build to worm itself trough various types of terrain. I would like to release my robot on the second floor and find it back two days after somewhere in my basement. It should be autonomous meaning it should find it’s own food to prevent charging it every day.

What I don’t like about the worm it that it’s movements will be linear, it follows a straight or slightly curved path but the fascination of watching it move will be limited to how it concurs obstacles. When thinking about this I ended up thinking about snakes. Their concept of moving is the same but the curly way of moving where the tail follows the same path as the head is fascinating to observe. To feed my imagination I googled and I quickly ended up at the site of Gavin Miller who apparently had similar idea’s like me. If you watch his video’s you will understand why I choose the snake concept.

A snake moves in varies ways but none of them use traction belt. At this moment it’s not clear to me how that translates into a robot, so best way forward is to make a prototype using servo’s and limit the movement in the horizontal plane for now.

In the past I bought a Bioloid comprehensive kit from Robotis. Not to build the models but purely for the AX-12 servo’s that are included in the box. These servo’s are very powerful, they have a torque of 16.5kg/cm at 10V operating. Next to this they are digital meaning there is no need to send a PWM signal to them as you would need to do for a traditional servo. If you use one or two servo’s this is not a problem, each servo would require an output on a micro controller. In case you use 18 servo’s all attached to each other like a snake you would require 18 outputs. Next to this it would also mean there are 18 wires leaving the head (if the micro controller is located there) which is a rather thick cable. With a digital servo they are all connected to the same wire in a bus architecture, as a bonus additional functions are available like reading back the current position or even the current amount of torque.

Part of the box is a controller box called CM5 which is capable of driving 30 servo’s in total. This turns out to be a nice development board after some modifications and adding a JTAG interface (see CM5 Board for details).

After writing some basic code to interface with the AX-12 it’s time to understand how snakes move. First experiment is focused on lateral undulation, for this a prototype is being build using 11 AX-12 servo’s all connected to they can only change their angle horizontally compared to their predecessor.

The question here is how to accomplish this using servo’s? Perhaps the best thing to do first is to study the biological buildup of a snake. It’s not my intension to replicate the exact autonomy of a snake, this is not the correct way to transform a biological animal in a robotic mechanism. A Boeing 747 is a good example of this, try to imagine how that looks like with flapping wings?

Snakes must have been popular in the old days since I found of lot of very old books in the library explaining the biology of a snake. But there is not much mentioned on how the forward movement is actually achieved. Perhaps it’s so simple that it does not need explanation? I found several times that forward motion is achieved by waves of muscular contraction and relaxation propagate from front to rear and each point of the snake follows the exact same path. Specially the last part is easy to develop, below image shows snapshots of a snake made out of 9 segments following a specific path.

From this image it is clear that the angle that one segment makes to the segment in front of it is passed from front to back. This matches the other frequently found statement concerning propagate from front to rear. From a software point of view this is very straight forward which in that case is nothing else than a shift register shifting angles. If the delta in angles is kept limited and so send as many updates to each servo as possible the movement will be very fluent.

Another option is to calculate the servo position independent of it’s predecessor IF the path to follow is known. This can be done by calculating the tangent to the point on the line which matches the center line of the servo. The delta between the tangent of the servo that follows is the position of the servo. But how to store the curve that the snake followed? And how to determine the curve when the snake is powered up and reads the positions of the servo’s?

The nice part is that the theory sending position information from head to tail works again if the resolution is small enough. For example all positions calculated for the middle servo to move to the bottom servo can be passed to the top servo as soon as the position of the bottom servo is reached. These are independent of the forward speed of the snake, this only impacts the speed of moving the servo to it’s next position.

In order to calculate the path to follow splines might help, this is a nice way to “estimate” the shape of the snake after power-on. It also provides a quick way to calculate the path to follow by continuously extending the spline “one servo length” to the target position of the head. Wikipedia shows complex functions to calculate splines, it also shows that there are various types of splines. Since the spline must pass exactly through the points provided (position of the servo) the natural or cubic spline is the right choice. After writing a small Delphi program to study how these functions work it’s clear that this is a nice way to calculate the path to follow but it is not providing (yet) a series of servo positions.

To be continued…