Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
ICTENSW 2012 Workshop
Introduction …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Who are we:
• Newcastle based company established in 2004.
• Sell Educational Robotic kits and Servo Motors to Universities, Schools and Hobbyists.
Introduction …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Who are we:
• Collaborative Research & Design projects with Universities and Industry
Hykim
• 23 DOF Robot Bear
• Designed for RoboCup SPL
What’s the Plan ?
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Today I’m going to talk about:
• Quick introduction to Robotis products for Education
• Learn to program the Bioloid with RoboPlus
• RoboPlus Manager
• RoboPlus Motion
• RoboPlus Task
• Learn to program the Bioloid in Embedded C
• AVR Studio
NB. ALL Software used today is license free
Intro to Robotis ProductsDynamixel Modules
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
- Serially controller servo motors
- Defacto Industry standard
- used be ~80% RoboCup Teams that build robots
How Servo Motors work …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
http://www.pitt.edu/~sorc/robotics/handbook/ServoControl.htmhttp://www.pyroelectro.com/tutorials/servo_motor/servomotor.html
Conventional Servo motors are used for positioning
• every 20ms you need to send a pulse to the servo motor,
• the width of this pulse then determines the position the shaft rotates to.
This has to be done for every servo motor in the system => large overhead on main mcu.
How Dynamixels work …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
http://tribotix.com/Products/Robotis/Dynamixel/DynamixelIntro.htm
Why is this an advantage …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
- Daisy-chained wiring reduces wiring in the robot/project,
- You can now exchange more data with the Dynamixel.
Settings
• Goal Position
• Moving Speed
• Voltage & Torque Limit
• Temperature Limit
• Angle Limits (min & max)
• Control Parameters
Variables
• Current Position
• Current Speed
• Current Load
• Current Voltage
• Current Temperature
Control Parameters ….
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
1. Compliance
2. PID Control
Again - why are these advantages ….
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Positioning Conventional servo involves:
• working out arc to be travelled, i.e. from Xo to Yo
• working out time you need servo to move from Xo to Yo
• calculate intermediate positions – t*(Yo – Xo)/T
•sending a pulse every 20ms with new target position
Again - why are these advantages ….
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Positioning Dynamixel involves:
• sending a command – move to Yo at speed Z
Result:
Dynamixels distribute the intelligence around your robot project.
There are other advantages …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
360o Rotating mode
Dynamixels can be used as a rotating motor at a number of speeds.
Torque OFF mode
motors shaft can be moved whilst recording shaft position …. ability to teach & repeat sequences easily.
Why are Dynamixels ideal for Robotics …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
1. Daisy-chained wiring reduces wiring in the robot project,
2. Intelligence is distributed and commands are simplified,
3. Parameters can be monitored in real time,
4. Setting can be made within Dynamixel to physically protect itself,
5. Each Dynamixel module can be tuned by either Complaince or PID Control techniques,
6. Use Torque OFF mode to ‘teach’ robot movement sequences.
Intro to Robotis ProductsEducational Robotic Kits
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Examples …. OLLO Kit
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Examples …. BIOLOID Kit
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Examples …. DARwIn-OP
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
CM-510 Control Module
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
LiPo BatteryBalanced LiPo Battery Charger
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
USB2Dynamixel Converter
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
DMS5 – 80 cm
IR1.5 – 15cm
2-axis Gyro+/- 300o/s
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Remote ControlZig-110 Set
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Building a Bioloid KIt
Introduction to the Bioloid - Hardware
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Dynamixel Centre Position
Two ways to damage Dynamixels when building Bioloids:1.Not positioning the Dynamixel centre as indicated above, and2.Putting 8mm screws in the horn when only 6mm were required
BUT, Dynamixels do have features (when programmed) to prevent damage.
Introduction to the Bioloid - Software
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Invoke WindowsDevice Manager.
(useful if you needto determine USB
COM port allocation)
Connect PCTo CM510
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Operational Parametersand Statuses.
All connectedDynamixels
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
External I/O DevicesPort 3: Gyro x-axisPort 4: Gyro y-axisPort 5: DMS
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Operational Parametersand Statuses.
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Move dial to change Dynamixel Position
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
0°(Value = 0)
300°(Value = 1023)
150°(Value = 512)
Dynamixel Position representation
10233.41
300n d d
3000.293
1024d n n
….. (1)
where:
n is the value, and d is the angle in degrees.
….. (2)
e.g. If I want to move the AX-12 to 34o what number do I send to the module?
Using equation (1):
So, if we want to move the AX-12 to 34o we need to tell it to goto 116.
1024*34 3.41*34 115.94 116
300n
Shaft Potentiometer
Microcontroller10-bit
Analog to Digital Converter (A2D)
0 – 10230 – 5V0o–300o
RoboPlus - Manager
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Turn motor Torque OFF
See Dynamixel Status changes …
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Connect PCTo CM510
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
SelectPose Utility
TAB
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
New MotionFile
RED indicatesMotions
currently in CM-510
Load Default Motion File: bio_prm_humanoidtypea_en.mtn
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
SelectPose Robot
Push ButtonInitial Pose
Robot shouldStand
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Select a Motion
Then PressPLAY
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Download Default
RoboPlus Motion
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Demo:How to create a New Motion
Things I will cover:• Use of Basic Pose Editor• User of Pose Utility
• Mirror function• Inverse Kinematics
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Types of Commands:
1. Start & End
Start, Exit, Begin & End block and comments
2. Execute
Compute, Load, Label, Jump
3. Condition
If, Else If, Else
4. Loop
Endless Loop, Conditional Loop, Foor Loop, Break and Conditional Stand/Wait
5. Function
Make Callback function, Make a function, Call a function and Return from a function
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
RoboPlus Task
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
CM-510 is based around the ATMega2561 from Atmel
Full I/O allocation at: http://support.robotis.com/en/software/embeded_c/cm510_cm700/programming/hardware_port_map.htm
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
ATMega2561
Full I/O allocation at: http://support.robotis.com/en/software/embeded_c/cm510_cm700/programming/hardware_port_map.htm
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
• Programming mcu’s directly is challenging
• Using example code I’d like to step you through the programming sequence.
• I will use a project provided by Robotis called Buttons
• It’s very simple, when a pushbutton is pressed an LED will come on
• Projects supplied by Robotis were for AVR Studio 4 – we will convert to AVR Studio v5
NB. AVR Studio 5 is first time compiler has been built into the package, making it much easier to install and work with.
Embedded C programming User Manual: http://support.robotis.com/en/software/embeded_c_main.htm
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
From the File menu:Import|AVR Studio4
Select the APS file: Button.aps
Use Default Solution Folder
Hit the Convert > button
New Solution (or project) is created.
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Open the Button.c file, this is a very simple project, only contains 1 c file.
From the Build menu select Build Solution (F7)
This will fail, it’s looking for: WinAVR-20090313
This is the OLD c compiler but is referenced in old Button project Makefile
WinAVR-20100110 was installed as part of AVR Studio v5
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
From the Tools menu select Options
In the Options window select the ToolChair
In Toolchains select Atmel AVR 8-bit
Next delete the WinAVR flavour
Then Add Flavour, call this WinAVR (same as previous) and select the directory: C:\ WinAVR-20100110\bin
Close the window via the OK button
You will now be able to Build Solution
Result is a file:Button.hex
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
• The.hex file created by AVRStudio can be found in:
…\My Documents\AVRStudio5.1\embedded+c)CM510_v1.01/example/Button\Default
• Start RoboPlus Terminal
• Hold the ‘#’ key in whilst resetting the CM-510 – this will access the bootloader
• Type in ‘L’ for load and then from the Files menu select the Transmit File option, select the file and it is transmitted
• When this is completed type in ‘G’ for Go – and the hex file is executed.
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
Need to useRoboPlus
Terminal to download Button.hexTo CM-510
AVR Studio
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
FirmwareRestoration
(is easy)
Restoring CM510 to use RoboPlus suite …
Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com
THE END