Professional Documents
Culture Documents
ROBOTIS OP-development
ROBOTIS OP-development
ROBOTIS OP-development
com/docs/en/platform/op/development/#development
1. 1. Getting Ready
1. 1. 1. Connect to OP
1. 1. 1. 1. Direct Connection
You may connect to DARWIN-OP directly with conventional USB keyboard, USB mouse
and HDMI-compatible display.
• DHCP : auto
or
• DHCP : manual
• IP : 192.168.123.100 ( you can choose 192.168.123.2 ~ 192.168.123.255 )
• Subnet mask : 255.255.255.0
• Default gateway : 192.168.123.1
1. Check for inet addr under wlan0 (it is highly recommended that you write this number
down).
1. Use this number to connect to DARWIN-OP wirelessly. You may connect via any
method using this number (VNC, PuTTY, SAMBA drive, ZOC, etc).
1. 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
throughput. A weak signal may adversely affect wifi performance (for example MJPEG
streaming).
3. Make sure that there are no other devices operating that cause harmful interference with the
wifi signal (for example microwave ovens).
4. 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.
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.
1. 1. 2. Source Code
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.
Killing the demo program is necessary to free up PC resources taken by the camera and
Once the kill process is complete you may rerun the demo program or any other programs.
1. 1. 3. 1. 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:
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.
You may rerun the program without shutting down and restarting DARWIN-OP.
To rerun the demo program follow the procedure below:
NOTE :
1. 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.
2. [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).
1. 2. Framework
1. 2. 1. CM730 References
1. 2. 1. 1. PlatformCM730 Class
Interface classes for CM730 port control. Each platform gets its matching classes
Interfaces
• Arguments : None
• Return : Returns “true” on success. On error, “false” is returned.
• Arguments : None
• Return : None
• Arguments : None
• Return : None
• Arguments
• Arguments
• Arguments : None
• Return : None
• Arguments : None
• Return : None
• Arguments : None
• Return : None
• Arguments : None
• Return : None
• Arguments : None
• Return : None
• Arguments : None
• Return : None
• Arguments
• Return : None
• Arguments : None
• Return : Return “true” on timeout.
• Arguments
• Return : None
• Arguments : None
• Return : Retrun “true” on timeout updated.
• Arguments
• Return : None
1. 2. 1. 2. CM730 Class
Communication with CM-730 board. Class platform porting is necessary for proper
functionality.
Communication Result
Output message of during link between DYNAMIXEL and CM730.
Name Description
Name Description
Special ID#
Special ID’s
Address#
Control Table Address
Constructions#
CM730(PlatformCM730 *platform )
• Arguments
platform PlatformCM730 -
Methods#
bool Connect( )
Links CM-730.
• Arguments : None
• Return : true (sucess), false (failure)
void Disconnect( )
Releases CM-730.
• Arguments : None
• Return : None
• Arguments
• Arguments
int ReadByte( int id, int address, int *pValue, int *error )
Reads unit byte from CM-730 Control Table value
• Arguments
id int DYNAMIXEL ID
• Arguments
int ReadWord( int id, int address, int *pValue, int *error )
Reads 2 bytes from CM-730 Control Table value
• Arguments
id int DYNAMIXEL ID
int ReadTable( int start_addr, int end_addr, unsigned char *table, int *error )
Reads 2 bytes from CM-730 Control Table value
• Arguments
int ReadTable( int id, int start_addr, int end_addr, unsigned char *table, int *error )
Reads CM-730 Control Table value from start_addr to end_addr
• Arguments
id int DYNAMIXEL ID
• Arguments
int WriteByte( int id, int address, int *pValue, int *error )
Writes unit byte to CM-730 Control Table
• Arguments
id int DYNAMIXEL ID
• Arguments
int WriteWord( int id, int address, int value, int *error )
Writes 2 bytes to CM-730 Control Table
• Arguments
id int DYNAMIXEL ID
int SyncWrite( int start_addr, int each_length, int number, int *pParam )
• Arguments
start_addr int -
each_length int -
number int -
pParam int* -
lowbyte int -
highbyte int -
word int -
word int -
red int -
green int -
blue int -
1. 2. 2. Math References
1. 2. 2. 1. Matrix3D Class
MAXNUM_ELEMENT
The maximum number of an array
Constructions
Matrix3D( )
• Arguments : None
Data Members
Methods
void Identity( )
Matrix initialization.
• Arguments : None
• Return : None
bool Inverse( )
Computes inverses.
• Arguments : None
• Return : true (success), false (failure)
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Arguments
• Return : None
Operators
Includes
• #include “Point.h”
• #include “Vector.h”
1. 2. 2. 2. Plane3D Class
Plane3D point class for 3D operations
Constructions
Plane3D( )
• Arguments : None
1. 2. 2. 3. Point2D Class
Point2D point class for 2D operations
Constructions
Point2D( )
• Arguments : None
x double x-coordinate
y double y-coordinate
Data Members
public double X
• X-coordinate value
public double Y
• Y-coordinate value
Methods
• Arguments
Operators
1. 2. 2. 4. Point3D Class#
Point3D point class for 3D operations
Constructions
Point3D( )
• Arguments : None
x double x-coordinate
y double y-coordinate
z double z-coordinate
Data Members
public double X
• X-coordinate value
public double Y
• Y-coordinate value
public double Z
• Z-coordinate value
Methods
• Arguments
Operators
1. 2. 2. 5. Vector3D Class
Vector class point for 3D operations
Constructions
Vector3D( )
• Arguments : None
x double x-coordinate
y double y-coordinate
z double z-coordinate
Data Members
public double X
• X-coordinate value
public double Y
• Y-coordinate value
public double Z
• Z-coordinate value
Methods
• Arguments : None
• Return : Vector length
• Arguments : None
• Return : None
• Arguments
• Arguments
• Arguments
• Arguments
Operators
Includes
• #include “Point.h”
1. 2. 3. minINI Reference
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.
1. 2. 4. Motion References
1. 2. 4. 1. JointData Class
Motion Class shares data between classes
Joint ID
• Joint ID is the same as DYNAMIXEL ID
Compliance Slope
enum value can be used with Compliance Slope
Name Value
SLOPE_HARD 16
SLOPE_DEFAULT 32
Name Value
SLOPE_SOFT 64
SLOPE_EXTRASOFT 128
Constructions
JointData( )
• Arguments : None
Methods
• Arguments
id int Joint ID
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Return : true/false
• Arguments
• Return : None
• Arguments
• Arguments
• Return : None
• Arguments
• Arguments
• Return : None
• Arguments
• Arguments
• Return : None
• Arguments
• Return : None
• Arguments
• Arguments
• Return : None
• Arguments
1. 2. 4. 2. Kinematics Class
Robot Kinematics class information
Constructions
Kinematics( )
• Arguments : None
Data Members
Methods
Kinematics* GetInstance()
• Arguments : None
• Return : Kinematics private unique instance
Includes
• #include “Matrix.h”
• #include “JointData.h”
1. 2. 4. 3. Action Class#
SPEED_BASE_SCHEDULE 0x0 -
TIME_BASE_SCHEDULE 0x0a -
struct PAGEHEADER
Header structure. (total 64 bytes)
struct STEP
Step Structure (total 64 bytes)
struct PAGE
Page Structure (total 512 bytes)
Data Members
bool DEBUG_PRINT
• Enable/Disable debugging message print.
Methods
• Arguments : None.
• Return : pointer of Action’s unique instance.
void Initialize( )
Initialize.
• Arguments : None
• Return : None
void Process( )
Process.
• Arguments : None
• Return : None
• Arguments
• Arguments
• Arguments
• Arguments
index int -
pPage PAGE* -
void Stop( )
Stop playback.
• Arguments : None
• Return : None
void Brake( )
• Arguments : None
• Return : None
bool IsRunning( )
• Arguments : None
• Return : On action is running, true is returned. On action is stoped, false is
returned.
iPage int* -
iStep int* -
index int -
pPage PAGE* -
index int -
pPage PAGE* -
pPage PAGE* -
• Return : None
1. 2. 4. 4. Head Class
Methods
• Arguments : None
• Return : Pointer of Head class unique instance
void Initialize( )
Method to initialize variables and move head to default position.
• Arguments : None
• Return : None
void Process( )
• Arguments : None
• Return : None
double GetTopLimitAngle( )
• Arguments : None
• Return : Top limit
double GetBottomLimitAngle( )
• Arguments : None
• Return : Bottom limit
double GetRightLimitAngle()
• Arguments : None
• Return : Right limit
double GetLeftLimitAngle( )
• Arguments : None
• Return : Left limit
double GetPanAngle( )
• Arguments : None
• Return : Present pan angle value
double GetTiltAngle( )
• Arguments : None
• Return : Present pan angle value
void MoveToHome( )
• Arguments : None
• Return : None
• Return : None
• Return : None
void InitTracking( )
• Arguments : None
• Return : None
err Point2D -
• Return : None
void MoveTracking( )
• Arguments : None
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
1. 2. 4. 5. Walking Class#
Walking Phase
Phase number
Name Value
Name Value
PHASE0 0
PHASE1 1
PHASE2 2
PHASE3 3
Data Members
double X_OFFSET
double Y_OFFSET
double Z_OFFSET
double A_OFFSET
double P_OFFSET
double R_OFFSET
double PERIOD_TIME
double DSP_RATIO
double X_MOVE_AMPLITUDE
double Y_MOVE_AMPLITUDE
double Z_MOVE_AMPLITUDE
double A_MOVE_AMPLITUDE
bool A_MOVE_ATM_ON
bool BALANCE_ENABLE
double BALANCE_KNEE_GAIN
double BALANCE_ANKLE_PITCH_GAIN
double BALANCE_HIP_ROLL_GAIN
double BALANCE_ANKLE_ROLL_GAIN
double Y_SWAP_AMPLITUDE
double Z_SWAP_AMPLITUDE
double ARM_SWING_GAIN
int PELVIS_OFFSET
int HIP_PITCH_OFFSET
Methods
• Arguments : None
• Return : pointer of Walking’s unique instance.
int GetCurrentPhase( )
• Arguments : None
double GetBodySwingY( )
• Arguments : None
• Return : Y axis body swing value.
double GetBodySwingZ( )
• Arguments : None
• Return : Z axis body swing value.
void Initialize( )
Initialize.
• Arguments : None
• Return : None
void Start( )
• Arguments : None
• Return : None
void Stop( )
• Arguments : None
• Return : None
void Process( )
• Arguments : None
• Return : None
bool IsRunning( )
• Arguments : None
• Return : On walking is running, true is returned. On walking is stoped, false is
returned.
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
• Arguments
ini minIni* -
• Return : None
1. 2. 4. 6. MotionManager Class
Motion Module management class
Methods
• Arguments : None.
• Return : pointer of MotionManager’s unique instance.
• Arguments
cm730 CM730* -
bool Reinitialize( )
Reinitialize.
• Arguments : None.
• Return : On success, true is returned. On fail, false is returned.
void Process( )
Periodically performs a called function.
• Arguments : None
• Return : None
• Arguments
enable bool -
• Return : None
bool GetEnable( )
Get enable status
• Arguments : None
• Return : Enable status
• Arguments
• Return : None
• Arguments
• Return : None
Includes
• #include <list>
• #include “MotionStatus.h”
• #include “MotionModule.h”
• #include “CM730.h”
1. 2. 4. 7. MotionStatus Class
Motion Module Feedback controlfor each status class
Data Members
Includes
• #include “JointData.h”
1. 2. 5. Vision References
1. 2. 5. 1. BallFollower Class
Constructions
BallFollower( )
• Arguments : None
Data Members
int KickBall
• Ball position for kicking. ( -1 : Right, 0 : No ball, 1 : Left )
Methods
• Arguments
ball_pos Point2D -
• Return : None
1. 2. 5. 2. BallTracker Class
Constructions
BallTracker( )
• Arguments : None
Data Members
ColorFinder finder
• ColorFinder class for ball searching
Point2D ball_position
• Ball position search via ColorFinde
Methods
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
camImg Image* -
• Return : None
1. 2. 5. 3. ColorFinder Class
Constructions
ColorFinder( )
• Arguments : None
ColorFinder( int hue, int hue_tol, int min_sat, int min_val, double min_per, double
max_per )
• Arguments
Data Members
int m_hue
• Hue value for color ( 0 ~ 360 )
int m_hue_tolerance
• Tolerance value for color (hue differential) +- ( 0 ~ 180 )
int m_min_saturation
int m_min_value
double m_min_percent
double m_max_percent
std::string color_section
Image* m_result
Methods
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
ini minIni* -
• Return : None
hsv_img Image* -
1. 2. 5. 4. Image Class#
Constructions
Data Members
int m_Width
• image width in pixels
int m_Height
• image height in pixels
int m_PixelSize
• pixel size in bytes
int m_NumberOfPixels
• number of pixels
int m_WidthStep
• size of aligned image row in bytes
int m_ImageSize
• image data size in bytes (=image->m_Height*image->m_WidthStep)
Operators
1. 2. 5. 5. FrameBuffer Class
Constructions
Data Members
Image* m_YUVFrame
• YUYV image frame buffer
Image* m_RGBFrame
• RGB image frame buffer
Image* m_HSVFrame
• HSV image frame buffer
1. 2. 5. 6. ImgProcess Class
Methods
buf FrameBuffer* -
• Return : None
buf FrameBuffer* -
• Return : None
img Image* -
• Return : None
src Image* -
• Return : None
img Image* -
• Return : None
src Image* -
• Return : None
img Image* -
• Return : None
img Image* -
• Return : None
PlatformCM730
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.
Etc class
If, necessary, you may create your own platform-dependent sources. For examaple, Network
communications class source.
1. 2. 6. 1. LinuxActionScript Class
Data Members
Methods
• Return : None
• Return : None
1. 2. 6. 2. CameraSettings Class
Constructions
CameraSettings( )
• Arguments : None
Data Members
int brightness
int contrast
int saturation
int gain
int exposure
1. 2. 6. 3. LinuxCamera Class
Data Members
FrameBuffer* fbuffer
Methods
• Arguments : None
• Return : pointer of LinuxCamera’s unique instance.
deviceIndex int -
control int -
control int -
value int -
control int -
ini minIni* -
• Return : None
ini minIni* -
• Return : None
• Return : None
• Arguments : None
• Return : Current camera settings
isAuto int -
• Return : None
void CaptureFrame( )
• Arguments : None
• Return : None
1. 2. 6. 4. LinuxCM730 Class
Constructions
Methods
• Return : None
bool OpenPort( )
• Arguments : None
• Return : On success, true is returned. On fail, false is returned.
void ClosePort( )
• Arguments : None
• Return : None
void ClearPort( )
• Arguments : None
• Return : None
void LowPriorityWait( )
• Arguments : None
• Return : None
void MidPriorityWait( )
• Arguments : None
• Return : None
void HighPriorityWait( )
• Arguments : None
• Return : None
void LowPriorityRelease( )
• Arguments : None
• Return : None
void MidPriorityRelease( )
• Arguments : None
• Return : None
void HighPriorityRelease( )
• Arguments : None
• Return : None
lenPacket int -
• Return : None
bool IsPacketTimeout( )
• Arguments : None
• Return : On timeout, true is returned. On waiting, false is returned.
double GetPacketTime( )
• Arguments : None
• Return : Calculated packet time.
• Return : None
bool IsUpdateTimeout( )
• Arguments : None
• Return
double GetUpdateTime( )
• Arguments : None
• Return
• Return : None
1. 2. 6. 5. LinuxMotionTimer Class
Methods
manager MotionManager* -
• Return : None
Miliseconds int -
• Return : None
1. 2. 6. 6. LinuxSocket Class#
Constructions
LinuxSocket( )
• Arguments : None
Data Members
Methods
bool create( )
• Arguments : None
• Return : On success, true is returned. On fail, false is returned.
• Arguments
new_socket LinuxSocket& -
s const std::string -
data void* -
length int -
s std::string& -
• Return
data void* -
length int -
• Return
b const bool -
• Return : None
returned.
1. 2. 6. 7. LinuxSocketException Class
Constructions
LinuxSocketException( std::string s )
• Arguments
s std::string -
Methods
std::string description( )
• Arguments : None
• Return
1. 2. 6. 8. LinuxServer Class#
Constructions
LinuxServer( )
• Arguments : None
s std::string -
Methods
sock LinuxServer& -
• Return : None.
length int -
length int -
• Return
Operators
1. 2. 6. 9. Streamer
• Get more informations: http://sourceforge.net/projects/mjpg-streamer/
1. 3. Linux Tutorials
The following are required libraries for tools and tutorials.
You may install the abovementioned libraries by typing the line below at the command prompt.
Build
darwin@darwin:~$ cd /darwin/Linux/project/tutorial/read_write/
darwin@darwin:/darwin/Linux/project/tutorial/read_write$ make
make -C ../../../build
...
g++ -o read_write main.o ../../../lib/darwin.a -lpthread -lrt
darwin@darwin:/darwin/Linux/project/tutorial/read_write$
Execute
/dev/ttyUSB0 requires root user priviledges. To obtain root user privileges type:
darwin@darwin:/darwin/Linux/project/tutorial/read_write$ sudo su
[sudo] password for darwin: ( input 111111 )
root@darwin:/darwin/Linux/project/tutorial/read_write# ./read_write
1. 3. 1. Read/Write
LinuxCM730 linux_cm730("/dev/ttyUSB0");
CM730 cm730(&linux_cm730);
if(cm730.Connect() == false)
{
printf("Fail to connect CM-730!\n");
return 0;
}
printf("GFB:");
if(cm730.ReadWord(CM730::P_GYRO_Y_L, &value, 0) == CM730::SUCCESS)
printf("%3d", value);
else
printf("---");
1. Read 2 bytes value(Present position) from DYNAMIXEL control table and write the
mirroring value.
1. 3. 1. 3. Result
root@darwin:/darwin/Linux/project/tutorial/read_write# ./read_write
Read/Write Tutorial for DARwIn
GFB:512 GRL:512 AFB:504 ARL:508 BTN:0 ID[1]: 394 ID[3]: 444 ID[5]: 492
Reads position values for the right arm. From values’ data the left arm mirrors the right
arm.
1. 3. 1. 4. 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.
• 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.
Camera device number generates LinuxCamera class. MinIni class reads settings values.
LinuxCamera::GetInstance()->Initialize(0);
LinuxCamera::GetInstance()->LoadINISettings(ini);
while(1)
{
LinuxCamera::GetInstance()->CaptureFrame();
streamer->send_image(LinuxCamera::GetInstance()->fbuffer->m_YUVFrame);
}
1. 3. 2. 3. 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.
1. 3. 2. 4. 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.
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.
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)
1. 3. 3. Image Processing
• ColorFinder : HSV color space filters specific colors. ColorFinder finds the center of
mass of the filtered pixels and returns the location. This process is done internally.
mjpg_streamer allows colors adjustment via web browser for ball_finder and ColorFinder.
httpd::ball_finder = finder;
From GetPosition function image color values from HSV color space Point2D returns the
value for center of mass.
pos = finder->GetPosition(LinuxCamera::GetInstance()->fbuffer->m_HSVFrame);
1. 3. 3. 3. Result
The preset allows location of center of mass for ball color.
root@darwin:/darwin/Linux/project/tutorial/color_filtering# ./color_filtering
posx: 169.000000, posy: 104.000000
1. 3. 3. 4. 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.
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 blue (new reference blue (from Color and White Balance
(default) values) Calibration)
Tolerance 15 15 15
Minimum
50 43 45
Saturation
Minimum Value 10 0 0
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).
1. 3. 4. Head Control
synchronized writing.
• Head : modules are inherited from MotionModule class. The module allows head pan
and tilt.
• LinuxMotionTimer : MotionManager calls Process() function at regular intervals.
Create DYNAMIXEL control CM730 class and Head class initializes MotionManager
class.
LinuxCM730 linux_cm730(U2D_DEV_NAME);
CM730 cm730(&linux_cm730);
if(MotionManager::GetInstance()->Initialize(&cm730) == false)
{
printf("Fail to initialize Motion Manager!\n");
return 0;
}
MotionManager class registers Head class and initializes the timer. Only the head moves
by tracking; body joints are disabled. Afterwards MotionManager is enabled.
MotionManager::GetInstance()->AddModule((MotionModule*)Head::GetInstance());
LinuxMotionTimer::Initialize(MotionManager::GetInstance());
MotionStatus::m_CurrentJoints.SetEnableBody(false);
MotionStatus::m_CurrentJoints.SetEnableHeadOnly(true);
MotionManager::GetInstance()->SetEnable(true);
Tracker
tracker.Process(LinuxCamera::GetInstance()->fbuffer->m_HSVFrame);
1. 3. 4. 3. Result
Head pan and tilt joints aim at the center of mass of the captured color. the head is
centered around the color.
1. 3. 4. 4. 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.
• 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).
1. 3. 5. Walking Control
LinuxCM730 linux_cm730(U2D_DEV_NAME);
CM730 cm730(&linux_cm730);
if(MotionManager::GetInstance()->Initialize(&cm730) == false)
{
printf("Fail to initialize Motion Manager!\n");
return 0;
}
MotionManager head tracking registers head and walking modules, then timers are
initialized.
MotionManager::GetInstance()->AddModule((MotionModule*)Head::GetInstance());
MotionManager::GetInstance()->AddModule((MotionModule*)Walking::GetInstance());
LinuxMotionTimer::Initialize(MotionManager::GetInstance());
int n = 0;
int param[JointData::NUMBER_OF_JOINTS * 5];
wDistance >>= 2;
if( wDistance < 8 )
wDistance = 8;
param[n++] = id;
param[n++] = CM730::GetLowByte(wGoalPosition);
param[n++] = CM730::GetHighByte(wGoalPosition);
param[n++] = CM730::GetLowByte(wDistance);
param[n++] = CM730::GetHighByte(wDistance);
}
cm730.SyncWrite(RX28M::P_GOAL_POSITION_L, 5, JointData::NUMBER_OF_JOINTS - 1, param);
Walking::GetInstance()->m_Joint.SetEnableHeadOnly(false);
MotionManager::GetInstance()->SetEnable(true);
tracker.Process(LinuxCamera::GetInstance()->fbuffer->m_HSVFrame);
follower.Process(tracker.ball_position);
1. 3. 5. 3. Result
Ball is tracked by head tracking, Walking towards the ball via walking module.
1. 3. 5. 4. 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.
• 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).
1. 3. 6. Action Control
• 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.
Action::GetInstance()->LoadFile(MOTION_FILE_PATH);
CM730 class creates action’s play, MotionManager initializes and registers Action class.
LinuxCM730 linux_cm730("/dev/ttyUSB0");
CM730 cm730(&linux_cm730);
if(MotionManager::GetInstance()->Initialize(&cm730) == false)
{
printf("Fail to initialize Motion Manager!\n");
return 0;
}
MotionManager::GetInstance()->AddModule((MotionModule*)Action::GetInstance());
LinuxMotionTimer::Initialize(MotionManager::GetInstance());
MotionManager::GetInstance()->SetEnable(true);
Action::GetInstance()->Start(1);
while(Action::GetInstance()->IsRunning()) usleep(8*1000);
LinuxActionScript class passes and initializes the script file, then waits for the execution
and completion from the script.
LinuxActionScript::ScriptStart("script.asc");
while(LinuxActionScript::m_is_running == 1) sleep(10);
1. 3. 6. 3. Result
Execution of the pre-scripted sequence action and mp3 playback from the script file.
1. 3. 6. 4. 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.
• Once DARWIN-OP finishes Interactive Motion Mode the tutorial ends automatically.
• DARWIN-OP’s head LED returns to green, but its body remains in standing position.
1. 3. 7. FSR
LinuxCM730 linux_cm730(U2D_DEV_NAME);
CM730 cm730(&linux_cm730);
if(MotionManager::GetInstance()->Initialize(&cm730) == false)
{
printf("Fail to initialize Motion Manager!\n");
return 0;
}
MotionManager head tracking registers head and walking modules, then timers are
initialized.
Walking::GetInstance()->LoadINISettings(ini);
MotionManager::GetInstance()->AddModule((MotionModule*)Head::GetInstance());
MotionManager::GetInstance()->AddModule((MotionModule*)Walking::GetInstance());
LinuxMotionTimer *motion_timer = new LinuxMotionTimer(MotionManager::GetInstance());
motion_timer->Start();
int n = 0;
int param[JointData::NUMBER_OF_JOINTS * 5];
int wGoalPosition, wStartPosition, wDistance;
wDistance >>= 2;
if( wDistance < 8 )
wDistance = 8;
param[n++] = id;
param[n++] = CM730::GetLowByte(wGoalPosition);
param[n++] = CM730::GetHighByte(wGoalPosition);
param[n++] = CM730::GetLowByte(wDistance);
param[n++] = CM730::GetHighByte(wDistance);
}
cm730.SyncWrite(RX28M::P_GOAL_POSITION_L, 5, JointData::NUMBER_OF_JOINTS - 1, param);
left_fsr_x = cm730.m_BulkReadData[FSR::ID_L_FSR].ReadByte(FSR::P_FSR_X);
left_fsr_y = cm730.m_BulkReadData[FSR::ID_L_FSR].ReadByte(FSR::P_FSR_Y);
printf(" LX:%3d", MAX_FSR_VALUE-left_fsr_x);
printf(" LY:%3d", MAX_FSR_VALUE-left_fsr_y);
...
right_fsr_x = cm730.m_BulkReadData[FSR::ID_R_FSR].ReadByte(FSR::P_FSR_X);
right_fsr_y = cm730.m_BulkReadData[FSR::ID_R_FSR].ReadByte(FSR::P_FSR_Y);
printf(" RX:%3d", right_fsr_x);
printf(" RY:%3d", right_fsr_y);
if(Ping(FSR::ID_L_FSR, 0) == SUCCESS)
{
m_BulkReadTxPacket[PARAMETER+3*number+1] = 10; // length
m_BulkReadTxPacket[PARAMETER+3*number+2] = FSR::ID_L_FSR; // id
m_BulkReadTxPacket[PARAMETER+3*number+3] = FSR::P_FSR1_L; // start address
number++;
}
if(Ping(FSR::ID_R_FSR, 0) == SUCCESS)
{
m_BulkReadTxPacket[PARAMETER+3*number+1] = 10; // length
m_BulkReadTxPacket[PARAMETER+3*number+2] = FSR::ID_R_FSR; // id
m_BulkReadTxPacket[PARAMETER+3*number+3] = FSR::P_FSR1_L; // start address
number++;
}
The weight from both feet shown with each feet showing its weight centered (red “+”
sign).
if(left_fsr_x != 255 && left_fsr_y != 255 && right_fsr_x != 255 && right_fsr_y != 255)
draw_target(img_send, (l_position_x+r_position_x)/2, (l_position_y+r_position_y)/2, 0, 0, 255);
streamer->send_image(img_send);
1. 3. 7. 3. Result
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.
1. 3. 7. 4. 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.
1. 4. Tools
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.
1. 4. 1. Action Editor
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.
1. 4. 1. 1. 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
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.
sit
15 DARWIN-OP on its knees 1
down
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.
• 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.
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.
• re: refreshes the screen.
• b: moves to the previous page.
• n: moves to the next page.
• page [index]: moves to the [index] page. For example typing page 5 outputs data
from page 5 on screen.
• list: outputs a list of pages.
• new: initializes current page by clearing all actuator position data.
• 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.
• w [index]: overwrites STP[index] with data from STP7 (the very first column on the
page). For example page 4 has data on 4 steps (4 columns excluding STP7). typing w
1 overwrites STP1 data with STP7 data.
before typing w 1
• i: inserts data from STP7 to STP0. Moves data from STP[x] to STP[x + 1] if any.
• i [index]: inserts data from STP7 to STP[index]. Moves data from STP[index] to
STP[index + 1] if any.
• m [index] [index2]: moves data from [index2] to [index].
• d [index]: deletes data from STP[index]. Moves data from STP[index] to STP[index -
1].
• on/off: turns on/off torque from all DYNAMIXEL’s.
• 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.
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.
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.
With the current data values from page 15 DARWIN-OP’s pose will look like this. Do
so by typing play
1. 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 DYNAMIXEL’s from the left arm.
2. release the torque on ID 2, 4, and 6 by typing off 2 4 6
1. 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).
2. Type play and you you will notice the newly updated values for ID 2, 4, and 6
1. Type save if you want this pose to be new sitting pose whenever DARWIN-OP is
kneeling (sit down).
1. 4. 2. DYNAMIXEL Monitor
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.
• exit: exits the program. After exiting the program press the “RESET” button on DArwIn-
OP.
• scan: outputs the current status of all DYNAMIXEL’s.
• 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.
• d: displays the current control table of the CM-730 and all DYNAMIXEL’s. 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 DYNAMIXEL’s. 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.
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.
4. 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.
5. To ensure all DYNAMIXEL actuators installed in DARWIN-OP are at the same resolution
please refer to the firmware installer procedure.
1. 4. 3. RoboPlus
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.
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.
1. Go to /darwin/Linux/project/roboplus
2. Type make to create an executable file if there is no executeble file
3. Once executable file is complete type ./roboplus (the head LED will change from green
to amber)
4. From your PC start RoboPlus and select RoboPlus Motion
5. On “Port” select TCP/IP and connect robot
6. Once connected you may edit motion data.
7. When finished disconnect DARWIN-OP from RoboPlus (Disconnected followed by
Waiting messages will appear at the terminal window).
8. 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
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.
1. Run Roboplus from DARWIN-OP2) After running Roboplus from DARWIN-OP run
1. Proceed with editing. For more information on RoboPlus Motion click here.
1. 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).
1. 4. 4. Walking Tuner
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.
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.
Ensure you resize the window so that information displayed on screen is not truncated.
1. 4. 4. 1. 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.
A properly resized window. notice that Y offset(mm) properly display the value of 5,
whereas Walking Mode (on/off) displays OFF.
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.
• Hip pitch offset (motor): DARWIN-OP’s pitch offset (y-coordinate) at the hip level.
Values are for DYNAMIXEL position values for ID11 and ID12.
• DSP (Double Stance Period) ratio: time ratio of both feet on ground to one foot
(either left or right) on ground.
• Turning aim on/off: DARWIN-OP aims at a point while stepping to the left or right.
• Swing right/left (mm): This is DARWIN-OP’s swing to either left or right during walk.
• Swing top/down (mm): This is DARWIN-OP’s up and down body swing during walk.
• Pelvis offset (motor): DARWIN-OP’s roll offset (x-coordinate) at the pelvis level.
Values are for DYNAMIXEL position values for ID9 and ID10.
• Arm swing gain: Arm swing gain with respect to Step forward/back. If the left left
moves forward then the right arm swings.
• Balance knee gain: Gain with respect to the gyroscope pitch.
• Balance ankle pitch gain: Gain with respect to the gyroscope pitch
• Balance hip roll gain: Gain with respect to the gyroscope roll.
• Balance ankle roll gain: Gain with respect to the gyroscope roll.
1. 4. 4. 2. 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
Tip If you cannot remember the IP address provided by DHCP then on a new terminal
window type ifconfig.
your computer.
• keep devices that adversely affect communications signal between your access
point/router and DARWIN-OP and computer (i.e. operating microwave ovens, active
bluetooth devices).
1. For this example, you need to type http://192.168.0.179:8080 on the address bar.
However, there may be times when some or all fields are empty
In any case simply double click on the empty area(s) and the initial value will
appear.
Accessing Walk Tuner from a mobile device or tablet (via wifi interface)
1. Ensure that Walk Tuner is running 2, Ensure that you know the IP address provided
by DHCP
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.
1. 4. 5. Firmware Installer
To download firmware software into the sub controller or actuator at the directory
/darwin/Linux/project/firmware_installer
1. If there is no said file then create it by typing make the compiler will automatically
generate the file.
2. Ensure that “cm730_0x12.hex” and “mx28_0x1C_4096.hex” are present.
3. 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
1. To install the firmware for the RX-28M actuators select the second option from
firmware_installer.
The installer automatically lists connected ID’s and installs the firmware of each ID
individually. Afterwards verify success.
If your firmware file is located elsewhere then you needs to specify its location by typing:
To download firmware software into the sub controller or actuator at the directory
/darwin/Linux/project/firmware_installer
1. If there is no said file then create it by typing make the compiler will automatically
generate the file.
2. Ensure that “cm730_rx28m_4096.hex” and “cm730_rx28m_1024.hex” are present.
3. 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.
The installer will assign 2 blocks of 128KB/each for firmware download. Ensure that
both blocks succeed.
1. 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 installer automatically lists connected ID’s and installs the firmware of each ID
individually. Afterwards verify success.
./firmware_installer -f YOUR_FIRMWARE.hex
If your firmware file is located elsewhere then you needs to specify its location by typing:
./firmware_installer -f /DIRECTORY/SUBDIRECTYRY/.../.../YOUR_FIRMWARE.hex.
1. 4. 6. Offset Tuner
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.
3. Run the program by typing ./offset_tuner . You will notice DARWIN-OP’s head LED
change from green to amber.
4. DARWIN-OP will stand up. Please be very cautious as DARWIN-OP can fall while
standing up.
5. Once in the program type help for information.
6. From there you may follow the options given to you.
7. To exit the program type exit .
8. 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 made changes but didn’t save them.
• GOAL: is the value set for 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 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 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.
• 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 DYNAMIXEL’s.
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.
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
Notice the arms as DARWIN-OP pursues the ball. Compare this pose with an unedited
version of the offset.
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.