Hardware

The hex walker is derived from the Lynxmotion AH2 walking robot. It features 6 legs using 12 servos
for basic movement. These servos are plugged into the RCC1000 - 16x RC Servo Phidget, which in turn is plugged
into a VINT Hub. For this project, the walker will be tethered to power and a long VINT cable for simplicity.

Software

Libraries and Drivers

This project assumes that you are somewhat familiar with the basic operation of Phidgets (i.e. attaching
and opening devices, reading data, etc) and with running examples in the Phidget Control Panel .

Controlling the Hex Walker

The first step is to connect to the the twelve servo channels required to make the robot walk. For simplicity, the servos
were connected in a specific patern to allow easy selection.

The next step of programming the robot to walk is to verify all servos move the right way. For this robot,
it was found that the servos on the opposite sides of the robot were reversed. This is compensated for by
reversing the signal to the servos on one side of the bot.

To assist with this, a leg-moving funciton was implemented as follows:

Note the use of the asynchronous calls to set servo positions
(PhidgetRCServo_setTargetPosition_async) in order to better coordinate
their movement.

For movement, the legs are grouped in tripods consisting of the front and back legs of one side
and the middle leg of the other. This ensures the robot remains stable at all times while it walks.
In order to walk, the robot lifts one tripod and moves it forwards while simultaneously moving the legs
on the ground towards the rear. Then, it repeats the same cycle for the next set of legs. This motion propels the
robot forwards.

In order to turn, one tripod is lifted while the other set rotates in the given direction. To turn left, the right
legs are moved forwards while the left legs are moved back, and vice-versa.

For control from the joystick, these movements are combined to allow for more freedom of motion.

The code snippet below shows how the walking algorithm is implemented for this demonstraiton. In this case,
the joystick value is sampled and traslated into the relative size and direction of the step (velocity), with
the turning amout (turnOffset) added to allow turning while on the move. In addition, if the joystick position
is close to centre, the robot will enter a NEUTRAL state, where the legs won't move until there is more input.

In addition to walking, when the joystick button is pressed the walker crouches and tilts in the direction of the joystick.
Once the button is released, the walker stands up and continues walking. This is accomplished by bending the legs on one
side of the bot while extending those on the other, as follows:

Need help? Call us

+1 403 282-7335

Monday - Friday 8:00am - 4:00pm MST

Connect with us

Phidgets Inc.

We believe in getting problems solved quickly and projects finished on time. That's why we specialize in making affordable, easy to use sensors and controllers that require minimal electronics knowledge.

Phidgets Inc.

We believe in getting problems solved quickly and projects finished on time. That's why we specialize in making affordable, easy to use sensors and controllers that require minimal electronics knowledge.