ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

Thumbnail

Auto Position Movement Panel (Gait)

How to add the Auto Position Movement Panel (Gait) robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Movement Panels category tab.
  5. Press the Auto Position Movement Panel (Gait) icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Auto Position Movement Panel (Gait) robot skill.

How to use the Auto Position Movement Panel (Gait) robot skill

Use this to make your robot walk or move using servos. This movement panel is used for humanoids and hexapods. Create frames and actions to animate the robot servos into pre-defined positions.

A gait is the pattern of movement of the limbs of animals, including robots, during locomotion. This robot skill allows robots to customize servo animations for gait locomotion and interacting with the world. Some robots (i.e., humanoids, hexapods, and more) use servos to move with gaits based on speed, terrain, the need to maneuver, and energetic efficiency. Robot configurations will use different gaits due to differences in their build. For example, a humanoid robot uses a bipedal walking gait, while a hexapod uses a six-legged crawling gait.


Two Versions

There are two versions of the Auto Position robot skill (Movement Panel and Non-movement panel). The only difference between the two is the inclusion of the movement panel functionality. Read about what a movement panel is and how it works with ARC to learn which version of this robot skill to use.


Auto Position Overview

The Auto Position skill transforms a group of servos into custom positions (Frames) to create gaits. You can combine the frames into actions for your robot gait or animation. The Auto Position will use algorithms to calculate the transition of each servo position between frames automatically. Like many other ARC skills, this is done with magic! That magic is "Inverse Kinematics," 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 ARC that calculate the speed at which each servo moves to obtain the goal point position of the next frame. You can use this skill for hexapods, bipeds, or any other creation you can dream up!

How It Works

Think of a flipbook, drawing a figure on each page, and then flipping through to create an animation. The Auto Position skill is very similar. Start by creating frames for each position of the robot. Let's say we're making it dance, for example. Now create a new action and add each frame of the dance to that action. When the action is played, the joints (servos) of the robot will move into each frame sequentially in the order you added them. Interested in the science behind motion planning? If so, click here.

frames-and-actions.jpg




Example: Picking up a cup

Assume you have a simple robot arm with two joints (shoulder & elbow) and a gripper. You may wish to pick up a cup and raise it. We can consider this entire motion sequence an Action consisting of a collection of Frames. Let us first define the start and end of the desired Action. As you can imagine, there are many steps between the beginning and end, with the robot resulting in holding a cup. The Auto Position makes this very easy to accomplish by splitting the Action into a collection of frames.



Creating Frames

You can begin by defining the Frames required to complete the Action. The Frames are snapshots of how the robot can achieve the task. Notice in this example, the task is split into smaller frames. Frames are defined rather than having to program every servo movement. Later, the frames are added to an Action so they can be replayed programmatically.





After creating the frames in the Auto Position config menu, you will end up with a list of frames with associated servo positions.



Add Frames To Action

An action is a collection of frames. Each frame in an action will have attributes that define how quickly it will move and any associated scripts. The transition between frames is selected when adding or editing an action. See in this example image below, the action "Pick Up Cup" has the frames associated with it.




Step/Delay Settings

Hypothetically, let’s assume a frame moves the robot from this example Start frame to End frame. The Auto Position will perform calculations using the start & end positions to interpret the movement positions. The algorithm will ensure all joint positions simultaneously arrive at their destination position during the transition. This behavior is repeated for the transition of each frame of action.


Example: Steps: 5, Delay 20
Using these Steps and Delay values, the Auto Position will send 15 movement commands to the EZB with a 20ms delay between each command. The Auto Position has been determined to send 15 movement commands because the largest difference between the servo positions is 75. With a Step increment of 5, that leaves 15 movement commands. All remaining servos with smaller position differences will use smaller steps, thus arriving at their destination simultaneously. The Auto Position will use the largest step for the servo with the largest position difference.

The shoulder will move five positions per command. The elbow will move 2.3 positions per command. There will be a 20ms delay per command. This ensures both the should and elbows joint positions arrive together at the destination frame positions.





Tutorial Creating Hexapod Gait

Here is an example of using the Auto Position to program an walking gait for a 3D printed large hexapod robot. This demonstrates the power of movement panels by also using additional skills (camera, speech recognition, joystick) to control the movements.





Main Window



1. Movement Panel
These buttons will allow you to control the directional movement of the entire robot (left, right, forward, reverse, and stop).

2. Action List
This is the list of actions that have been created. Select one and click the execute button to run one of the actions.

3. Execute Button
This button executes the selected action in the action list.

4. Jump To... and Transition To... Buttons
The "Jump To..." button instantly moves the servos into the frame's position selected in the frame list. The "Transition To..." button moves the servos gradually into the position of the frame selected in the frame list. These two buttons move the robot into a selected frame instead of executing an action. An action is a list of frames, so if you wish to move into one frame from the current position, You can use these two buttons—the values. You may also select the Step and Delay values.

5. Frame List
This is the list of frames that have been created so that you may access them individually rather than an action. Select one and click the "Jump To..." or "Transition To..." Buttons.

6. Step and Delay Values
Adjust these values by clicking and holding the left mouse button on them or right-clicking them and entering a value from the keyboard. These values are used for the "Transition To..." button of the selected frame—the lower the delay value, the faster the servos transition into the position. The lower the step value, the more steps a servo will take when transitioning to the next position. The higher the step value, the more multiple positions the servo will skip getting to the desired position.

7. Panic Button
This button will stop the auto position and release all the servos.

8. Status Display
Displays the status of the commands that are being executed inside the Auto Position skill.

Configuration - Frames



Each frame displays values for all the servo positions (in degrees). You can modify the servo positions, and the robot will respond in real-time. There are two ways to edit servo positions:

1) Left-click and hold on to the degree number value to drag the value up and down.

2) Right-click on the degree number value and the keyboard to type in the value.

*Notes:

  • In a frame, the position of a servo is between 1 and 180 degrees.

  • If the 0 (zero) position value is selected, this releases the servo from its holding position. If the gearing allows, the output gear can be moved by hand. Selecting the value of 0 for a Continuous Rotation Servo will cause the servo to stop rotating.

  • If the servo position value of -1 is selected, the Auto Position skill skips the servo for that frame. The position of that servo is maintained, and nothing is changed until the next frame.

  • While designing custom frames for your robot, pay attention to the stress/weight applied to servos. The robot may prematurely damage a servo if too much force is applied during the frame creation process. We suggest supporting the robot's weight while moving the servo positions of a frame. Once it looks right, place the robot down to see how it is holding.

1. Servo Positions
These are the servo positions set up inside a frame. Each number corresponds to a servo position value set up on a specific port. Enable Port Edit mode to see the port number.

2. Background Image
A background image can be added to represent your robot. Image files (.PNG and .JPG) are supported and will be stetched to fit the background area. Background area is approximately 840 x 512 pixels.

3. Port Edit Mode Checkbox
This checkbox allows the port number to be displayed above each servo position value when enabled. It also allows the port to be changed by left-clicking on it.

4. Realtime Update Checkbox
This checkbox allows the servo positions to affect the robot in real-time when enabled. This is very helpful when creating a gait for your robot. You may wish to uncheck this option if you do not wish the servos to move due to correcting incorrect values that may damage the robot.

5. New Frame Button
If you'd like to duplicate a frame, select the frame you'd like to duplicate and press the New Frame button. This allows you to easily continue working on a robot action from the last frame position the robot was in.

6. Frame List
This is the List of created frames containing servo positions. When editing servo positions for a frame, you can right-click on a frame to select the servo positions and copy them to the clipboard. This is useful if you want to create a script for moving the servos later or if you wish to make a script for setting servo Max and Min limits. Right-click on a frame and select Copy Positions to Clipboard. Then paste the clipboard into a script and add the commands to move the servos into position.



7. Transition To... Button
This button gradually moves the servos into the frame selected in the frame list for testing. When creating/editing frames, you can use this button to transition into the frame to test how it would perform when added to an action. The values of Delay and Step will be used for this option.

8. Delay and Step Values
Adjust these values by clicking and holding the left mouse button on them or right-clicking them and entering a value from the keyboard. When testing transitions to frames, these values are used for the "Transition To..." button. The higher the step value, the more multiples of degrees the servo will skip to the desired position. The higher the delay value, the slower it will take to arrive at the goal positions. These values are not stored or saved with a frame, as they are for testing transitions while creating/editing frames.

9. Servo Management Buttons
These buttons will allow you to add, delete, fine-tune, and release all servos. First, enable the Port Edit mode checkbox to delete a servo, click on the Servo border, and press the DEL key on the keyboard. To fine-tune the servo positions, press the fine-tune button and use the options available (Add, Subtract, Multiply, Divide, Set to, & Invert) to change the position values.



10. Clear/Change Image Button
This button allows you to delete/set your own background image for this skill. A background image will help you set up servo positions to match the physical layout of your robot.

Configuration - Actions



1. Action List
This of a list of created actions. Use the action management buttons to make changes to this list. An action consists of a collection of frames, where each frame will have parameters that affect how it transitions between frames.

2. Action Management Buttons
These buttons manage the action list. Add a new action, rename an action, or remove an action with these buttons. You will have to select the action in the list first to rename or remove that action.

3. Frame List
Select the frame you would like to add to the sequence list. Once selected, you will need to press the Add button.

4. Delay, Steps, and Speed Values
These adjustable values will set the Delay, Steps, and Speed of the frame you will be adding to the sequence list. These values will be used to transition between each frame in the action list.

5. Add Button
This button adds the selected frame from the frame list and associated Delay, Steps, and Speed values and appends it to the sequence list. The associated delay/step/speed values determine how this frame will be transitioned from the previous frame when the action is executed.

6. This Action Repeats Checkbox
This checkbox will make the sequence list loop infinitely when the action is executed. The action will continually loop until another action is executed.

7. Edit Script Button
This button allows you to add a script to the action. If the button is green, no script is present. If it's blue, a script will be run when the action is executed.

8. Sequence List
This list contains the sequence frames (frames + values) that will be run sequentially (top-down) when an action is executed. The list can be modified using the sequence management buttons.

9. Sequence Management Buttons
These buttons manage the sequence list. You can test the action sequence with the execute button. Edit any sequence frame with the edit button. Delete a sequence frame with the remove button. Change the action sequence by moving a sequence frame up or down with the move buttons.

Configuration - Settings



1. Auto Position Start Script
This script will be run before a frame or action is executed.

2. Auto Position End Script
This script will be run after all the frames or actions in the queue have been executed.

3. Auto Position Variables
These variables contain the name of the current action and frame and the status of the auto position skill. If the auto position skill executes a frame or action, the $AutoPositionStatus will be true (1). Otherwise, if the skill isn't running, it will be false (0).

4. Title Field
This field contains the title of the auto position skill. You can change it if you'd like. *Note: Changing the title here will also change the title in the controlCommand() associated with this skill. Any existing references in your code will need to be updated for the new name.

Configuration - Import/Export Utilities



Within the Configuration menu is the ability to Import or Export Actions and/or Frames. 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. Deselect the frame from being imported. The most common mistake is to import the PAUSE frame, which is auto-generated and cannot be removed.

1. Export Button
This button exports an .autoposition file for adding to another ARC project.

2. Import Button
This button allows you to import both .autoposition and .ezb files into an ARC project.

Auto Position With Movement Panel vs Without

There are two types of auto position skills in ARC. One which has a movement panel, and one without.

1) The Auto Position With Movement Panel skill contains a movement panel, which will execute the robot gait actions for direction movement. There can only be one instance of this skill, like all movement panels. There are predefined actions for movement directions (forward, reverse, left, right, and stop) to which you can assign frames. 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 in a direction.

To control an Auto Position with Movement from a script, there are specific commands for it that require ControlCommand(). View the cheat sheet for available ControlCommands, or use the script movement commands (Forward(), Left(), Right(), Stop(), Reverse()).

2) The Auto Position Without Movement Panel skill can have multiple instances and does not control directional movements like a movement panel. This skill also accepts script controlcommand()s.

How to Use Auto Position Skill

1) Add the Auto Position Skill to your ARC project (Project -> Add Skill -> Movement Panels -> Auto Position Movement Panel).

2) In the Configuration menu, create frames for your servo motor(s). Each frame is a servo pose in a collection pose to achieve a result.

3) In the Configuration menu, create a new action and add the frames you've created to it. Add some pause frames between your frames if needed. Adjust each frame's delay/steps/speed values to achieve the desired transition results between frames.

4) Select an action and press the action button in the main window.

Code Samples

Every Auto Position ControlCommand() is published in the Cheat Sheet tab. Pressing the Cheat Sheet tab will display the ControlCommands() for all skills, including the Auto Position. To execute an Auto Position from a 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)

Videos




Resources

There are utilities for importing and exporting auto position files in the Configuration menu. The Import/Export tab will contain buttons to launch the specific utilities.

Related Tutorials

tutorial
Control More Than One Robot

Control More Than One Robot

How to control more than one robot in a single EZ-Builder project. This tutorial uses Revolution robots that depend on...
tutorial
Create Auto Position Actions From EZ-Script

Create Auto Position Actions From EZ-Script

This tutorial uses the ControlCommand() EZ-Script command that instructs the Auto Position control to create a frame and...
tutorial
Sabertooth+Kagaroo+DC Motors As Servos

Sabertooth+Kagaroo+DC Motors As Servos

This tutorial shows how to use a DC motor as a Servo, using a Sabertooth+Kangaroo boards combination and EZ-builder
tutorial
The Robot Program Episode 003: Getting JD To Move

The Robot Program Episode 003: Getting JD To Move

This lesson will demonstrate how to connect to and move the Revolution JD robot. Follow along with The Robot Program...
tutorial
The Robot Program Episode 006: Introducing ARC

The Robot Program Episode 006: Introducing ARC

This lesson introduces the EZ-Builder Robot Software by exploring options and describing features. At the end of this...
tutorial
The Robot Program Episode 009: Getting Six To Move

The Robot Program Episode 009: Getting Six To Move

This lesson will demonstrate how to connect to and move the Revolution Six robot. Follow along with The Robot Program...
tutorial
The Robot Program Episode 020: Detect Face And Wave - Roboscratch

The Robot Program Episode 020: Detect Face And Wave -...

This lesson will demonstrate how to use RoboScratch to have the robot wave once it detects a face. At the end of this...
tutorial
The Robot Program Episode 021: Detect Face And Wave - Blockly

The Robot Program Episode 021: Detect Face And Wave -...

This lesson will demonstrate how to use Blockly to have the robot wave once it detects a face. At the end of this...
tutorial
The Robot Program Episode 022: Detect Face And Wave - EZ-Script

The Robot Program Episode 022: Detect Face And Wave -...

This lesson will demonstrate how to use EZ-Script to have the robot wave once it detects a face. At the end of this...
tutorial
The Robot Program Episode 023: Mobile JD

The Robot Program Episode 023: Mobile JD

This lesson will demonstrate how to control the Revolution JD Humanoid with an iOS or Android phone or tablet. At the...

Related Hack Events

Related Questions

question

Absolute Beginner Guide To Controlling A Single Servo

Hi, I finally got my power supply and powered up my EZ-Robot EZ-B v4 board today.  I have managed to connect to it via wifi but after that I am...
question

Arduino Mega, Autoposition: Servo Release Or Closing Arc Forces Servo Into 0 Deg

Hello everyone, Arduino mega, 2 servos controlled by the auto positioner: Close the arc app or pressing "release all servos" makes all my servos try...
question
Auto Position Help

Auto Position Help

In "auto position" control, how do I distinguish one D0 from the other D0 on the same connection (connect 0 to 4)? I am...
question
Calibrate Problem

Calibrate Problem

first i choosed six in the list above cause the galapagosbot is not in the list. so here is my problem,aldo i made the...
question
Cant Get Smooth Motions

Cant Get Smooth Motions

i bin trying to make smooth motions,but i am not able to do. there are some setting missing or deleted ? its to slow or...
question
Disconnected When Add One More Servo?

Disconnected When Add One More Servo?

I am working on InMoov hand project. The Software will disconnected the EZ-B 4/2 when I add more than 1 servo Motor. Can...
question

Hitec D845WP Servos Can't Move Slow And Smooth

I'm testing a new robot , using ezbv4 and hitec D845WP servos with lipo 7,4 V batteries. (I never used these servos and such high-current batteries...
question
How To Servo Invert On Exsisting Robot 12249

How To Servo Invert On Exsisting Robot 12249

Working with a hexapod, 12249, that is 3dof each leg. mine has a couple of positions that need servo to be inverted. Ive...
question
Reverting Servo In Script Or Movement Panel

Reverting Servo In Script Or Movement Panel

Probably but silly question but I can’t figure it out, does any one know how to revert a servo in either script or the...
question

Scripting Multiple Robot Actions One After Another

I'm currently using Script Manager to run multiple scripts in sequence. I know that ControlCommand is non-blocking by default but is there a way to...
question
Strange Issue With Servo Speed/Delay/Steps And Usb Camera

Strange Issue With Servo Speed/Delay/Steps And Usb Camera

Hi everyone, I have been following you for some time and first of all I wanted to thank this forum and the fantastic Ez...
question

Synchronising Commands In A Custom Behavior Control Plugin In C#

I’ve made a custom behavior control plugin and use the EZ_Builder.Scripting.Executor.StartScriptBlocking method to run commands. However, I can’t get...
Expand (0 items)

ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#1   — Edited
Given a specific location in 3D space (I have programmed my Oak-D camera to give me a location coordinate in 3D space), I am attempting to move my robot's hand there. Is there a way to do this with this movement panel? Please assume that the location will change. For instance I hold a bottle in my hand and I wish the robot to grab the bottle from me.
PRO
Synthiam
#2  
The Auto Position uses pre-defined frames. While frame positions can be added programmatically, they cannot be altered programmatically. 


What you want to do would have to be done with some math and specifying servo positions directly. Due to the unknown parameters of the robot's configuration, this can't be automated. But, it is something possible to do with math. If you have the 3D coordinates of an object, the joint positions will have to be calculated by the joint lengths to relate to the coordinates. This is how a CNC machine would work.
#3  
So then it’s a feature request? A FK and IK feature? Plug in joint lengths  and DOF, and the final location (x, y, z) for the claw/hand as inputs? I am guessing it’s not a simple task or you/your guys would have already added it.
PRO
Synthiam
#4   — Edited
Sorry, it’s impossible because every robot has a different configuration. There’s no way a robot skill could be created for infinite configurations. It’s something that would require math specific to the robot configuration. Somehow identifying the position relative to some other arbitrary value in 3D space. Maybe you’d have to figure out some servo values based on fixed points and map that to the arbitrary 3d Cartesian points of your camera? 

Im not really sure - have you googled to see any ways others have done it?

*edit: this is the best article that’s easiest to understand of what I’ve found by searching. I use google as my preferred search engine: https://fl0under.github.io/robotics-notes/

he outlines a lot of details that need to be considered in the process. This is also why it’s impossible to create a robot skill that encompasses an infinite robot arm configurations. But it’s a good read to help where you can begin. 

a good start is to merely use the x and y coordinates (ignoring depth) to align the hand to the object. If you can do that much, then the depth won’t be much more work. 

I’m guessing the number of joints and lengths of each joint will make the process harder.