Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

58
| Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.trib ICTENSW 2012 Workshop

description

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com. ICTENSW 2012 Workshop. Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com. Introduction …. Who are we: Newcastle based company established in 2004. - PowerPoint PPT Presentation

Transcript of Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Page 1: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

ICTENSW 2012 Workshop

Page 2: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 3: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 4: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 5: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 6: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 7: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 8: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 9: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Control Parameters ….

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

1. Compliance

2. PID Control

Page 10: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 11: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 12: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 13: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 14: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Intro to Robotis ProductsEducational Robotic Kits

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 15: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Examples …. OLLO Kit

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 16: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Examples …. BIOLOID Kit

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 17: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Examples …. DARwIn-OP

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 18: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Introduction to the Bioloid - Hardware

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

CM-510 Control Module

Page 19: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 20: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Introduction to the Bioloid - Hardware

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

USB2Dynamixel Converter

Page 21: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 22: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Introduction to the Bioloid - Hardware

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Remote ControlZig-110 Set

Page 23: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Introduction to the Bioloid - Hardware

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Building a Bioloid KIt

Page 24: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 25: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Introduction to the Bioloid - Software

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 26: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 27: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus - Manager

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Operational Parametersand Statuses.

All connectedDynamixels

Page 28: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 29: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus - Manager

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Operational Parametersand Statuses.

Page 30: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus - Manager

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Move dial to change Dynamixel Position

Page 31: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 32: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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 …

Page 33: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Motion

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Connect PCTo CM510

Page 34: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Motion

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

SelectPose Utility

TAB

Page 35: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 36: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Motion

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

SelectPose Robot

Push ButtonInitial Pose

Robot shouldStand

Page 37: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Motion

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Select a Motion

Then PressPLAY

Page 38: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Motion

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Download Default

Page 39: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 40: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 41: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 42: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 43: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 44: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 45: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 46: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 47: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

RoboPlus Task

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 48: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 49: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 50: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 51: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

AVR Studio

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

Page 52: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 53: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 54: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 55: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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.

Page 56: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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

Page 57: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

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 …

Page 58: Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: tribotix

Tribotix | Newcastle, Australia | P: +61 2 49578255 | F: +61 2 49578244 | W: www.tribotix.com

THE END