Via Wireless Ethernet

You may also connect to DARWIN-OP via wireless LAN.
You may need to be familiar with network settings to successfully connect to DARWIN-OP wirelessly.
Connecting to DARWIN-OP wirelessly may be differentdepending on the access point/wireless router.

Example Procedure (first-time connection)

Connect to DARWIN-OP either directly or via wired LAN

If connected via wired LAN access DARWIN-OP with remote desktop (VNC)

Access DARWIN-OP’s Ubuntu’s desktop

Access network connections (on the upper right part of the desktop) and select the wireless SSID

Make sure you established connection

Afterwards you will need to check for DHCP assigned IP address

Open a terminal window and type ifconfig

Check for inet addr under wlan0 (it is highly recommended that you write this number down).

Use this number to connect to DARWIN-OP wirelessly. You may connect via any method using this number (VNC, PuTTY, SAMBA drive, ZOC, etc).

You can save the wifi settings by properly shutting down DARWIN-OP. Shut-down information can be found here. The shut-down procedure is essential so that wifi connection settings are saved in the PC. The next time connecting to DARWIN-OP wirelessly you may skip steps 1 through 8.

Attention

It is possible to establish wireless connection to DARWIN-OP automatically as long as the the wireless IP address remains unchanged. You may need to peridically check for any changes in your access point/wireless router’s DHCP. Please consult your access point/wireless router for further information.

Make sure that there are no other devices operating that cause harmful interference with the wifi signal (for example microwave ovens).

If you have trouble connecting wirelessly you may need to check wifi settings by connecting to DARWIN-OP directly or via wired LAN, or checking the settings of your access point/wireless router.

Terminal Client (SSH)

You may use existing terminal client software (i.e. PuTTY, ZOC, etc) to connect to DARWIN-OP.

Example with PuTTY

Execute PuTTY

On IP address input : 192.168.123.1

Select SSH as the connection type

For user name input : darwin

For password input : 111111 (that is six 1’s)

ROBOTIS recommends that users connect via terminal client.

Remote Desktop (VNC)

You may connect via remote desktop if you prefer graphical interfaces.

Example with Ultra VNC Viewer

Excute Ultra VNC Viewer

On IP address input : 192.168.123.1

For password input : 111111 (that is six 1’s)

Accessing DARWIN-OP via remote desktop may result inslower performance. This is a limitation from Intel’s platform.

Samba

Samba server is installed in DARWIN-OP. Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems.

You may find the source code directory at “/darwin” from DARWIN-OP’s PC.

The pre-installed source code may be updated without prior notice. Please check for updates periodically.
You may obtain updated source code at the following:
https://sourceforge.net/projects/darwinop/files/

You may also update the source code via Subversion with the command “svn up” from the directory /darwin in DARWIN-OP. This method assumes DARWIN-OP has internet access.

If you wish to run other programs, such as the tools, customization, continue running DARwIn-OP without the preinstalled demo program; then you need to terminate the demo program.

The operating chapter mentions the “RESET” button and its function exclusively for the sub controller. However, the camera and executable program (the demo program) are not controlled by the sub controller; therefore, whenever you press the reset button the camera and program will remain unaffected and continue running.

Killing the demo program is necessary to free up PC resources taken by the camera and executable.
To initiate a kill process following the procedure below:

Open the terminal window (from DARwIn-OP or terminal client)

Optain root user permission by typing ‘sudo su’ at the command line.

Enter the password ‘111111’ (six ones) (assuming you’re under “darwin” username). Keep in mind that keystrokes are not shown on this step.

Type ‘killall demo’.

Once the kill process is complete you may rerun the demo program or any other programs.

How to stop the demo program from running automatically every time DARwIn-OP is turned on.

The PC inside DARwIn-OP is set to run the demo program by default. However, users wishing to prevent this operation may do so by the following procedure:

Go to the directory /etc

With a text editor open the file rc.local (You shoud be root user.)
The file content looks like the image below.

Modify the file by adding # at the beggining of the /darwin/Linux/project/demo/demo
Afterwards the contents should look like the image below

Adding the # sign means that the line has been commented out. After insertion of the # sign save the changes. On the next booting of DARwIn-OP the demo program will no longer run automatically.

If you encounter an error with one or more actuators (LED blinking) during the demonstration program then you should immediately stop.

You may rerun the program without shutting down and restarting DARWIN-OP.
To rerun the demo program follow the procedure below:

Press “RESET” on DARWIN-OP.

Connect to DARWIN-OP either directly or via networking (recommended).

Obtain root user privileges (sudo su procedure).

The illustration above depicts the re-execution of the demo program

Note

the execute command is ./demo & instead of the normal ./demo

the line below reads: [1] 10223

What do point 1 and point 2 mean?

Executing ./demo & instead of ./demo means that the demo program is background process; therefore allows you to close the current working terminal window and end any connections with DARWIN-OP while the program runs. The & sign makes it a background process.

[1] means only one process for “demo” is running and 10223 is the process number in Ubuntu.
To end the demo program you may perform the killall procedure or just run kill 10223 (in this case).

public Vector3D operator - ( const double value )

public Vector3D operator * ( const double value )

public Vector3D operator / ( const double value )

Includes

minIni is a programmer’s library to read and write “INI” files in embedded systems.
The minIni library is distributed unter the Apache License, version 2.0, plus an aceptance clause to explicitly permit static linking of the library for commercial applications.

PlatformCM730 implements inheritance. PlatformCM730 classes communicate with the sub-board (sub-controller’s). Communications is performed at the platform level and necessary for control. PlatformCM730 classes can be implemented by virtual method.

Port control methods

OpenPort

ClosePort

ClearPort

WritePort

ReadPort

Multi-Thread for semaphore methods

LowPriorityWait

MidPriorityWait

HighPriorityWait

LowPriorityRelease

MidPriorityRelease

HighPriorityRelease

Communications Timeout check methods

SetPacketTimeout

IsPacketTimeout

SetUpdateTimeout

IsUpdateTimeout

Camera for Platform

The camera acquires image data. The framework’s image’s data classes are ImgGray and ImgColor. The camera captures data and converts is to ImgColor class.

Reads position values for the right arm. From values’ data the left arm mirrors the right arm.

Tutorial Procedure

Note Before you begin ensure that DARWIN-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/read_write
Look for the file “read_write” If not type make and the compiler will autogenerate read_write.
Execute the read/write by typing ./read_write.
Once running the read/write you will see the following

Grab DARWIN-OP’s right hand and move it around. You should notice that the left hand mimics the movement of the right hand.

You should also notice that the head and eye LED constantly change color.

You should also notice that the actuators controlling the left arm are stiff while all other actuators are loose.

During this tutorial please exercise caution when moving the right arm as DARWIN-OP may fall due to the released torque from the rest of the body.

GFB, GRL, AFB, ARL values will change if you move DARWIN-OP’s torso.
To do so grab DARWIN-OP by the handle and gently swing it around.
You should see the values change.

To end the tutorial hold the “CONTROL” key and press the C key. Afterwards press the “RESET” button from DARWIN-OP.
The head LED returns to blue and eye LED to green.

Result

Connect to DARwIn-OP via IP address and port 8080 to stream motion images from the camera.
(You may experience memory leaks with Chrome).

Camera’s gain and exposure values can be can be changed by clicking the buttons.

Tutorial Procedure

Note Before you begin, ensure that DARwIn-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/camera
Look for the file “camera_tutorial”. If not type make and the compiler will autogenerate camera_tutorial.
Execute the camera tutorial by typing ./camera_tutorial.
Once running the camera tutorial you will see the following

From your computer open a web browser (Firefox recommended, do not use Chrome due to memory leak) and type http://192.168.123.1:8080 on the address bar.
The IP address 192.168.123.1 is the default IP address assuming you’ve established a wired LAN connection with DARwIn-OP.

From your browser you can modify GAIN and EXPOSURE values.

The default values for GAIN is 255 and EXPOSURE is 1000.

Lowering gain values will decrease image brightness

Lowering exposure values will increase image contrast.

To end the tutorial hold the “CONTROL” key and press the C key. Afterwards press the “RESET” button from DARwIn-OP.
The head LED returns to blue and eye LED to green.
Close the web browser.

You may view the changes you’ve made by viewing the config.ini file from the current working directory (/darwin/Linux/project/tutorial/camera)

Main classes for the tutorial

Source code review

ColorFinder class is generated by capture image. Image capture generates ColorFinder by by finding the center of mass of pixels by pixel position from a given color. Also, minIni class sets the default value of the color.

Tutorial procedure

Note Before you begin, ensure that DARwIn-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/color_filtering
Look for the file “color_filtering”. If not type make and the compiler will autogenerate color_filtering.
Execute the image processing tutorial by typing ./color_filtering.
Once tutorial is running you will see the following screen

From your computer open a web browser (Firefox recommended, do not use Chrome due to memory leak) and type http://192.168.123.1:8080 on the address bar.
The IP address 192.168.123.1 is the default IP address and assuming you’ve established a wired LAN connection with DARWIN-OP.
The following values are the default values for the ball

Hue: 356

Tolerance: 15

Minimum Saturation: 50

Minimum Value: 10

Gain: 255

Exposure: 1000

You can change the color of the ball to the desired color by manipulating the parameters.
Example: chang the ball color from red (default) to blue.
Please refer to the table here for reference for values for blue.

Under default values for the ball DARWIN-OP would view a blue ball like the image above.

After manipulating the values DARWIN-OP would view a blue ball like the image above. Notice that a bright reddish orange patch covers most of the blue ball. The orange patch over blue is an indication that DARWIN-OP detects blue as the target color.

You will also notice the change in values for posx and posy. This is because DARWIN-OP is able to “detect” the ball therefore calculate the position of center of mass for the ball color.

posx is the value for center of mass in horizontal position

posy is the value for center of mass in vertical position.

If you remove the ball you will see the values for posx and posy return to -1.000000

The following table represents change in values from red ball (default) to blue ball

red (default)

blue (new values)

reference blue (from Color and White Balance Calibration)

Hue

356

217

225

Tolerance

15

15

15

Minimum Saturation

50

43

45

Minimum Value

10

0

0

Gain

255

255

255

Exposure

1000

1000

1000

Note Remember that these values are in accordance to the HSV color space. The values assigned for the colors are arbitrary and you may choose any values to suit your needs.

To end the tutorial hold the “CONTROL” key and press the C key. Afterwards press the “RESET” button from DARWIN-OP.
Close the web browser.
You may view the changes you’ve made by viewing the config.ini file from the current working directory (/darwin/Linux/project/tutorial/color_filtering).

Result

Head pan and tilt joints aim at the center of mass of the captured color. the head is centered around the color.

Tutorial Procedure

Note Before you begin, ensure that DARwIn-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/head_tracking
Look for the file “head_tracking”. If not type make and the compiler will autogenerate head_tracking.
Execute the head control tutorial by typing ./head_tracking.
Once running the tutorial you will see the following

DARWIN-OP’s head LED will change from green to amber.

DARWIN-OP tracks the red ball. However, the body remains still and only the head moves (Dynamixel ID 19 and 20).

To get DARWIN-OP track the ball place the ball at a distance approximately 1 to 1.5 feet away from the head. Placing the ball too close to DARWIN-OP will cause the head to move out of control.

You may also change the color DArwIn-OP tracks by opening our web browser.
From your computer open a web browser (Firefox recommended, do not use Chrome due to memory leak) and type http://192.168.123.1:8080 on the address bar.
the IP address 192.168.123.1 is the default IP address and assuming you’ve established a wired LAN connection with DARWIN-OP.

By Default DARWIN-OP will track a red ball.
Please refer to the table here for ball, red, blue, and yellow.

If you replace the red ball with another color DARWIN-OP will ignore it

As you adjust the color of the ball, from the web browser, you can also see DARWIN-OP’s camera track the ball in real-time once values are properly adjusted.

Over the course of the head control tutorial you will notice that the actuators LED blink as if they have an error. Disregard this notification during this tutorial.

To end the tutorial hold the “CONTROL” key and press the C key.
Press the “RESET” button on DARWIN-OP.
Close your web browser.

You may view the changes you’ve made by viewing the config.ini file from the current working directory (/darwin/Linux/project/tutorial/color_filtering).

Result

Ball is tracked by head tracking, Walking towards the ball via walking module.

Tutorial Procedure

Note Before you begin, ensure that DARwIn-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/ball_following
Look for the file “ball_following”. If not type make and the compiler will autogenerate ball_following.
Execute the walking control tutorial by typing ./ball_following.
The following message will appear on screen and DARWIN-OP will stand up from its kneeling position.

DARWIN-OP’s head LED will change from green to amber.

Place the ball (default red) in front of DARWIN-OP.

Press the “ENTER” key to continue

DARWIN-OP will walk towards the ball, but will not perform the kick.

Watch the display as DARWIN-OP walks towards the ball but halts when is ready to kick.

The line following “Start to press ENTER!” is DARWIN-OP surrent status. This line changes with DARWIN-OP’s motion. “[KICK] Right STOP” means that DARWIN-OP is ready to kick the ball with its right foot but has halted.

Move the ball a little and DARWIN-OP will resume walking until is gets close enough ready to kick.

You may also change the ball color DArwIn-OP tracks by opening our web browser.
From your computer open a web browser (Firefox recommended, do not use Chrome due to memory leak) and type http://192.168.123.1:8080 on the address bar.
the IP address 192.168.123.1 is the default IP address and assuming you’ve established a wired LAN connection with DARWIN-OP.

To end the tutorial hold the “CONTROL” key and press the C key.
Press the “RESET” button on DARWIN-OP.
Close your web browser.

You may view the changes you’ve made by viewing the config.ini file from the current working directory (/darwin/Linux/project/tutorial/ball_following).

Main classes for the tutorial

Action

Action script file consisting of page number and MP3 file path. The OS reads the script file then executes the action and mp3 file playback (based from the script). (LinuxActionScript class).
MotionModule’s action is processed by Action class. MotionManager Timer is synchronizes with the action’s process.

Result

Execution of the pre-scripted sequence action and mp3 playback from the script file.

Tutorial Procedure

Note Before you begin, ensure that DARwIn-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/action_script
Look for the file “action_script”. If not type make and the compiler will autogenerate action_script.
Execute the tutorial by typing ./action_script.
Once running the tutorial you will see the following

Follow the instructions by pressing the “ENTER” key.

DARWIN-OP stands up.

The head LED goes from green to amber.

DARWIN-OP performs Interactive Motion Mode once.

The script outputs the action page and sound mp3 file on screen sequentially.

the red cross represent the weight centered on each foot; while the blue cross for both feet combined.
DARWIN-OP can be aimed at several directions LX, LY, RX, RY. These values are modifiable.
Press the space bar to goggle walking on and off.

Tutorial Procedure

Note Before you begin, ensure that DARwIn-OP is in a stable kneeling position. During this tutorial torque from all actuators will be released.

Press the “RESET” button and ensure you’ve perform the killall procedure (if necessary).
DARWIN-OP’s head LED must be in green and eye LED in blue before you begin.

Go to the directory /darwin/Linux/project/tutorial/fsr
Look for the file “fsr”. If not type make and the compiler will autogenerate fsr.
Execute the fsr by typing ./fsr.
While running the fsr program yo may view the results as described above.
To end the tutorial hold the “CONTROL” key and press the C key. Afterwards press the “RESET” button from DARWIN-OP.
The head LED returns to blue and eye LED to green.

Tools, such as action editor, walking tuner, etc. can be found at /darwin/Linux/project
If you wish to use the tools is recommended that you connect to DARWIN-OP via SSH. Please go to “A. Ready” for example on how to connect.

Action Editor allows the user to control and edit DARWIN-OP’s motions and poses via command line. This process is done by manipulating values of the MX-28 actuator(s).
For more information about the MX-28, please refer to MX-28 manual.
For more information about Actuator ID Map of DARWIN-OP, please refer to ID Map.

Before getting into Action Editor be aware of the motion data file residing in the source code.

Motion File

The motion file is a file that contains DARWIN-OP’s poses and motion data. The data is read and written as position of the MX-28; so manipulating/editing the file is a robot-low-level task. Since the motion file data is binaries file you cannot view its contents directly. You can view its contents with Action Editor or RoboPlus Motion.
ROBOTIS currently supplies 2 motion files with the source code. They are located in /darwin/Data directory. These are:

The motion file contains 256 pages. Each page can store up to 7 stages (or steps) of motion data. In the basic motion file provided not all pages are used. You may add you own motion if you like by making use of the empty pages.

Page number: is the listed page number. If you want to create new motion poses you may use any empty page:

Page title: we recommend you use a page title if you will make use on an empty page.

Current position: This is the current position of the MX-28 for each ID. This data is represented by STP7 in Action Editor and Pose of Robot by Roboplus. Sometimes the position may read as ???? in Action Editor or OFF in Roboplus Motion. This means position of the MX-28 is not being read (and torque is off).
If you turn an MX-28 off you will not get current position reading until you turn it back on.
You can turn off any or all MX-28 at will. This is very convenient to make robot poses rather than entering position values.
For example if you want to make a new robot pose simply turn any MX-28 off, make the robot pose, and turn the MX-28(s) back on at that robot pose. Once turning on you’ll get the pose values.

Steps or stages: each page can store up to 7 steps, from STP0 to STP6. However, some motions may require more than 7 stages to perform completely. Simply use multiple pages, and link them with Next. Note that STP7 in Roboplus is rightmost colum labeled Pose of the Robot.

Next: is a link to indicate whether or not motion continues at a different page. To continue motions just list the page number where motion is to be continued. Number 0 indicates motion does not continue onto another page (default value). Linking page does not have to the in numerical order allowing you to link from one page to any other page.

Play Count: is the number of times the motion of the page is to be played.

Example: page 239 has a play count of 4 times then has a link to page 240. This means that motions on page 239 will be executed 4 times then move on to page 240 and continue with the motions on page 240.

Exit: There may be times when a motion is stopped. If that’s the case the robot may be in an unstable position. Exit is much like Next, so Exit should be linked to a page where DARWIN-OP can return to a stable pose. Number 0 indicates no link to exit page linked (default value).

Tip when calling a motion requires multiple pages we strongly suggest that you call that motion from the starting page. For example “talk2” starts at page 41 and ends at page 47; this means you should call page 41 when calling “talk2.” Calling the subsequent pages for “talk2” (i.e. page 43) may cause the robot to perform abnormally.

It is strongly advised that you test your newly-created or edited motions for the sake of DARWIN-OP’s stability, by making small incremental changes in position, speed/time, and pause values.

Please use whichever program is most convenient for you. However, you may end up working with both. Always remember to save your work.

Contents and description of the motion file used for the demo programs.

Although there are many pages occupied with data. Not all pages are actually set in motion by DARWIN-OP. here is a list of the pages used along with a brief description of each page.

page number

page title

brief description of page

number of pages

notes

1

init

DARWIN-OP initial standing pose

1

4

hi

DARWIN-OP bowing greet

1

12

rk

DARWIN-OP doing a right kick (from Soccer mode)

1

13

lk

DARWIN-OP doing a left kick (from Soccer mode)

1

15

sit down

DARWIN-OP on its knees

1

23

d1

DARWIN-OP “yes, go!” (from Interactive mode)

1

24

d2

DARWIN-OP “wow!” (from Iteractive mode)

1

27

d3

DARWIN-OP “ooops!” (from Interactive mode)

1

38

d2

DARWIN-OP “bye bye” (from Interactive mode)

2 (38 and 39)

starting page

41

talk2

DARWIN-OP “introduction” (partial, from Interactive mode)

7 (41 through 47)

starting page

54

init

DARWIN-OP “clap please” (from Interactive mode)

4 (54,55,56,58)

starting page, excludes page 57

Getting Started with Action Editor

Warning Before running Action Editor please verify angle resolution the actuators are currently loaded with.
For example, if the actuators resolution is 1024 then you can only work with motion file for 1024-resolution (motion_1024.bin)
Running another file may damage DARWIN-OP.
If you are unsure about which angle resolution the actuators are currently loaded with then refer to dxl_monitor.
To install the proper resolution for the actuator then refer to firmware_installer.

Action editor can be found at /darwin/Linux/project/action_editor
You can modify DARWIN-OP motion data as done in a terminal window.

To read and write data go to the directory: /darwin/Linux/project/action_editor

Make sure that there is an executable file named “action_editor”.
Please note that when running action editor the program will open the file motion_4096.bin by default.
The illustrations below are from the motion file ‘motion_1024.bin’ and ‘motion_4096.bin’.
Remember that motion files are located at /darwin/Data

If there is no said file then create it by typing make. The compiler will automatically generate the file.

Run the program by typing ./action_editor. You will notice DARWIN-OP’s head LED changes from green to amber.
Reminder: remember the current angle resolution for the actuators.

Once in the program type help for further information

From there you may follow the options given to you.

To exit the program type exit.

Please note the following:

STP7 is the current value of the actuators. ???? means that torque has been released.

PauseTime is the pause for motion playback for step STP[x].

Time(x 8msec) is the time period for DARWIN-OP to complete step STP[x]. Each time unit account for 8ms of time.

After typing help the following list will appear.

The menu options are very extensive so you may not be able to memorize every command. At any time you type help to invoke the options list.

exit: exits the program. After exiting the program press the “RESET” button on DARwin-OP.

copy [index]: copies data from page [index] to current page. For example if you are on page 5 and want to copy page 9 then type copy 9.

set [value]: sets position value on chosen actuator. For example If you want ID19 (head pan) to have a value of 512 then using the keyboard’s directional keys place the cursor on ID19 and type set 512.

save: saves any changes you’ve made. the saved motion file (motion.bin can be found at /darwin/Data/

play: plays motion(s) of current page.

name: changes the name of the current page. You can view the name of the page at the top right portion of the screen. For example, page 2 is titled ok; to change the name type name and press the “ENTER” key. name: will appear at the bottom of the screen. Input the desired name for the page, good for instance, and press the “ENTER” key again.

on/off [index1] [index2] [index3] …: turns torque on/off from ID[index1] ID[index2] ID[index3]. For example off 20 releases torque from ID20. Notice that STP7 for ID20 will read [????]. Typing on 20 turns torque from ID20 on again and the screen outputs the current position data of ID20.

Before off 20 command. Value of ID20 is 549 (observe STP7).

ID20 is off. Type re to refresh the screen. During this time you may manually move the head up and down.

ID20 is on again after typing on 20. notice the value of ID20 is 624 and not 453 (the head has been tilted upwards a bit). Type re to refresh the screen.

Example motion editing with Action Editor

Let’s modify DARWIN-OP’s pose when kneeling. Let’s change the position of the left arm during kneeling. Dynamixels for the left arm are ID 2, 4, and 6.

Tip Before you begin you may want to make a copy of “motion_4096.bin” file and save it elsewhere. If you don’t like with the changes you’ve made you can always revert back to the original data by overwriting the file.

Run Action Editor

Find the page where the kneeling (sit down) motion is by typing list

Notice that the motion data is on page 15.

Exit the list and go tp page 15 by typing page 15.

With the current data values from page 15 DARWIN-OP’s pose will look like this. Do so by typing play

Once on page 15 edit the values on ID 2, 4, 6. One of the easiest ways to edit values is to release the torque on Dynamixels from the left arm.

release the torque on ID 2, 4, and 6 by typing off 2 4 6

after getting the desired pose turn torque on again by simple typing on. Afterwards match the values for ID2, ID4, ID6 on STP0 match those from STP7 (save your work).

Type play and you you will notice the newly updated values for ID 2, 4, and 6

The values translate into DARWINOP pose as following

Type save if you want this pose to be new sitting pose whenever DARWIN-OP is kneeling (sit down).

You may be able to reset the MX-28 actuators should you encounter an error in motion, actuator(s) is(are) malfunctioning, or perceive that actuator(s) is(are) malfunctioning.

Go to the directory /darwin/Linux/project/dxl_monitor
Make sure that there is an executable file named “dxl_monitor”.
If there is no said file then create it by typing make the compiler will automatically generate the file.
Run the program by typing ./dxl_monitor
Once in the program type help for information.
To exit the program type exit

After inputting help the screen outputs the offered option.

exit: exits the program. After exiting the program press the “RESET” button on DArwIn-OP.

scan: outputs the current status of all Dynamixels.

id [ID]: go to Dynamixel ID:[ID]. The default ID is ID:200 (CM-730 controller). For example, if you wish to go to ID20 (head tilt) then type id 20.

Now the current working ID is ID20.

d: displays the current control table of the CM-730 and all Dynamixels. Use this option if there is(are) any anomaly(anomalies) with DARWIN-OP.

reset: defaults the value of current Dynamixel. Use this option if the current actuator has an operating error or is malfunctioning.

reset all: defaults the value of all Dynamixels. Use this option if the current(s) or all Dymanixel(s) has(have) operating error(s) or is(are) malfunctioning.

wr [ADDR] [VALUE]: writes value [VALUE] to address [ADDR] of current Dynamixel. For further information on Dynamixel addresses and values click here. For example, go to ID18 (left ankle roll) and type wr 25 1. This means that address 25 (LED) has been turned on (1). You will notice that the actuator on DARWIN-OP left foot LED is turned on. To turn the LED off type wr 25 0.

If all goes well you will see “Success to write!”

on/off: turns torque on/off off current Dynamixel.

on/off all: turns torque on/off of all Dynamixels.

To check the currently operating angle resolution perform the following:

Select an eactuator by typeing id (ID number). For example id 3

Type d to display the control table

Look for CW_ANGLE_LIMIT, CCW_ANGLE_LIMIT, and GOAL_POSITON. if all of these values show 1023 or less, then resolution is 1024. if any of these values is between 0 and 4095 then the resolution is 4096.
There may be an occasion that a given actuator may display values of 1023 or lower but you may not be sure whether the resolution is either 1024 or 4096. In such case make verifications on several actuators.
If all the verified values are 1023 or lower, then the resolution is 1024.
If any of the values display larger than 1023 then the resolution is 4096.

ALL Dynamixel actuators installed in DARWIN-OP are set to either 1024 or 4096 resolution. Some actuators being set at 1024 and others at 4096 is not allowed. in such case the demo program will not run.

To ensure all Dynamixel actuators installed in DARWIN-OP are at the same resolution please refer to the firmware installer procedure.

For DARWIN-OP support with RoboPlus Motion and Dynamixel’s MX-28 at 4096-resolution you need version 1.0.23.0

Warning

RoboPlus Motion currently does not have a 3D model of DARWIN-OP. Please refrain from using the “Pose Utility” tab.

Please refrain from using available Bioloid robots in the “Pose Utility” tab (i.e. Humanoid Type A), as none of these robots have matching kinematics nor dimensions with DARWIN-OP. Doing so it may damage the robot.

Do not save any changes into a motion (.mtn) file [using the save as option]. The .mtn file used for Bioloid robot is incompatible with DARWIN-OP.

RoboPlus is a graphical alternative to Action Editor. You may use either program to edit DARWIN-OP’s motion. You may use Roboplus at one point and continue the same work with Action Editor and viceversa. In fact Roboplus Motion can perform the exact same functions of Action Editor.

You may find RoboPlus-related files at /darwin/Linux/project/roboplus
However, to properly execute this program DARWIN-OP must be connected to a computer via wired/wireless LAN with RoboPlus 1.0.23.0 or above.

Note This section assumes that the actuators installed in DARWIN-OP are set at the resolution of 1024( MX-28 firmware version 26(0x1A) ). RoboPlus currently does not support MX-28 angle resolution of 4096 ( MX-28 firmware version 27(0x1B) or higher ).

This option allows you to edit DARWIN-OP’s motion file with RoboPlus Motion.

Mac and Linux versions of RoboPlus are currently unavailable so this option will only work with Windows-based computers.

To modify motion data with RoboPlus perform the following:

Go to /darwin/Linux/project/roboplus

Type make to create an executable file if there is no executeble file

Once executable file is complete type ./roboplus (the head LED will change from green to amber)

From your PC start RoboPlus and select RoboPlus Motion

On “Port” select TCP/IP and connect robot

Once connected you may edit motion data.

When finished disconnect DARWIN-OP from RoboPlus (Disconnected followed by Waiting messages will appear at the terminal window).

You may close RoboPlus from your PC and abort the program by holding the “CONTROL” key and pressing the “C” key (once you abort the program the head LED will return to green).

The following illustrations will guide you to properly set the parameters for a successful connection with RoboPlus.

The illustrations on IP, under the TCP/IP tab, assumes you’ve establiched a connection with DARWIN-OP via wired LAN under default settings.

You may save any changes into a motion.bin file. The directory is /darwin/Data/motion_4096.bin

Example of motion editing with RoboPlus

Let’s change DARWIN-OP’s sitting pose further by changing the pose of the left arm. Let’s continue the work from Action Editor. Remember that you may continue any work done with Action Editor with Roboplus and viceversa.

Tips Before you begin you may want to make a copy of “motion_4096.bin” file and save it elsewhere. If you don’t like with the changes you’ve made you can always revert back to the original data by overwriting the file.

When interfacing with DARWIN-OP wirelessly make sure you:

remember the IP address assigned by DHCP.

have a strong wifi communications signal between your wireless access point/router and DARWIN-OP

make sure you remember the IP address assigned by DHCP. If you don’t remember type ifconfig.

Run Roboplus from DARWIN-OP2) After running Roboplus from DARWIN-OP run RoboPlus Motion from your PC

In RoboPlus Motion click on “Tool(T)” and select “Option(O)”

If necessary change the IP address to the one assigned by DHCP. Ensure that the port number is 6501

On Port make sure to select TCP/IP as the port. Then click on the connect icon.

Proceed with editing. For more information on RoboPlus Motion click here.

To save changes click on the save icon or go to File(F) => Save(S). Do not select Save As(A), because the mtn file is not compatible with DARWIN-OP. When saving the changes the file is “motion_4096.bin” (located at /darwin/Data directory).

Warning Before you change any value(s) it is highly recommended that you become very familiar and proficient with DARWIN-OP. ROBOTIS is not responsible for any damages caused as result of changes in value due to lack or user expertise or user negligence.

Walk tuning files can be found at /darwin/Linux/project/walk_tuner
You may modify DARWIN-OP’s pace and other walking related items.
Before starting walking pace tuner ensure that DARWIN-OP is in the kneeling position.

Tip change value(s) in small increments. Large increments may cause DARWIN-OP to perform unexpectedly.

Tip Hold DARWIN-OP via the handle at all times during this program.

To tune walking parameters go to the directory /darwin/Linux/project/walk_tuner

Make sure that there is an executable file named “walk_tuner”.

If there is no said file then create it by typing make the compiler will automatically generate the file.

Run the program by typing ./walk_tuner. You will notice DARWIN-OP’s head LED changes from green to amber.

DARWIN-OP will stand up.

Once in the program type help for information.

From there you may follow the options given to you.

To exit the program type exit

You will see a message “Terminate Walking Tuner.” If so program has successfully ended.

Hold DARWIN-OP so you prevent it from falling; press the “RESET” button to release torque from all actuators.

The following screen will appear after executing the program

Ensure you resize the window so that information displayed on screen is not truncated.

Command line-based

This screen is truncated (notice that Y offset (mm) has the OFF option instead of 5). To undo truncation just resize the window and type re to refresh the screen.
It is very important to have a proper size window for this program. Any misread in values due to improper window size by the user could result in undesired consequences.

Pressing the space bar will reset the values enclose by ( and )
To observe changes in value for the gyroscope and accelerometer push DARWIN-OP gently and slightly forward, backwards, to the left, to the right; grab DARWIN-OP by the carrying handle and shake it very slightly.
To end and return to the starting screen press the “ESC” key.
The values from the screen are factory-default values. These values are arbitrary.
Use the up or down directional keys to scroll up or down.
Use the [ to decrease/switch values.
Use the ] key to increase/switch values.
Hold the shift key and press [ or ] to decrease or increase values by 10x.

Web browser-based

One advantage of web browser-based walk tuner is the ability to tune DARWIN-OP’s walking with a conventional web browser. This option also allows you tune walking from a wifi capable mobile device and away from your desk.
Another advantage of web-based browser is that it offers the flexibility to tune walking parameters regardless of device, and operating system. You can tune walking with basically any device with wifi and an internet browser. You may start tuning from one device and continue tuning work with another.
You may perform walk tuner via wired or wireless LAN connection. However, with mobile devices you’ll need to be connected wirelessly.
Make sure to run Walk Tuner

Accessing walk tuner from a computer (wired/wireless)

Ensure that Walk Tuner is running

Open your web browser

If you are interfacing with DARWIN-OP via wired LAN then type http://192.168.123.1:8080 on the address bar

If you are interfacing with DARWIN-OP via wifi then type http://IP-address-from-DHCP:8080 on the address bar

Tip If you cannot remember the IP address provided by DHCP then on a new terminal window type ifconfig.

When interfacing with DARWIN-OP wirelessly make sure you:

remember the IP address assigned by DHCP.

have a strong wifi communications signal between your wireless access point/router and DARWIN-OP

Ensure that Walk Tuner is running
2, Ensure that you know the IP address provided by DHCP

Here are some sample screenshots

from an iOS device

from a tablet (QNX)

You may also notice the same missing fields as in the computer-based web browser. However, double clicking/double tapping the screen will only magnify/decrease the display. In this case increase a value by 1 unit and decrease it again by 1 unit the browser will display the initial value.

Software version 1.2.0 or higher

Firmware installer can be found at /darwin/Linux/project/firmware_installer

To download firmware software into the sub controller or actuator at the directory /darwin/Linux/project/firmware_installer

Make sure that there is an executable file named “firmware_installer”.

Input -h or -help argument for usage.

If there is no said file then create it by typing make the compiler will automatically generate the file.

Ensure that “cm730_0x12.hex” and “mx28_0x1C_4096.hex” are present.

Run the program by typing ./firmware_installer **
By default the installer will choose cm730_0x12.hex and mx28_0x1C_4096.
To load mx28_0x1A_1024.hex then you must type **./firmware_installer -a mx28_0x1A_1024.hex

Install the CM-730 firmware by selecting the first option.

Press the CM-730’s “RESET” button.

Ensure that download succeed.

To install the firmware for the RX-28M actuators select the second option from firmware_installer.

Software version 1.1.0 or lower

Firmware installer can be found at /darwin/Linux/project/firmware_installer

To download firmware software into the sub controller or actuator at the directory /darwin/Linux/project/firmware_installer

Make sure that there is an executable file named “firmware_installer”.

Input -h or -help argument for usage.

If there is no said file then create it by typing make the compiler will automatically generate the file.

Ensure that “cm730_rx28m_4096.hex” and “cm730_rx28m_1024.hex” are present.

Run the program by typing ./firmware_installer **
By default the installer will choose cm730_4096.hex. To load cm730_1024.hex thenyou must type **./firmware_installer -f cm730_1024.hex

Install the CM-730 firmware by selecting the first option. This option also includes installation firmware for the MX-28 actuators. Please note that Dynamixel firmware will only be installed into the controller.

Press the CM-730’s “RESET” button.

The installer will assign 2 blocks of 128KB/each for firmware download. Ensure that both blocks succeed.

To install the firmware for the MX-28 actuators (from controller to actuators) select the second option from firmware_installer. Note that this option installs the firmware that is currently installed on the CM-730 sub controller. This process does not include any actuator firmware installed in the main controller (PC).

The purpose of offset tuner is to offset DARWIN-OP’s poses. Changes made in Offset Tuner will affect DARWIN-OP when running other programs (i.e. demo programs). This program is practical to make some changes on DARWIN-OP when performing under certain environmental conditions.

Warning
Before you change any value(s) it is highly recommended that you become very familiar and proficient with DARWIN-OP and the MX-28. Remember that changes made with Offset Tuner affects DARWIN-OP’s performance.
Some motions may need to be edited as a result of Offset Tuner. Use Action Editor to edit the motions (i.e. when trying to get up after falling).
Improper modifications with Offset Tuner may affect DARWIN-OP’s performance adversely.
ROBOTIS is not responsible for any damages caused as result of changes in value due to lack of user expertise or user negligence.

Offset tuning files can be found at /darwin/Linux/project/offset_tuner
Before starting walking pace tuner ensure that DARWIN-OP is in the kneeling position.

To tune walking parameters go to the directory /darwin/Linux/project/offset_tuner

Make sure that there is an executable file named “offset_tuner.”

If there is no said file then create it by typing make the compiler will automatically generate the file.

Run the program by typing ./offset_tuner. You will notice DARWIN-OP’s head LED change from green to amber.

DARWIN-OP will stand up. Please be very cautious as DARWIN-OP can fall while standing up.

Once in the program type help for information.

From there you may follow the options given to you.

To exit the program type exit

You may see a message “are you sure? (y/n)” Press the y key to confirm. Press the n key to cancel. This message will appear if you make changes but have not save such changes.

Offset tuner allows you to manipulate the MX-28 position values.
For more information about the MX-28, please refer to MX-28 manual.
For more information about Actuator ID Map of DARWIN-OP, please refer to ID Map.

Ensure that you have a properly sized window

Afterwards the following window appears

GOAL: is the value set for the Dynamixel ID. For more information about Goal refer to dxl_monitor. If you modify this value MODVAL value will modify automatically. For example if you decrease ID 11 by 13 units then MODVAL from ID 11 will automatically decrease its value by 13 units. Changes made here will not be saved.

OFFSET: is the value set for the Dynamixel offset. to change poses edit Offset value(s). This is the difference between MODVAL and GOAL. You may edit this value directly or via MODVAL. Changes made here can be saved

MODVAL: This is the “new” goal position. This is the modified value. You may edit this value directly or via OFFSET. Changes made here can only be saved as OFFSET values

PRSPOS: is current position of the Dynamixel ID. This PRSPOS may change after a screen refresh or running the program at a different time. This is the current position value.

ERRORS: is the difference between PRSPOS and MODVAL.

P_GAIN: is the value set for P (proportional) gain. You can modify the P gain value in this program but cannot save changes.

I_GAIN: is the value set for I (Integral) gain. You can modify the P gain value in this program but cannot save changes.

D_GAIN: is the value set for P (differential) gain. You can modify the P gain value in this program but cannot save changes.

type help and the following window appears

exit: exits the program. After exiting the program press the “RESET” button on DARwin-OP.

re: refreshes the screen.

set [value]: sets position value on chosen actuator. You may set the offset on OFFSET of the new value in MODVAL. If change value in MODVAL OFFSET value will automatically change and viceversa. Use the directional arrows to select the value you wish to change.

pgain [value]: sets the P (proportional) parameters on all Dynamixels.

igain [value]: sets the P (integral) parameters on all Dynamixels.

dgain [value]: sets the P (differential) parameters on all Dynamixels.

save: saves any changes you’ve made ( /darwin/Data/config.ini ). The config.ini file only contain changes made in OFFSET (either directly or via MODVAL).

on/off: turns on/off torque from all Dynamixels.

on/off [index1] [index2] [index3] …: turns torque on/off from ID[index1] ID[index2]ID[index3]. For example if you type off 13 16 19 then torque from ID 13, 16, and 19 will be released.

Pressing the [ key will decrease value by 1 unit. Holding the shift key + [ will decrease value by 10 units. Use the directional arrows to select the value you wish to change.

Pressing the ] key will increase value by 1 unit. Holding the shift key + ] will increase value by 10 units. Use the directional arrows to select the value you wish to change.

Example with Offset Tuner

Let’s make some changes of the upper body so that DARWIN-OP appears in a more relaxed pose.
The ID’s involved in this change are 1, 2, 5, and 6.

Once you run the program you will notice that DARWIN-OP remains in the standing pose.

and the following screen provides information on the MX-28 at the current pose

The current pose may not look as relaxed so let’s make some changes in the arm joints.

Use the directional keys to move the cursor over to the OFFSET column. Use the [ key to decrease (hold the shift key + [ key to decrease by 10 units at a time). Use the ] key to increase (hold the shift key + ] key to increase by 10 units at a time). Make the appropriate changes for ID’s 1, 2, 5, and 6.

You can visually see the changes of pose on DARWIN-OP as you increase/decrease the values.

DARWIN-OP;s standing pose is now more relaxed.
The following screenshot is information on the MX-28 with the new pose

Notice that only OFFSET on ID’s 1, 2, 5, and 6 has been changed. During the changes if you think the errors are too large (like ERRORS of 8 for ID 1 and -8 for ID 2, then adjust the P I D gain values. Please keep in mind that changes in P I D gain values will not be saved.

Type save to save changes. to view the saved file go to /darwin/Data and read the “config.ini” file by typing cat config.ini

As you can see only OFFSET values are saved.
Since this is an offset tuner program any position data on ID’s 1, 2, 5, and 6 from the motion_4096.bin file will be offset by the amount edited. In other words any other program will be affected by the changes (i.e. the demo program).

Notice the arms as DARWIN-OP pursues the ball. Compare this pose with an unedited version of the offset.

Another picture showing DARWIN-OP with the new arm pose.

Let’s compare 2 DARWIN-OP’s (left DARWIN-OP unchanged, right DARWIN-OP with the edited offset). Both DARWIN-OP running under Interactive Mode of the demo program synchronized.

Notice how the changes take effect as soon as the demo program is loaded.
Select Interactive Mode on both DARwIn’s and press the Start button simultaneously.

Both are about to say “thank you” (notice the arms from each DARwIn). The DARwIn on the right appears more relaxed.

The arms and shoulders from DARwIn on the right are affected as a result of Offset Tuner.