Behavior Control
Help Index

Auto Positioner (Gait)

How To Add This Control To Your Project

  1. Load the most recent release of EZ-Builder
  2. Press the Project tab from the top menu bar of EZ-Builder
  3. Press Add Control from the button ribbon bar of EZ-Builder
  4. Choose the Servo category tab
  5. Press the Auto Positioner (Gait) icon to add the control to your project
The Auto Position Control is used to transform servos into custom positions (Frames) and creating gaits. The frames can be combined into Actions for your robot gait. The Auto Position consists of Frames, which are assigned to Actions. The software will automatically calculate how to transition the servo positions between frames of the gait. Like all EZ-Builder controls, this is done with magic! Actually, that magic is technically "Inverse Kinematics", or otherwise known as "Motion Planning". Each frame of the auto position consists of "goal point positions" for each servo. When frames are combined into an action, there are algorithms within EZ-Builder that calculates the speed of which each servo moves to obtain the goal point position of the next frame. No need to worry if that sounds confusing, continue reading and all will be clear. This control is used for Hexpods and Bipeds - or anything you can dream up!

What Does Gait Mean?

Gait is the pattern of movement of the limbs of animals, including robots, during locomotion. Most robots use a variety of gaits, selecting gait based on speed, terrain, the need to maneuver, and energetic efficiency. Different robot configurations may use different gaits due to differences in their build. For example, JD Humanoid uses a different gait than Six Hexapod.

How It Works

Think of a flip book, where drawing a figure on each page and flipping through to create an animation. The Auto Position control is very similar. Start by creating frames for each position of the robot, of a dance for example. Now create an action and add each frame to the action. When the action is played, the joints(servos) of the robot will move into each frame. Interested in the science behind Motion Planning? If so, click here.


Auto Position Control Types

There are two types of auto position controls in EZ-Builder. One which has a movement panel, and one without.

1) Auto Position With Movement Panel

This one contains a Movement Panel, which will execute the robot gait actions for movement commands. Like all movement panels, there can only be one instance of this control. There are predefined actions for movement directions (forward, reverse, left, right, stop) which you can assign frames to. You can add gait frames to each action to have your robot move in a customized fashion when any control calls the robot to move a direction (forward, reverse, left, right, stop). To control an Auto Position with Movement from EZ-Script, there are specific commands for it that require ControlCommand(). View the cheat sheet for available ControlCommands, or use the ez-script movement commands (Forward(), Left(), Right(), Stop(), Reverse()).

2) Auto Position Without Movement Panel

The Non-Movement Auto Position Control can have multiple instances, and does not control movements like a movement panel. This control also accepts ez-script controlcommand()s.

Frame Editing


Mirroring a Frame

1) Select the frame you wish to mirror
2) Press NEW FRAME

Editing Frame Positions

The displayed values for each servo are the degrees that the servo is in for that frame. You can modify the servo degrees of each frame and the robot will respond in real-time. There are two ways to edit...
1) Left-click on the degree number value and use the Left mouse button to drag up/down.
2) Right-click on the degree number value to open the dialog and use keyboard or mouse to select exact digit.

  • In a frame, the position of a servo is between 1 and 180 degrees.
  • If the value of 0 (zero) is specified in a frame, this releases the servo from holding a position. The value of 0 tells the servo to stop holding a position and will become limp. You will notice the value of zero being specified on some robots where a servo is not needed within a frame, or when using Continuous Rotation Servos. Setting the value of a 0 (release) on a Continuous Rotation Servo will cause the servo to stop rotating.
  • The servo value of -1 skips the servo for the frame. If a value of -1 is specified for a servo in a frame, the position of that servo is maintained and nothing is changed.

Deleting a Servo

When editing the auto position frame, you may wish to delete a servo. To delete a servo, click on the Servo border and press the DEL key on the keyboard. Ensure Servo Port Edit is checked.

Frame Creation Tips

While designing custom frames for your robot, pay attention to the stress/weight applied to servos. A servo will be pre-maturely damaged and burn out if too much weight is applied during the frame creation process. EZ-Robot suggests holding the robot in hand while moving the servo joints of a frame. Once it looks right, place the robot down to see how it is holding. Pick the robot back up and eye-ball tweak the positions while holding the robot in hand.

If the robot starts buzzing while it is placed down, do not let the servos buzz for longer than a few seconds while examining the position - if the servos are buzzing, quickly pick it back up again after examining what changes are required to that frame position.

A servo will premaaturely damage if it is holding too much weight. This is no different than you, as a human, attempting to hold a position that strain muscles. A servo giving out is the same as a muscle giving out.

Execute from EZ-Script

Every Auto Position ControlCommand() is published in the EZ-Script Cheat Sheet tab. Pressing the Cheat Sheet tab will display the ControlCommands() for all controls, including the Auto Position. To execute an Auto Position from EZ-Script, you would use commands such as...

ControlCommand("Auto Position", AutoPositionAction, "My Action 1")
ControlCommand("Auto Position", AutoPositionFrame, "My Frame 1")
ControlCommand("Auto Position", AutoPositionFrame, "My Frame 1", 50, 3)


Within the Config menu of the Auto Position is the ability to Import or Export Actions and/or Frames. Export creates an .autoposition file, while import will work with both .autoposition and .ezb files. You can only import frames if the servo configuration matches the existing project, for obvious reasons. If the servo configuration does not match, the import utility cannot simply "guess" what servos to assign the new frames. This limits importing and exporting to projects with the same servo configuration.

If importing a frame and it already exists, a message will be displayed. Simply deselect the frame from being imported. The most common mistake is attempting to import the PAUSE frame, which is auto generated and cannot be removed.

Other Utilities

There are utilities for importing, exporting and generating gait source code in the Config menu. Press the gear icon on the Auto Position control to access the Config menu. The Import/Export tab will contain buttons to launch the specific utilities. The gait Generator Source Code will create source code for moving servos for the EZ-SDK, UniversalBot UWP and C++ Enterprise customers.