User Tools

Site Tools


action_editor_-_making_the_darwin-op_wave

Making the Darwin-OP Wave

Author: James Maliniemi Email: [email protected]
Date: Last modified on 6/21/16
Keywords: tutorial, Darwin-OP, Action Editor, step-by-step


This tutorial shows readers how to use the Action Editor program to make the Darwin-OP wave with one hand and two hands, and takes approximately 2 hours to complete.

Motivation and Audience

The Darwin-OP is a humanoid robotic platform with the following specifications. It is 454.5mm (17.90in) tall and weighs 2.9kg (6.39lb). It contains 20 M-28 actuators and has 20 total degrees of freedom. It's main controller is an onboard 1.6 GHz Intel Atom Z530 (32 bit) computer with an ARM CortexM3 STM32F103RE 72 MHz sub-controller. The Darwin-OP has three microphones, two on each side of its head and one between the LED eyes. It also has a Logitech C905 HD camera between its LED eyes. Integrated to the sub-controller is a 3-axis gyroscope, 3-axis accelerometer, and supply voltage sensor. When not plugged in, the Darwin-OP is powered by a 5C 11.1V battery.

This tutorial's motivation is to help readers understand the basics of making the Darwin-OP move using the pre-installed Action Editor program by presenting the steps necessary to make the Darwin-OP wave. This tutorial assumes the reader has the following background:

* Knowledge of how to use computers with the Linux OS and familiarity with the command-line interface.

The rest of this tutorial is presented as follows:

  • Materials and Sources
  • Procedure
  • Final Words

Materials and Sources

This tutorial assumes the reader already has access to a Darwin-OP robot. The reader will also need either a computer capable of accessing the Darwin-OP's desktop remotely or a keyboard, monitor, and mouse to access the Darwin-OP's desktop directly. Other important sources are listed below.

Procedure

This section gives step-by-step instructions along with photos to make the Darwin-OP wave with one hand, then two, using the Action Editor program.

Step 1


Figure 1: Darwin-OP in safe inactive position

First, start the Darwin-OP. Ensure that the Darwin-OP is in a crouching position while physically inactive, as shown in Figure 1 above, to eliminate risk of damage when the Darwin-OP starts moving.

Step 2


Figure 2: The Command Line Interface

Next, access the terminal via the Darwin-OP’s desktop interface or remotely using a remote-access program. Once open, the window should look like Figure 2 above.

Step 3


Figure 3: sudo su entry and access to root directory

Next, use the sudo su command to get administrator permissions and access the root directory as shown in Figure 3. The standard password for the Darwin-OP is 111111. If this password does not work, then somebody has made changes to the system. If successful, the text at the left of the cursor should have changed “darwi[email protected]” to “[email protected]”.

Step 4


Figure 4: Navigation to Action Editor

Next, enter the commands as shown in Figure 4 above. This will bring you to the directory where the Action Editor program is located.

Step 5


Figure 5: First screen of motion file

Next, enter the command “./action_editor” to start the Action Editor program. If successful, you should see an opening screen and beyond that you should see the first page of the 256-page motion file, shown above in Figure 5. If readers are not familiar with the motion file page and its’ parts, refer back to the Action Editor page from the Robotis e-manual.

Step 6


Figure 6: Empty, unnamed, and unused page 110 in motion file

Now that the Action Editor is open and running, the Darwin-OP can be programmed to move according to the user’s wishes. For the purposes of this tutorial, the Darwin-OP will be programmed to wave with one hand, then two hands. Enter the “list” command, and find any two pages that aren’t already named. For this tutorial, we will use pages 110 and 111. Enter “page 110” to navigate to page 110, which will be empty as shown above in Figure 6.

Step 7


Figure 7: Copied page 1 and renamed

Considering that there are seven steps per page, each task has an economy of motion. For this tutorial, step 0 and step 1 will be devoted to standing, steps 2 through 5 will be devoted to waving, and step 6 will be devoted to returning to a standing position. As for standing up, page 1 (named “init”) already performs this task. There is no need to reinvent the wheel in every task, so copy page 1 wholesale to page 110 with the “copy 1” command. Next, give the page a unique name to reflect the Darwin-OP’s task using the “name” command, then enter the “save” command. For this tutorial, the page will be named “wave1hand.” Note the copied data and name change in Figure 7 above.

Step 8


Figure 8: Motion file following motion


Figure 9: Darwin-OP standing

The next part requires some investigation and knowledge of the MX-28 actuators and the meaning of the numbers listed on the screen for each actuator. The MX-28 actuators have 4096 unique positions, and the numbers shown on the steps for each actuator refers to an angle measured from 1 to 4096, counted counter-clockwise relative to its face (the side of the actuator with the MX-28 sticker). To make intelligent decisions as to the motion data to enter, the user must reconcile the preferred position of the Darwin-OP with the angles of the MX-28 actuators given as a number between 1 and 4096. To better understand this, enter the ‘play” command, and refer to Figure 8 above. Once Darwin-OP finishes the motion, he should be standing as shown in Figure 9 above. Notice that the STP7 column, previously all “????” entries, now lists discrete numbers matching those of STP1. The STP7 column lists the actual positions of the Darwin-OP’s twenty actuators when the actuators are active and non-moving. In this case, it’s listing the positions of the twenty actuators while the Darwin-OP is in a standing position.

Step 9


Figure 10: Standing position copied to STP6

Now that the Darwin-OP is in a standing position, it would be convenient to now save that position in STP6 because it is the final step in his motion. Enter the command “i 6” to copy the contents of STP7 (his current pose) to STP6, as shown above in Figure 10. Notice that STP1, STP6, and STP7 currently have the same values. STP7 will change.

Step 10


Figure 11: Darwin-OP in initial waving position

To find out what numbers to enter to make the Darwin-OP stand, it’s necessary to have an understanding of which actuators will turn during the motion, in which direction they will turn, and approximately how far they will turn. For this purpose, enter the “off 3 1” command. This will disable both actuators governing the Darwin-OP’s motion in its right shoulder. Now move the arm to the position shown in Figure 11 and enter the “on” command. Notice that he already looks like he’s waving. Now consider how both shoulder actuators moved. In this case, actuator 1 turned counter-clockwise approximately 135 degrees and actuator 3 turns counterclockwise approximately 75 degrees, relative to the previous position. However, remember that the Action Editor does not read the positions of the actuators in degrees, but rather as a 4096 discrete positions, the units of which will be called “ticks” for the purposes of this tutorial. To convert any measurement in degrees to ticks, simply divide 4096 ticks by 360 degrees, then multiply by the value in degrees that requires conversion and add the value of the previous position for the absolute result.

Overall, the equation takes the following form, where x is the value given in degrees, y is the new absolute position in ticks, and z is the previous absolute position in ticks:

y=(4096/360)*x+z

For actuator 3, the calculation will be as follows. To convert 75 degrees to ticks, divide 4096 by 360, then multiply the result by 75 and add the previous absolute position of actuator 3 from column STP1, 1747. The result is 2600.333 ticks, rounded to 2600 because of the discrete nature of the MX-28 encoders. Repeat this process for the 135 degree counterclockwise rotation of actuator 1 and the result will be 3016. This mathematical process is simplified by the use of Microsoft Excel or a scientific calculator.

Step 11


Figure 12: Initial waving position entered

To enter this data, first return the Darwin-OP to the standing position by entering the “play” command. Then use the “i 2” command to copy the standing position data to step 2. Use the arrow keys to move to the STP2 entry for MX-28 actuator 1 and enter the command “set 3016” and move the cursor to the STP2 entry for actuator 3 and enter the command “set 2600” to set the desired positions. Then move the cursor to Time entry of the STP2 column and enter the “set 125” command. The STP2 column is a great template for the remaining empty columns, but the data needs to be in the STP7 column. Move the cursor to the entry for Page Step and enter the “set 3” command, then enter the “save” and “play” commands. Once this step is complete, the Darwin-OP should resemble Figure 11 and the terminal will resemble Figure 12.

Step 12


Figure 13: Completed page 110

Next consider the next step in Darwin-OP’s next act in his waving motion. So far in this motion, Darwin-OP stands and outstretches his arm. The next step is the actual waving a motion to be performed by actuator 5 alone, as it alone governs forearm motion at the elbow. An act which pulls Darwin-OP’s outstretched right arm inward would involve counterclockwise motion of actuator 5, and for the purposes of this tutorial, a decent arc for a friendly wave is 75 degrees. Acknowledging that the outstretched position of actuator 5 is 2147 ticks and using the equation described previously in step 10 to convert relative degrees to absolute ticks gives a value of 3000 ticks.

Before entering this value into the next column, it’s necessary to use the pose of Darwin-OP with an outstretched arm as the template for the remaining steps in this motion. To do this, use the “i 3” command, the “i 4” command, and the “i 5” command. Move the cursor to the entry for Page Step and enter the “set 7” command. Then move the cursor to the Time entries for STP3, STP4, and STP5 and enter the “set 50” command, for short, quick waves. Move the cursor to the Time entry for STP6 and enter the “set 125” command.

Next, we must acknowledge that the wave motion will be an alternating motion such that the Darwin-OP’s arm starts outstretched in step 2, then gets pulled in for step 3, then out again for step 4, then in again for step 5, and then the Darwin-OP returns to a standing position in step 6. Knowing this permits us to efficiently place our data. In this case, the arm is pulled in in steps 3 and 5, so those are the only remaining steps that require editing. Move the cursor to the entry for actuator 5 in STP3 and STP5 and enter the “set 3000” command for the inward arm position when waving. Enter the “save” command. This page is now complete, and should look like Figure 13 above. Enter the “play” command and enjoy watching the Darwin-OP wave to you, shown in the video below.



Step 13


Figure 14: Page 111 copied and renamed from page 110

The next step is to expand on page 110 and make the Darwin-OP wave with both hands symmetrically. To do this, first go to page 111 with the “page 111” command. Considering that the motion for page 111 will be derivative of the motion for page 110, it would be prudent to use the motion from page 110 as a template, so copy it to page 111 with the “copy 110” command. Enter the “name” command. For the purposes of this tutorial, the page will be named “wave2hands.” The result should resemble Figure 14 above.

Step 14


Figure 15: Left arm outstretched for the duration of the wave

To perfectly mirror the waving with the Darwin-OP’s right arm with the left arm, we only need to consider a few things. First, the left arm motion will not be an exact replication of the right arm motion, but the relative change in angle will be the same. Second, the only difference between the right arm and left arm motions will be opposing directions and initial angles of the actuators.

So for step 2, actuator 2 (opposite actuator 1) will turn clockwise 135 degrees and actuator 4 (opposite actuator 3) will move clockwise 75 degrees. Considering initial tick angles for both actuators in step 1 and using the equation described in step 10 to convert relative degrees to absolute ticks, the new angle for actuator 2 is 1074 ticks and the new angle for actuator 4 is 1490 ticks. Remember when using the equation described in step 10 that counterclockwise motion is treated as positive and clockwise motion is treated as negative. Because it might be easy to delete important data by copying entire columns, enter the calculated data manually by moving the cursor to the actuator 2 entry in columns STP2 through STP5 and entering the “set 1074” command, then moving the cursor to the actuator 4 entry in columns STP2 through STP5 and entering the “set 1490” command. These commands ensure that the left arm is outstretched for the duration of the waving. Once complete the page will resemble Figure 15 above.

Step 15


Figure 15: Left arm outstretched for the duration of the wave

Now to determine the mirrored waving action of the forearm, governed by actuator 6 (opposite actuator 5). Knowing that the motion of actuator 6 is 75 degrees clockwise (equivalent to -75 degrees counterclockwise) and its’ original angle at step 2 is 1944, use the equation described in step 10 to find the absolute angle of Darwin-OP’s pulled-in forearm, which will be 1091 ticks. Remembering that the right arm pulled in only at steps 3 and 5, the left arm will do the same. Move the cursor to the actuator 6 entry in the STP3 and STP5 columns and enter the “set 1091” command. Enter the “save” command, then enter the “play” command. Enjoy watching the Darwin-OP wave with both hands in synchronous motion. The final motion page for two-handed waving can be seen above in Figure 16 and the actual motion can be seen in the video below.

To exit Action Editor, enter the “exit” command. Then turn off the Darwin-OP normally.

Final Words

This tutorial's objective was to use the Action Editor Program to make the Darwin-OP wave with one hand, then two hands. Once the concepts were conveyed the reader should be able to use the Action Editor to make the Darwin-OP perform movements according to the reader's desires.

Speculating future work derived from this tutorial includes research into making the Darwin-OP perform more complex and autonomous tasks. In the big picture, the problem of how to make the Darwin-OP move can be solved with this tutorial.

action_editor_-_making_the_darwin-op_wave.txt · Last modified: 2016/06/22 14:39 by jmaliniemi