Home

Jaemi Hubo (KHR4) Users Manual

image

Contents

1. LSR state Right Shoulder RSR state Search 1 Oj Go Offset SE qu Search 1 of 0 Go Offset RE LSY Left Shoulder Yaw j LSY state RSY Right Shoulder Yaw RSY state Search of 0 Go Offset 72 Search of 0 Go IL LEB Left Elbow LEB state REB Right Elbow REB state Search 0 T Go Otfsetf Search of 0 Go Offset LWT Left Wrist p LWT state RWT Right Wrist RWT state Search 0 0 Go Offset aar qe Search of 0 Go Offset Elo Ll LHD Left Hand m LHD state RHD Right Hand RHD state Searchine searching Search Go Offset Ok FAIL Search Go Offset ea ul WST Torso WST state INKY Neck NKY state Searchin Seen 7777 Setup Encoder Show Z Pos Ref Z Ref Save STOP Auto Setup Exit Figure 18 Zero Phase ZPhase Dialog Box Left Hip Yaw LH Y Searching for home position 34 5 22 Click CAN OFF in the Main Menu Figure 16 This will shut down the CAN communication 5 23 Click Exit in the Main Menu Figure 16 This will close the program 5 24 Switch OFF the Sensor switch Figure 4 This will turn off the sensors only We need to do this to recalibrate the sensors 5 25 Lower Hubo t
2. Global ZMP 2 li Graph Start Close s 55 warning s esus WFiesT Y FndiFies2 Resuts alas off Ready AW Start oo HUBO Microsoft 58 HUBO Controller P Figure 21 FT Sensor Read dialog box 37 press F T Null the system will take the difference between the current value and zero and add that to the FT offset 5 35 Click Hide in the FT Sensor Read dialog box see Figure 21 Make sure that you click Hide and NOT Close If you click Close by accident you are required to turn turn off the 12V and Sensors and start the whole process over again from Step 5 16 5 36 Lower Hubo onto a perfectly level surface Lower Hubo on to a perfectly level service and make sure that there is is about three inches of slack in her safety cord 5 37 Click Tilt Show in the Main Menu Figure 16 After clicking Tilt Show the Tilt Read dialog box will come up Figure 22 5 38 Make sure the values are correct Make sure that the Pitch and Roll values are correct If they are not Hubo will need to be recalibrate before proceeding Proper Values e Incl Roll Between 10 and 10 e Incl Pitch Between 70 and 100 If the pitch and roll values do not fall between the above values you may NOT continue and you must lift Hubo up turn off her 12V and sensors and then recalibrate before pro
3. JO 221222082 tk EN MEME EMT e ees 11 11 11 11 11 12 12 12 12 13 13 13 14 16 16 16 16 16 17 17 17 5 Setup 21 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 8 5 9 5 10 5 11 5 12 5 13 5 14 5 15 5 16 5 17 5 18 5 19 5 20 5 21 5 22 5 23 5 24 5 25 5 26 921 5 28 5 29 5 30 5 31 5 32 Make sure all components are turned off 21 Connect Main Power 21 Install the Battery 21 dumenthe45V Snpply uos sro 84 sus ene 9 22 Lift the Hubo KHR4 22 Turn on the Body Computer 22 Log in to the Body Computer 22 Run Visus Studio G e e 4 4 eo ede eia a ka 22 Open the Program s Workspace 22 Set Active Project Configuration 25 Clean Active Project HUBO2 25 Build All HUBO2 Win32 RTSS Release 25 Set Active Project Configuration as khr3win 25 Clean Active Project khr8win 26 Bold gt Towa 123 x aa apen REO vas 26 Run the Hubo KHRA Program khr3win exe 26 Agen Sensors vu e0 sus X os tes a 26 Move Hubo KHR4 into the Home Position Manually 28 Press CAN On in the Main Menu 28 Click OK on the Motor Controller Sensor Check Screen 30 Zero Hubs KONAS Joms 43 xe kaje memes 92 5 21 1 Click ZPhase in Figure 16 oue o o eka
4. 211 uzi cow L side Step Time BC Y Amp Foot Z Amp comp Angle Step Length Side Step Length Turning Angle igen JIE FIV L comp Angle 2 7 IX WalkReady Home G0 FWD LO roll gain LO pitch gain amp tempi 76 tempi I temp 1 21 Tinkio E khr3 win exe 0 error s 55 warning s Build Debug X FrdinFlesT Find Fies2 Resuts 7 Tales Ready Start 9 HUBOZ Microsoft 5 HUBO Controller P URIS 6 13 Pm Figure 26 Kirk Walking Dialog Box 5 46 Click Walk In Place in the Kirk Walking Dialog box Figure 26 This will make Hubo walk in place This action sets many flags needed for walking and gestures It is required to walk in place before walking for the first time AND before entering into the Gestures menu The dialog box now grays out all movement boxes except for Stop while it is moving This is because you are required to stop your motion before doing another see Figure 27 5 47 Click Stop in the Kirk Walking Dialog box Fig ure 26 This will cause Hubo to stop walking in place All of the proper flags are now set and you may continue on with your demonstration This is the end of the setup phase 42 Window Help Ble Edt insert Project Buld Tools 2 2 naw a Jsls ual e meter par 11 EE E
5. Es rmm pem _ class members ex EA Workspace HUBD2 2 project s A HUBO2 A Start edit T MEUM an STRHDI Mot ionllipAngPos 1 FIN half 1 5 Lotti Tao to FIN half 1 cosi tine pestoj lost 90 a resale lo ema 1 flost 10 result1 0 amp 2 ul FTN half 1 cos 1 0f tine 300 100 0 0 FIN half l c em e 10061003020 zes 1 Float 30 zesulti 1 resuit ul elle R Ghoulder Pitch p ult 1 1 0 RVI UpperMovenent RU1 t i E FieVien LOCALJnt ng i v ngPos i In 5866 Co 52 REC COL OVA READ Figure 35 Next scroll down to the comment Start edit This is the start of the ONLY AREA THAT YOU EDIT TO MAKE A GESTURE The commented section End edit is the end of the area that you edit to make gestures ONLY EDIT BETWEEN THESE TWO COMMENTED AREAS Figure 36 We will now create a movement of the right and left arms This is the timing diagram for the movement All noted ticks are in increments of 10ms The top graph shows the desired movement of the Right Shoulder Pitch RSP and the bottom graph shows the timing diagram of the Left Shoulder Pitch LSP Note The X axis is time which is kept track of by the variable time and increases in 10ms increments every cycle The Y axis is command angle
6. Table 3 contains some of the specifications for the Hubo KHR4 Head Computer Further Specifications can be found in Appendix A 2 Table 3 Hubo HKR4 Head Computer Specifications Name PCM 3372 CPU Pentium III 1 0GHz Cache 128Kb Chip Set VIA CX700 BIOS AWARD 4Mbit Flash BIOS System Memory 1024Mb DD2533 Watchdog Timer 255 levels interval timer Expantion 104 pin PC 104 and 120 pin PCI PC 104 Plus 1 2 2 Motor Controllers The Hubo KHR4 motor controllers consists of three separate motor con trollers e Single Channel Motor Controller Driver e Dual Channel Motor Controller Driver e Five Channel Motor Controller Driver Each of the motor drivers have the same basic firmware on them and take the same basic command however the single channel controller only supports a single motor with quadrature encoder and is used only for the waste The dual channel supports two motors with quadrature encoders 2x200W and is used for all of the leg joints and some of the upper body joints The five channel supports five smaller motors each with a quadrature encoder which is used for the fingers on the right and left hands All of the motor controllers support current feedback 1 3 Software Hubo KHR4 s Body Computer and Head Computer both run full versions of Windows XP updated to Service Pack 2 WARNING Both systems must NOT be updated to Service Pack 3 for the time being due to the Wireless N drivers incompatibility with Servi
7. 6 E HUBO2 classes classes Body Inertia Sensor Incl Roll Body Roll DIGIT Incl Pitch 38 Gyro Roll Gyro Cut Ot p 12512 Hz Gyro Cut Ot y 0 528 Hz Incl Cut Off A 02512 Hz Incl Cut Of P 1572 Hz 2 Left Foot Incl Gyro Reset Stop Right Foot Incl Foot Angle Sensor Left Right mel R incl A Incl P _TBlnel P 17 Foot Acc Reset a Graph Start wre 1 8 Deg A FOZIZ Deg A 00 Deg TUE Deg P FOTE EER khr win exe 0 error s 55 varning s Build Debug X FidinFiesi FindinFies2 Resus HUBO2 Microsoft HUBO Controller Figure 23 Tilt Show dialog box Post Pressing Start Compensation Button 40 Tal Waka 6 05 PM Ele Edit View Insert Project Build Tools Window Help mu vel MAMA 1 zr 7 i CANOFF RTXOFF XczMP 22 7828 2 10467 Enc READ OL Start Eso enr EA FT SHOW Position CTRL TILT SHOW B Fz Encoder Zero ZMP Zero Set Let XO neuere eee cms Accelerometer Z Phase Roll Raw Pitch Raw Parameter Walk Exp AAs Acc Roll LPF
8. Takes a 4 KB address space 40 base address adjustable in steps from C800H up to EFOOH e Optical isolation protection of 1000 V ensures System reliability Wide IRQ selection for each port includes IRQ 3 4 5 6 7 9 10 11 12 15 LED indicates Transmit Receive status on each port Direct memory mapping enables speedy access to the CAN controllers eC library and examples included Jumper amp Switch Locations CH 1 CH 1 ex o CH 2 HEDA PCM 3680 REV A1 0 o Q o 0 9 mh rs 2 0 wh O p 5 D O 2 Q Part no 2000368000 1st Edition Printed in Taiwan May 1996 5 Card Specifications 70 The Truth About Windows Real time Architectures Peter Christensen Director of Product Management Ardence Inc Ardence Inc 1 Copyright 2005 266 2 Avenue Waltham MA 02451 1 0 Introduction Ring 0 or Ring 3 This whitepaper discusses the essential differences between the architectures and summarizes the major benefits of Ring 0 based designs In addition to discussing the obvious benefits of performance and decreased development time with a Ring 0 solution this white paper will also discuss the issues and downsides of Ring 3 memory protection According to VDC over the past four years Microsoft CE and XPe have grown to now dominate the embedded systems market in terms of dollar and unit volume OF the overal
9. Chad piat Ene IDD DIALOG TILT READ Korean n_pUnd pind IDD DIALOG UTIL Korean m Num Num IDD DIALOG WALK Korean InitBoard CENTERPOINT LEFTMIDDLE IDD DIALOG WALK EXP Korean P IDD DIALOG Z ENCODER Korean Board CBoard 8 100 06 Z PHASE Korean t IDD DIALOG ZMP ZERO Korean IDD_KHR3WIN_DIALOG Korean Alcon BEGIN_MESSAGE_MAP CBoard CStatic EZ MAP CBoard OU EIER a ia MAP END 1 iss MM M 77 CBoard message handlers void CBoard InitBoard int nMsg ASSERT n_plind m bStartGraph FALSE m niMax m nYMax 0 acnXMin m nYMin 0 n_nXGap m nYGap m nTimeGap 100 IDD DIALOG FT READ Korean o osa ml Nj DIALDG GESTURE Korean J IDD DIALOG MOTOR STATE Korean IDD DIALOG OPEN LOOP TEST Korean IDD DIALOG PARAMETER SETTING Kore IDD DIALOG POSITION CONTROL Korean IDD DIALOG PROF GRAPH Korean IDD DIALOG TILT READ Korean ID DIALOG UTIL Korean IDD DIALOG WALK Korean 100 DIALOG WALK EXP Korean IDD DIALOG 2 ENCODER Korean 100 DIALOG Z PHASE Korean IDD DIALOG ZMP ZERO Korean 100 KHR3WIN DIALOG Korean Figure 30 Double click on DD DIALOG GESTURE 54 Microsoft Visual khr3win rc IDD DIALOG GESTURE Korean 01910901 Eire edt view Insert Project Buld Layout Tools Window Help lal xj B gmO xwe nme m EE
10. MOTIONS 9 OnButtonMotion31 ON_IDC_BUT1 gt D FI OPA PE TP E I khr3win resources 0 Bitmap I Dialog IDD DIALOG ENC READ Korean 10 DIALOG FT READ Korean IDD DIALOG SETTING Korean IDD DIALOG GESTURE Korean IDD_DIALDG_KIRK2 WALKING Korean Bj ino DIALOG MOTOR STATE Korean E 100 DIALOG OPEN LOOP TEST Korean Ej ipo DIALOG PARAMETER SETTING Kore Bj ino DIALOG POSITION CONTROL Korean Upper Body Gesture Motion4 welcome motionS plaude BLANK 3 BU watch MC and iDD DIALOG PROF GRAPH Korean nodding Ej 100 DIALOG TILT READ Korean Taichi Long NG Ej 100 DIALOG UTIL Korean speech motion BLANK 4 BLA E DD DIALOG WALK Korean Bj ipo DIALOG WALK EXP Korean Bj ino DIALOG Z ENCODER Korean EE 100 DIALOG Z PHASE Korean Ej 00 0106 ZMP ZERO Korean Ej ino KHRAWIN DIALOG Korean Ga Version Taichi Short Say Hello watch spectators BLANK 5 MAN 1 A Hand Wave BLANK 6 MAN 1 C BLANK 1 BLANK 7 MAN 1 E 2R1 BLANK BLANK 8 zi Mc ClassView Resourceview E FieViem OE F En EEE Ready Hp 316 214 57491 READ SSP control ready control ready 0000 ss Figure 31 Double click on the button you want to edit In this example we will be ed
11. Yes Yes Active 10 60 PCM 3370E MOATE 256 m Yes 36bit 401002020 Option Yes Yes Yes Yes Yes Passive 0 60 C PCM 3370E JOME 256 KB Yes 36bit 41002020 option Yes Yes Ves Yes Yes Passive 0 60 C Optional Accessories RS 422 485 cable p n 1703040257 12cm USB cable p n 1703100121 26cm USB cable p n 1703100261 AD ANTECH A 3 Body Computer Specifications 65 PCM 3372 VIA Eden V4 CX700 PC 104 Plus CPU Module Inverter E s Inverter L LVDS E Power SEL LVDS I Power SEL PCI VIO Sel 00 SA1 RS 422 485 422 485 SEL RoHS fi ay Merosono EE M C FCC ego Specifications General CPU VIA Eden V4 processor for 400 600 MHz and ULV1 0 GHz VIA C7 2 0 GHz processor 2nd Cache Memory 128 KB on Processor System Chipset VIA CX700 BIOS AWARD 4 Mbit Flash BIOS System Memory Power Management SSD Watchdog Timer Expansion Interface Battery 1 0 1 0 Interface USB Audio GPIO Ethernet Chipset Speed Interface Display Chipset Memory Size Resolution 200 pin SODIMM socket supports DDR2 SDRAM to 128 256 512 1024Mb DDR2 533 400 SDRAM ACPI supported APM1 2 Supports CompactFlash Card Type 255 levels interval timer setup by software 104 pin 16 bit PC 104 module connector and 120 pin PCI PC 104 Plus module connector Lithium 3 V 196 mAH 1x EIDE 1 x RS 232 422 485 1 x RS232 1 x K B 1 x
12. menu also For leg gestures and walking 1 In the kirk walking dialogue set the step size box to whatever value the user wishes below 120 This variable controls the length of the Hubo s steps 60 is a good number if you have no preference Ensure that nothing is in the way of the Hubo that all observers have been cautioned not to touch it and that the terrain is flat select Forward Backward CW or CCW This will have the HUBO begin to walk or turn in the direction instructed Note These buttons set flags to make the Hubo begin running position calculation functions for walking These functions adjust many of the Hubo s po sition variables and also control what statements are executed in the TimerHandler function When finished select stop Note You MUST click stop before choosing a different lower body gesture The Hubo must not be moving when the new gesture is chosen Upper body gestures Walk in place and then press stop as described above This will make sure the Hubo is in the proper mode before switching to upper body gestures Select the gesture button Note This sets flags to enable the Motion Play functions and also the wrist and shoulder testing gestures At this point a new window will open This is the Gestures window 45 Gripping 1 Set the grip power box to between 1 and 5 depending on how tight a grip you want Also se
13. LPF Motor State Zmp Zero Position Setting t Riom Adjustment 1 Utility of Eq in Y Dir ACC Reset mm et EE in eal Nuling F T Forwar Backward Set Ent khr vin exe 0 error s 55 warning s Build Debug FidinFies1 Y FrdinFies2 Resuls 7 ofa oo nubo Microsoft 55 HUBO Controller Desktop Ble gdt Insert Project guld Tools Window Help sce o a b zif M HUBOZ classes khr3win classes controller Pannel F T Sensor CANOFF RTXOFF Left pere 2 9 81603 2 0 15532 x 2425 Enc READ Start E DI LEE y seus FTSHOW Position CTRL 3 paa TILTSHOW CTRLOR Mx FM 2 ERE 07227 Encoder Zero ZMP Zero Set tos Z Phase Parameter Gain Set Motor State Adjustment Utility Adj of Eq in Y Dir Save Log let Incl reset Adj of Eq in Pitch Forward Backward F T inking khr vin exe 0 error s 55 warning s FidinFiesi FindinFies2 Resuts Ready Start oo HUBO Microsoft 2 53 Controller P Woah 6 12PM Figure 25 ZMP Zero Set Dialog After Pressing Set 41 Ele Edt Insert Project Buld Tools Window Help l mug o ve lt
14. 1 RS232 The Head Computer contains two serial ports COM1 and COM2 COMI and COM2 are by default both connected to the Body Computer through internal connections 2 3 2 Wireless The Head Computer communicates with the Hubo network called HuNet via an 802 11n connection On boot and login to the user name hubo the Head Computer will automatically connect to HuNet The wireless con figuration for the Head Computer can be found in Table 9 2 3 3 Wired The Head Computer can be plugged directly in to a 10 100 network and accessed The Head Computer has a Static IP so it can be connected to via 13 Table 6 Body Computer Wireless Configuration SSID HuNet Frequency 2 4Ghz Standard 802 11n WPA2 Passkey dasl1234 IP 192 168 0 102 Mask 255 255 255 0 Gateway 192 168 0 1 Domain Hunet Table 7 Body Computer Wired Configuration Network HuNet Standard 10 100 IP Static 192 168 0 112 Mask 255 255 255 0 Gateway 192 168 0 1 Domain Hunet a network hub or directly via a crossover cable The connection information can be found in Table 10 2 3 4 Digital I O The Head Computer contains 8x GPIO pins 4x input and 4x output Each of these pins are 5V TTL 14 Table 8 Hubo KHR4 Body Computer On Board Communication Number of Ports Port Type 6x USB2 0 1x EIDE 2x SATA 1 RS 232 422 485 COMI 1 85232 1x K B 1x Mouse 8x GPIO 4 input 4 output Ix 10 100 E
15. 32 5 21 2 Click Search under LHY 32 5 21 3 Repeat Step 5 21 1 for each of the joints 32 5 21 4 Click Exit in the ZPhase dialog box Figure 17 32 Click CAN OFF in the Main Menu Figure 16 35 Click Exit in the Main Menu Figure 16 35 Switch OFF the Sensor switch Figure 4 35 Lower Hubo to the ground 35 DI seconda s etss E a a a oi OS dk koki SE BS 35 Switch ON the Sensor switch Figure4 35 Lift Hubo by repeating Step 5 35 Start khr3win exe by repeating Step 5 16 35 Turn the CAN on by repeating Step 510 35 Click ZMP Zero Set in the Main Menu Figure 16 35 Click FT Null in the ZMP Zero Set Dialog Figure 19 36 5 33 Do NOT Close ZMP Zero Set Dialog and click FT Show in the Main Menu Figure 16 36 5 34 Click F T Null in the FT Sensor Read dialog box see Figure 21 36 5 35 Click Hide in the FT Sensor Read dialog box see Figure 21 38 5 86 Lower Hubo onto a perfectly level surface 38 5 37 Click Tilt Show in the Main Menu Figure 16 38 5 38 Make sure the values are 38 5 39 Click Start Compensation in the Tilt Read dialog box Figure 22 38 5 40 Click Hide in the Tilt Read dialog box Figure 23 39 5 41 Click Start in the ZMP Zero Set Dialog Figure 20 39 5 42 Click Set in the ZMP Zero
16. This picture will be used when describing each part in this section 4 2 Motor Controller Locations The motor controllers are located all over the KHR4 s body Please see Figure 3 for the locations of the motor controllers drivers 18 Figure 3 Hubo KHR4 Motor Controller Driver Locations 4 3 Switches The Hubo KHR4 s primary power switches and DC power input are located on her back Please see Figure 4 for the locations Please note that this is located on the back of the KHR4 torso Table 11 KHR4 Switch Definitions Down Off Up On Number Name Function 1 Audio Turns off and on the Audio 2 Sensor Switch Turns off and on the sensors IMU and FT sensors 12 Volt Turns off and on the 12V to the motor drivers 4 Head Turns off and on the head computer 5 Body Turns off and on the body computer 6 Power Cable Keyed 48V DC power cable 19 _ 55 3 VA 4 Se Figure 4 Hubo KHR4 power switches and DC power input locations 20 5 Setup This section explains how to setup and run the main program for Jaemi Hubo KHRA using the HUBO2 R1 5 software version When setting up the KHRA please DO NOT skip a step or press a wrong button If you press an incorrect button or accidentally skip a step please do the following 1 Lift the KHR4 off the ground using th
17. UpperMotionRecovertine pSharedMemory gt MotionFlag MotionNo FALSE PSharedlemory MotionFlagALL 0 MotionHip ngPos 0 0 MotionHip ngPos 1 0 tine 0 void _ 1 char MotionStop t static int time 0 static int timel static float ftime 0 unsigned int i unsigned int MotionNo float Adjust NumOfMotionJoint float res NumOfMotionJoint float result NusOf otionJoint 1 float result2 NumOfMotionJoint float IOCALresultMTRAng TOTAL MTR NUN static float LOCALoldJnt ng TOTAL MTR NUM ASMTRONONJ unsigned char Local TaData 8 user should change 0 if MotionStop if time gt T MotionHip ngPos 0 0 MotionHipAngPos 1 0 pSharediencry Hot ionF lag ot ionNo FALSE PSharedlemory MotionFlagALL 0 time 0 a xii else if tine 0 amp timec T En 5891 Cel26 REC COL OVA PERO Figure 34 When in HUBO2 files Source Files PROFILE cpp find the PROF MotionPlay29 section The ending is 29 because in the previous section our MotionNo was 29 The ending number is what ever the MotionNo is equal to Make sure that in this section that MotionNo is equal to the same value as it is in the previous section In this case MotionNo 29 56 HUBO2 Microsol HUBO HUBOZ PROFILE cpp Edt view Insert Project Buld Tools Window Help lelxi
18. the FTN half 1 cos function which is used to get to that angle e Please see the list of steps below to come up with the desired trajectory for the RSP and LSP Follow these steps to make the desired trajectory 51 10 At time 100 to time 200 RSP moves from 0 deg to 90 deg Code FTN half 1 1 0f time 100 100 0 0 amp resulti 0 At time 300 to time 400 LSP moves from 0 deg to 90 deg Code FTN half 1 cos 1 0f time 300 100 0 0 amp resulti 1 At time 500 to time 600 RSP moves from 90 deg to 0 deg Code FTN half 1 cos 1 0f time 500 100 0 0 amp result2 0 At time 700 to time 800 LSP moves from 90 deg to 0 deg Code FTN half 1 cos 1 0 time 700 100 0 0 amp result2 1 At this point all trajectories are in percentage of the desired angle Because the desired final angle for each the LSP and RSP is 90 deg the function will be multiplied by the value 90 deg For the RSP the full movement is made by adding result1 0 and re sult2 0 together Code res 0 float 90 resulti 0 result2 0 For the RSP the full movement is made by adding 1 and re sult2 1 together Code res 1 float 90 x resulti 1 result2 1 Now the trajectory data is stored in res as res 0 for the RSP and res 1 for the LSP Next the trajectories need to be applied to the trajectories in res to the proper joints For the Right Shoulder Pi
19. 1 5 0 Comparing Windows Real time Architectures Beyond the application performance and memory protection considerations presented above several other factors must be given careful consideration We will define each characteristic and then provide some specific examples of Ring 3 versus Ring 0 architectures and how each affects the developer and real time application The table below highlights the primary differences between the two architectural models Ring 3 Architecture Ring 0 Architecture Comments Kernel API Architecture Started as a stand alone 386 based real time operating system and ported to Windows for real time using non standard APIs Designed from the ground up as a high performance extension to Windows with Windows compliant APIs Ring 3 architecture uses a non standard API set By utilizing a non std APIs developers must either wrap or map API functionality between Win32 and non standard APIs Kernel Location To access hardware and memory directly the kernel runs in Ring 0 The kernel is designed to run in Ring 0 to directly access hardware and memory In a Ring 3 architecture if there is a bug in the kernel then it will cause a protection fault While this is the same as a Ring 0 architecture there is no advantage IPC Mechanisms between application and kernel and application and Windows IPC mechanism is mailbox based limited to 128 byte messages
20. 32 RTSS Release Build the HUBO2 Win32 RTSS Release by going to Build Build All 5 13 Set Active Project Configuration as khr3win Go to Build Set Active Configuration and choose khr3win Win32 Release see Figure 10 25 Microsoft Visual C File Edit View Insert Project Build Tools Window Help o o 2 m S GR parameter l al SHAPED DATA Al close members y C Member Function HARED DAT wlli FE Workspace HUBO2 2 project B HUBO files I Source Files a Header Files ce Files Project HUBO2 Win32 RTSS Release HUBO2 Win32 RTSS Deb x 5 4 uM FindinFiles1 Y FindinFies 2 Results 7 Tell sim 4 Ready A Figure 10 Visual Studio 6 Set Active Project Configuration as khr3win Win32 Release 5 14 Clean Active Project khr3win Clean the active project khr3win Win32 Release by going to Build Clean 5 15 Build All khr3win Build the khr3win Win32 Release by going to Build Build All At this point your screen should look like Figure 5 16 Run the Hubo KHR4 Program khr3win exe To run the Hubo KHR4 program knr3win exe click on the on the top right hand corner of the VS6 screen as denoted in Figure 12 At this point the main window of the khr3win exe program will come up on the screen see Figure 13 5 17 Turn on Sensors and 12V Switch the Sensors and 12V switches to the on positio
21. IPC mechanism is memory based large amounts information can be shared very fast To ensure application isolation for memory protection the Ring 3 architecture must use this mechanism resulting in decreased system performance Application Location Applications reside in Ring 3 Applications reside in Ring 0 In a Ring 3 architecture the application is subject to a performance penalty because it must deal with the overhead associated with memory protection In addition for kernel application kernel communication use the mailbox IPC mechanism to exchange information with the kernel in Ring 0 Ardence Inc 266 274 Avenue Waltham MA 02451 Copyright 2005 Ring 3 Architecture Ring 0 Architecture Comments Application Application runs in Application will In the Ring 3 Performance Ring 3 with lowest automatically run at architecture all system possible performance highest possible calls are high level to performance ensure memory protection To gain performance low level calls can be substituted for high level calls This requires significant tuning on the part of the developer to find optimal performance Memory Protection Yes as long as high level calls are used No but application can be coded and tested in Ring 3 and then moved to Ring 0 for optimal performance with out any tuning requirements In a Ring 3 architecture as soon as low lev
22. Jaemi Hubo KHR4 Users Manual Daniel M Lofaro DML46Gdrexel edu December 22 2009 Thanks to Dr Paul Oh Dr JunHo Oh Mr David Grunberg Contents 1 Overview 11 Mechanical ka es ote n Mam Computers ce sek ka d 1 2 2 Motor Controllers loj SONAE suo con eR ee does De 1 31 Body Cpe oes xe dO EE Eq 1 3 2 Head Computer s ues dus 8 4334 hace ada 2 Communication 21 Base Station Comput r 229 oo RR RR 2 2 Body Computer gt sea s mia ee Pe ko p 221 AN IUS uw boua bebe aus EGER ee X 220 HELM 245 Gore oe AAJ eee Ee 2 2 3 Wireless 294A Wied LL pra l AN 220 JOHN DOE es ek rer haine 230 Head Comp t r ss us se sia eyr rde ba ula pito la ka BEN a e ala koko ACER Rao pa ac a iip is 2 3 2 Wireless kag os o Ros 233 Wed 2252 ko 234A Dewal VO accede waive XE GRE 4x4 3 Timing GP BEA 2212399 monu D iu 32 Body Comput s lace du xe xk Made nada OR qna A uz rom adok kuku 62854 42 ao Head Computef e e sc os o koni ka s ar a a e ar kk bk mom a 331 sn de ep aaa i x EAE 3832 Hardware 4 Parts 41 Overview es 42 Motor Controller Locations
23. LVDS 10 100 USB2 0 85 232 pd sata cF Audio 104 Thermal PCM 3372F JOAIE Win EU V4 128KB ves 48 bit 1 6 1 1 Yes 2 Yes Passive 0 60 optional PCM 3372F MOA1E MU paan V4 128KB Yes 48 bit 1 6 1 1 Yes 2 Yes Ves Yes Passive 0 60 C optional PCM 3372F Soate lcxoD t28KB ves 48 bit 1 6 1 1 Yes 2 Yes Ves Yes Passive 0 60 optional PCM 3372F UOATE VA 128KB Yes 48 bit 1 6 1 1 Yes 2 ves Yes Passive 0 60 C optional AD ANTECH A 4 CAN Card Specifications 68 PCM 3680 PC 104 Dual Port CAN Interface Module Jumper Setting The PCM 3680 is a special purpose communication card that brings the Control Area Network to your PC With the built in CAN controller the PCM 3680 provides bus arbitration and error detection with automatic transmission repeat function This drastically avoids data loss and ensures system reliability The on board CAN controllers are located at different positions in the memory You can run both CAN controllers at the same time independently The PCM 3680 operates at baud rates up to 1 Mbps and can be installed directly into the expansion slot of your PC Control Area Network The CAN Control Area Network is a serial bus system especially suited for networking intelligent d
24. Mouse 2 x SATA 6 x USB 2 0 Supports HD Audio stereo sound 8 bit general purpose 4 Input 4 Output Intel 82551ER 10 100Base T 1 x internal box header VIA CX700 Optimized Shared Memory Architecture supports 64 MB frame buffer using system memory CRT display Mode pixel resolution up to 1920 x 1440 x 32 bpp at 85 Hz 1600 x 1200 x 16 bpp at 100 Hz and up to 1024 x 768 x 32 bpp at 60 Hz for TFT LCD LCD Interface 24 48 bit LVDS interface Dual Independent Display CRT LVDS LVDS LVDS optional Features VIA Eden V4 400 600 MHz and ULV1 0 GHz processor VIA C7 2 0 GHz processor upports DDR2 memory upports 10 100 Base T Ethernet 48 bit TFT LCD LVDS interface upports one RS 232 one RS 232 422 485 and six USB 2 0 ports C 104 and PC 104 Plus expansion connector S S S P Support audio function compliant with HD Support for CompactFlash card type Mechanical and Environmental Dimension L x W 96 mm x 115 mm Weight 0 162 kg with heat sink Operating Temperature 0 60 C 32 140 F Operating Humidity 0 90 relative humidity non condensing Power Power Supply Voltage AT ATX 5 5 12 V 5 Optional 5 V only 12 V optional for PC104 add on card and LCD inverter Typical 5 1 45 12 0 02A 5 263A 12 0 03 A Eden ULV1 0GHz with 512M RAM Power Consumption MAX Packing List 1 x PCM 3372 SBC 1 x Wire AT Power cable 1 x Au
25. OK button current screen see Figure 15 Click CAN Off on the Main Menu Figure 13 Close the Main Menu by clicking the x in the top left Figure 13 Start the program again by pressing the as seen in Figure 12 Repeat starting from Step 5 19 5 20 Click OK on the Motor Controller Sensor Check Screen On the motor controller sensor check screen Figure 13 click the OK button on the bottom You will now see the main menu again however this time the button that said CAN On now says CAN Off and RT X OFF see Figure 16 This means that both the CAN and the RTX systems are now activated 30 Oth JMC Board is ready for 10 msec Int time 1th JMC Board is ready For 10 msec Int time 2 th JMC Board is ready for 10 msec Int time 3th JMC Board is ready for 10 msec Int time 4 th JMC Board is ready for 10 msec Int time 5th JMC Board is ready For 10 msec Int time 6 th JMC Board is ready for 10 msec Int time 7 th IMC Board is ready For 10 msec Int time 8 th JMC Board is ready for 10 msec Int time 9 th IMC Board is ready for 10 msec Int time 10 th JMC Board is ready for 10 msec Int time 11 th JMC Board is ready 10 msec Int time D th EJMC Board is ready For 10 msec Int time 1th EJMC Board is ready For 10 msec Int time 2 th EJMC Board is ready for 10 msec Int time 3th EJMC Board is ready for 10 msec Int time 4th EJMC Board is ready for 10 msec Int time 5 th Board is ready for 10 msec Int time Oth
26. Page 62 e 6 DOF Per Leg e 41 DOF Total e Aluminum Frame e High Gear Ratio Harmonic Drive Gear Boxes e Maxon Brushless DC Motors The gear ratios for the harmonic drive gear boxes can be found in Table 1 Table 1 Harmonic Drive Gear Ratios Joint Harmonic Drive No Hip Yaw SHD 17 100 1 Hip Roll SHD 20 160 1 Hip Pitch SHD 20 160 1 Knee SHD 20 160 1 Ankle Pitch SHD 17 100 1 Ankle Roll SHD 17 100 1 Trunk Yaw SHD 14 100 1 Please refer to Appendix A 1 for the dimensions of the Hubo HKRA 1 2 Electrical Hubo KHR4 contains two primary x86 based computers denoted as the Head Computer and the Body Computer and multiple smart motor con trollers The Body Computer tells all of the motor controllers where to move Figure 1 Hubo KHR4 Joint Direction via communication over two IMB s CAN Buses gathers sensor data from the Inertial Measurement Unit IMU and Force Torque FT sensors The Body Computer will then do all of the calculations to keep the Hubo KHR4 balanced properly 1 2 1 Main Computers Table 2 contains some of the specifications for the Hubo KHR4 Body Com puter Further Specifications can be found in Appendix A 3 Table 2 Hubo HKR4 Body Computer Specifications Name PCM 3370 CPU Pentium III 933MHz Cache 512Kb Chip Set Twister T VT82C686B BIOS AWARD 256kb Flash BIOS System Memory 512MB SDRAM Watchdog Timer 1 6sec Expantion 104 pin PC 104 and 120 pin PCI PC 104 Plus
27. Phase ZPhase Dialog Box Allows user to zero and activate each of Hubo s joints 33 Z Phase Set LHY Left Hip Yaw Right Hip Yaw state Of 0 Go Offset PESE Search 9 Go Offset Lu LHR Left Hip Roll 2 e RHR Right Hip Roll state Search e Go Offset AE jn Search T Offset 2221 ul LHP Left Hip Pitch m LHP state RHP Right Hip Pitch RHP state Search Of 0 Go Offset OK EA T Search 0 Go Ofset 5 po m LKP Left Knee Pitch state Right Knee Pitch RKP state Search Of 0 Go Offset roa Que 1 Search 0 0 Go Offset vds T LAP Left Ankle Pitch m LAP state RAP Right Ankle Pitch RAP state Search 8 0 Go Offset D Search 0 0 Go Offset xus qu LAR Left Ankle Roll LAR state RAR Right Ankle Roll state Search 1 8 0 Go Offset De Search 0 0 Offset 26 nuy LI Left Shoulder Pitch LSP state RSP Right Shoulder Pitch ASP state Search 0 T Go 8700009 Search 0 T GoOfse 2777 LSA Left Shoulder Roll
28. RAP state Search Of Go Offset on qui Search 0 8 Go Offset E iud T LAR Left Ankle Roll LAR state RAR Right Ankle Roll RAR state Search Of Go Offset E que Search 0 0 Go Offset A Left Shoulder Pitch LSP state Right Shoulder RSP state Search Go Offset a Search 07 Go Ofiset a DER ii m LSA Left Shoulder fol 158 state RSA Right Shoulder Roll RSR state Search Go Offset E n Search e Go Ofiset nd Hd in LSY Left Shoulder Yaw LSY state RSY Right Shoulder Yaw RSY state Search 0 0 Go Offset E FALI Search Of T Go Offset aut Ls LEB Left Elbow LEB state REB Right Elbow REB state Search Of 2 Go Offset Search Of Go Offset 2 E T p LWT Left Wrist m LWT state RWT Right Wrist RWT state Search e 9 Go Offset CAR Search I 67 T Go Offset Lu LHD Left Hand gt LHD state Right Hand RHD state Search 1 Go Offset 1 Go Offset C m WST Torso WST state NKY Neck NKY state c Offset Searing mi Search of 0 Go Offset Fac Auto Setup Encoder Show Iv Z Pos Ref 2 Ref Save STOP Auto Setup Exit Figure 17 Zero
29. Sensor Board is ready 1 th Sensor Board is ready 2 th Sensor 3th Sensor 4th Sensor Board is ready 5 th Sensor Board is ready 6 th Sensor Figure 15 Hubo Control Motor Controller and Sensors responding to acti vation command after CAN On is pressed in the main menu HUBO Controller Pannel xi CAN OFF RTX OFF Enc READ OL Start FT SHOW Position CTRL TILT SHOW CTRL Off Encoder Zero t Z Phase 01 Parameter Walk Exp Gain Set Kirk Walking Motor State Utility Save Log Exit Figure 16 Hubo Control Main Menu with CAN and RTX activated 3l 5 21 Zero Hubo KHR4 s Joints 5 21 1 Click ZPhase in Figure 16 This will open up the Zero Phase dialog box see Figure which will allow the user to zero and activate each of Hubo s joints 5 21 2 Click Search under LHY This will make Hubo s Left Hip Yaw Highlight the word Searching as seen in Figure 18 Move until it hits the limit switch Then move back until it hits it s first index point on it s encoder e Now the motor controller knows exactly where it is and now moves to the pre defined offset values This position is it s home zero position If the home position was successfully found then the OK icon will be highlighted If it did NOT succeed in finding it s home position then the FAIL icon will be highlighted If the system did NOT succeed in finding it s home position e Check to make sure the joint is
30. Set Dialog Figure 24 39 5 43 Click OK in the pop up box with the text Posture initialization is done FES 25 a saoo deka RR 39 o 4 39 5 44 Click Exit in the ZMP Zero Set Dialog Figure25 39 5 45 Click Kirk Walking in the Main Menu Figure 16 99 5 46 Click Walk In Place in the Kirk Walking Dialog box Figure 26 42 5 47 Click Stop in the Kirk Walking Dialog box Figure 26 42 Tutorials 44 Dl Upper PON E ke KZ kete ko 44 611 Overview 44 6 1 2 Requirements to make a gesture 44 6 1 3 Using existing gestures 44 6 1 4 Creating a Gesture 47 6 1 5 Using the interpolation function 48 6 1 6 Adding a gesture to Hubo code 49 6 1 7 Performing gestures 49 6 1 8 Example Rise and Lower Arm Step By Step 50 Appendix 59 Hubo Dimensions o 4 sa ku sda eda 60 2 Head Computer Specifications 62 AS Body Computer Specifications s o sa a dud a a he 65 AA CAN Card Specifications 68 AS CAN Card Specifications e ux Y x XE 70 1 Overview Welcome to the Hubo KHRA reference manual Through out this manual you will find information regarding the mechanical electrical and software operation of the Hubo KHR4 system 1 1 Mechanical Hubo KHR4 has the following mechanical specifications
31. U Walk Ready Home ss GO FWD cew eow B f Walk test mode sue F am monon L_side R side _side CE side COMI open Step Time 80 COMI close BC Y Amp 76 Foot 2 ds 35 LO roll ga fi comp Angle 2 2 LO pitch gain 2 Gestu re L comp Angle 22 amp tempi 78 Step Length 150 Counter Reset Side Step Length 60 eu JU 15 Turning Angle g CLOSE il inking khr3vin exe 0 error s 55 warning s Build Debug X Frain Fiesi Y FidinFies2 Y Resus 7 KI i Ready EE m AE Start 9 HUBOZ Microsoft TRPA 6 13PM Figure 27 Kirk Walking Dialog Box While Moving 43 6 Tutorials 6 1 Upper Body 6 1 1 Overview The movements of Hubo khr4 are called gestures Gestures are position information for one or more joints that tell the Hubo where to position those joints at which times Gestures can be as simple as a single joint movement or as complicated as a full dance routine and several of both kinds are already present in the Hubo code Gestures must be programmed before the robot is run they can not be modified on the fly 6 1 2 Requirements to make a gesture In order to produce a for the Hubo khr4 three processes must be completed 1 The gesture must be generated This requires the user to visualize where they want the robot to move and then use the Hubo s syntax to make a command that will achieve the des
32. ariable Now examine the Profile cpp file in the Hubo code This file contains most of the gestures that the Hubo uses When flags are set such as when buttons are pushed on the GUI TimerHandler calls functions in this file to run and update the Hubo s motors The motors then move to new position as the gestures require Identify the PROF_MotionPlay x function where x is the MotionNo from the button function Scroll until you see a line marked start edits Change the FTN half 1 cos the summing and the UpperMovement lines to match the gesture that you want to implement This implements the gesture on Hubo 6 1 7 Performing gestures New gestures are implemented in the same way as the preset gestures The same commands are used to set up the Hubo and then similar buttons are pushed 49 The main difference between new gestures and preset gestures is that by default no boxes exist to scale the Hubo s gestures As a result all of the gestures must be preset in their entirety before the Hubo is run It may behoove the operator to make several similar gestures with different magnitudes or slight variations to show off the Hubo s control and versatility but one gesture cannot be adjusted in real time for this purpose To work around this the user may find it desirable to add some scaling boxes These boxes must be added to the GUI and then set up in the khr4 code to be checked every time the OnTimer function runs The val
33. ce Pack 3 1 3 1 Body Computer The Body Computer s main operating system is Windows XP SP2 and the control is compiled using Visual Studios 6 VS6 and Real Time Extensions 6 5 RTX 6 5 by Ardence The RTX system will be explained in greater detail in Section 3 1 The purpose of the Body Computer is to give Hubo KHR4 a dedicated environment for its balancing controller The Body Computer does not have any NET framework installed 1 3 2 Head Computer The Head Computer s main operating system is Windows XP SP2 The NET framework 3 5 is currently installed The purpose of this is so users 9 programing with Microsoft s Visual Studio 2008 can easily upload custom software The purpose of the Head Computer is to allow users to add human in teraction without risking damaging the stability controller ie the Body Computer 10 2 Communication The Hubo KHR4 has multiple communication methods In short the Body Computer communicates with the motor drivers via two 1Mbps CAN Bus networks The Body Computer can talk to the Head Computer via a serial RS232 level signal Both of the Body and Head Computers talk to the Base Station Computer via a wireless 802 11n network connection 2 1 Base Station Computer The Base Station Computer connects to the Body and Head Computers via a Wireless 802 11n connection where the Base Station Computer is connected to the wireless router via a CAT 5e cable the Body and Head Computers are connect
34. ceeding 5 39 Click Start Compensation in the Tilt Read dialog box Figure 22 This will help the system compensate for a slight roll and pitch errors After pressing Start Compensation the Angle Pitch and Angle Roll will start to change value see Figure 23 Let this run for about 20 seconds 38 5 40 Click Hide in the Tilt Read dialog box Figure 23 Make sure that you click Hide and NOT Close If you click Close by accident you are required to turn turn off the 12V and Sensors and start the whole process over again from Step 5 16 5 41 Click Start in the ZMP Zero Set Dialog Fig ure 20 When Start is pressed Hubo starts to move her waist around slightly looking for a specific position The values for X ZMP and Y ZMP will be constantly changing see Figure 24 Wait until X ZMP and Y ZMP are within 0 3 of their respective targets this normally takes from 3 to 5 minutes Target Values e X ZMP 10 000 e Y ZMP 0 000 Note Make sure that X ZMP and Y ZMP are within their 0 3 margin of error before you continue 5 42 Click Set in the ZMP Zero Set Dialog Figure 24 By pressing Set you are saving the current ZMP values A notification box will now pop up stating that your Posture initialization is done sce Figure 25 5 43 Click OK in the pop up box with the text Posture initialization 13 done Figure 25 5 44 Click Exit in the ZMP Zero Set Dialog Figure 25 5 45 Click Kirk Walking in the Main Menu Figure 16 The Kirk Walki
35. close to it s home position if it is not change it s position by hand e Click Search again 5 21 3 Repeat Step 5 21 1 for each of the joints Please note that you can only do ONE joint at a time Make sure to wait until the previous joint has OK highlighted BEFORE moving on to the next joint 5 21 4 Click Exit in the ZPhase dialog box Figure 17 The only joints that will be activated will be the joints that you successfully found a home position for when you exit the program We need to exit the program to reset the encoder values 32 2 Phase Set xi ELHY Left Hip Yaw LHY state Right Hip Yaw state Search 9 0 Go Offset Search 0 0 Go Offset un Lua T LHA Left Hip Roll gt LHR state RHA Right Hip Roll RHR state Search 58 Go Offset Bos T Search 0 T Offset Lij T LHP Left Hip Pitch m LHF state RHP Right Hip Pitch state Search Offset ae ee i Search 0 TT Offset DE po T m Left Knee Pitch state IRKP Right Knee Pitch state Search 9 Go Otiset dE Search _ Ta Offset eil LAP Left Ankle Pitch LAP state RAP Right Ankle Pitch
36. d software interrupts Ring 0 architectures dovetail elegantly to this model as the application has direct access to hardware and can map directly interface to memory mapped I O Ring 3 architectures on the other hand must keep the application isolated due to memory protection constraints imposed and must implement a mailbox IPC mechanism to maintain application isolation This results in significant overhead servicing both hardware and software interrupts If the application is data acquisition or a robotics application with a high frequency of interrupts then the system performance will suffer above a threshold of 10KHz Of course this could be compensated for by buffering the incoming data but this would not provide deterministic performance By virtue of this limitation the Ring 3 architecture is not scalable to any extent Any additional cards added to the system now bringing the interrupt frequency to 2 or greater will result in further performance degradation If the Ring 3 architecture implements a shared memory IPC model as an alternative to a mailbox based IPC mechanism all memory protection will be lost while the application continues to run in Ring 3 Although there may be some performance gain it does not extend to the 30KHz range or greater A ring 0 architecture is high performance right out of the box No performance tuning and recompiling is required Ardence Inc 4 Copyright 2005 266 27 Avenue Waltham MA 0245
37. dio cable 1 x Wire ATX power 1x Two COM cable p n 1701200180 1 x RS 422 485 COM cable p n 1703040157 p n 1703080104 1 x Keyboard Mouse cable p n 1703060053 p n 1703100152 p n 1703200380 1 x Y cable for KB MS extention p n 1700060202 1 x Ethernet RJ 45 Conn conversion cable p n 1701100202 1x IDE cable p n 1701440350 1 x VGA cable p n 1700000898 1 x USB cable bracket type with two USB ports p n 17000000897 1 x SATA cable p n 1700071000 1 x Startup manual 1 x CD ROM Manual Driver Utility www advantech com products AD ANTECH All product specifications are subject to change without notice Last updated 7 Feb 2007 PCM 3372 Board Diagram IMVP4 0 pees dock Gen EDEN V4 Strapping SW LVDS Channel m res 18 poo oos DORA MM XI 10 100 1000 LAN LVDS Transmitter DVO DVP1 261112 Intel 82551 Connector jg V VT1636 Ke PG21 Frequency Analog CRT PCIBUS SMBus PCI to ISA Bridge PC104 GPIO Ki PCA9554 gt IT888G Connector pe1920 I 1 EIDE Channel d on board Fish SMSC3114 On board Flash PG13 COM1 2 m gt 2 SATA Port LPT PG25 PS 2 KB MS PG23 HW Monitoring Ordering Information Part No CPU Chipset L CRT TTL
38. e func tion seen in Program 1 to form each segment of the gesture for each joint Then combine them to form a full gesture A detailed description of how to use this function follows Program 1 Half Cos Function FTN half 1 cos magnitude time start time duration 0 0 amp result 47 6 1 5 Using the interpolation function The function s parameters for the half cos function found in Program 1 are defined in Table 13 Table 13 Half Cos function Parameter Definitions Parameter Definition magnitude Indicates direction of gesture 1 or 1 time Indicates what variable is used to mark time Default is time start_time Indicates time that gesture begins duration Indicates length of gesture in ms amp result Pointer to where the answer is stored So to move a joint in the positive direction for 0 2 seconds after a 0 1 second rest the example command can be found in Program 2 Program 2 Half Cos Function Start Time 0 1sec Rise Time 0 2sec FTN half 1 cos 1 0 time 100 200 0 0 amp result 1 To set the magnitude of the movement in degrees multiply the result variable by the desired number of degrees To move the joint in the same way as in Program 2 but for 30 degrees the example command can be found in Program 3 Program 3 Half Cos Function Program 2 set to move 30deg FTN half 1 cos 1 0 time 100 200 0 0 amp result 1 0 fl1oat 30 result 1 To assign this motion t
39. e hoist 2 Turn off the 12V and Sensors via the switches denoted in ADD SWITCH SECTION HERE dan 3e org 3 Shut the program down 4 Start setting the KHR4 up from the beginning In order to successfully setup and run the Jaemi Hubo KHR4 the following needs to be done in their given order to ensure optimal functionality 5 1 Make sure all components are turned off Go to the back panel of the Hubo KHR4 see Figure 4 and make sure all of the switches are down 5 2 Connect Main Power Plug in the keyed 48V DC power connector located on the KHR4 s back Figure 4 Note MAKE SURE THE 48V IS POWERED OFF BEFORE YOU PLUG IT IN 5 3 Install the Battery Insert one of the KHR4 s 48V batteries optional Please Note 1 If no battery the DC supply must always be turned on and connected during operation 2 After calibration starts you CAN NOT install the battery 21 5 4 Turn on the 48V Supply Turn on the power to the 48V DC power supply hooked up the the Hubo KHRA 5 5 Lift the Hubo KHRA Lift the KHR4 by the hooks on her shoulders until she is 3 or more off the ground 5 6 Turn on the Body Computer To turn on the head computer flip body computer switch switch 5 in Figure 4 to the ON position At this point the KHR4 is booting up the body computer On boot the body computer will automatically connect to wireless network HuNet as described in Section 2 2 3 5 7 Log in to the Body Computer Log in to the body comp
40. ed to the network via the 802 11n connection The Base Station Computer also acts as the network storage device for both the Body and Head Computers The Shared Documents folder on the Base Station Computer is setup as the Z _ drive on both the Body and Head Computers 2 2 Body Computer The Body Computer is the main computer for the Hubo KHR4 This com puter communicates with all of the motor drivers via two 1Mbps CAN Buses All of the lower body joints are located on one CAN Bus and all of the upper body joints are located on the other CAN Bus The Body Computer is a PCM 3370 PC 104 computer More information on the PCM 3370 can be found in Appendix A 3 All of the communication methods available on the Body Computer can be found in Table 4 2 2 1 CAN Bus The CAN Bus is a PCM 3680 Rev A 1 PC 104 Dual Port CAN Interface Module Information regarding the PCM 3780 Rev 1 CAN card can be found in Table 5 and in Appendix A 4 2 2 2 RS232 The Body Computer contains two serial ports COM1 and COM2 COMI and COM2 are by default both connected to the Head Computer through 11 Table 4 Hubo KHR4 Body Computer On Board Communication Number of Ports Port Type 2x USB1 1 1x EIDE Ix LPT 1x RS 232 422 485 COM1 1 85232 COM2 1 K B 1x Mouse 2x CAN 1x 10 100 Ethernet Realtek RTL8139D internal connections 2 2 3 Wireless The Body Computer communicates with the Hubo network called HuNet via 802 11
41. el calls are used to increase performance memory protection is no longer available 6 0 The Future Ardence Inc 6 Of major consideration for management and engineers is product longevity and investment protection With the advent of Microsoft s next generation operating system currently codenamed Longhorn Ring 3 architectures will encounter new issues that will be even more difficult to overcome to ensure real time performance Of these issues most prominent is the managed code model that Longhorn will implement for Ring 3 applications based upon the NET Common Language Runtime or CLR The CLR reduces all high level languages to a common denominator called the Microsoft Intermediate Language or MSIL The essential element of the managed code model is that high level language C C and C applications residing in Ring will be recompiled into the MSIL All Ring 3 applications will be subject to code verification and code access verification Code verification is conducted before the application is run The code is walked though before it is run ensuring pointer references and array indexes are valid Code access verification is the process to ensure that the code has the right to run In addition to the managed code aspects both of these processes can add significant overhead to applications running in Ring 3 How does this impact existing Ring 3 applications If any real time applications have been
42. ending is 29 because in the previous section our MotionNo was 29 The ending number is what ever the MotionNo is equal to Make sure that in this section that MotionNo is equal to the same value as it is in the previous section In this case MotionNo 29 see Figure 34 Next scroll down to the comment Start edit This is the start of the ONLY AREA THAT YOU EDIT TO MAKE A GESTURE The commented section End edit 2 is the end of the area that you edit to make gestures ONLY EDIT BE TWEEN THESE TWO COMMENTED AREAS see Figure 35 To make a movement profile you need to use the FTN half 1 cos func tion The point of this function is to allow for movement of the joints from the joints current location to a desired location in a smooth man ner This is done to reduce extremely fast and potentially damaging effects of step function inputs We will now create a movement of the right and left arms Figure is the timing diagram for the movement All noted ticks are in increments of 10ms The top graph shows the desired movement of the Right Shoulder Pitch RSP and the bottom graph shows the timing diagram of the Left Shoulder Pitch LSP e The X axis is time which is kept track of by the variable time and increases in 10ms increments every cycle e The Y axis is command angle for the joint defined in degrees e The flat section at the top of each bump is the desired target angle e The curved section is the use of
43. evices as well as sensors and actuators within a machine or plant Characterized by its multi master protocol real time capability error correction high noise immunity and the existence of many different silicon components the CAN serial bus system originally developed by Bosch for use in automobiles is increasingly being used in industrial automation Direct Memory Mapping The PCM 3680 is assigned with memory address which allows direct access to the CAN controller This is the simplest and fastest way of programming any board in a PC because the board is regarded as standard RAM Optical Isolation Protection On board optical isolators protect your PC and equipment against damage from ground loops increasing system reliability in harsh environments Specifications Ports 2 controller 82C200 transceiver 82C250 Signal support CAN L CAN H Memory address From C800H to EFOOH IRQ 3 4 5 6 7 9 10 11 12 15 e Isolation voltage 1000 Power consumption 5 V 400 MA typical 950 mA max Connectors Dual DB 9 male connectors Operating temperature 32 to 122 F 0 to 50 C PC 104 form factor 3 6 x 3 8 90 mm x 96 mm Shipping weight 0 9 Ib 0 4 kg PC 104 and the PC 104 logo are trademarks of the PC 104 Consortium Features Operates 2 separate CAN networks at the same time High speed transmission up to 1 Mbps 16 MHz CAN controller frequency
44. for the joint defined in degrees 57 Program 6 Final program used to make the RSP and LSP move to 90deg and back This code is to be placed between Start edit 2 and End edit as seen in Figure 35 FTN half 1 1 0f time 100 100 0 0 amp resulti 0 FTN half 1 1 0f time 300 100 0 0 amp resulti 1 FTN half 1 cos 1 0f time 500 100 0 0 amp result2 0 FTN half 1 cos 1 0 time 700 100 0 0 amp result2 1 res 0 float 90 resulti 0 result2 0 res 1 float 90 resulti 1 result2 1 res 0 res 1 UpperMovement RSP UpperMovement LSP 58 Appendix 59 A 1 Hubo KHR4 Dimensions 60 HUBO KHR 4 Rev 01 DWG NO snEET1 ori Drexel Autonomous Systems Lab JAEMI HUBO DIMENSIONS 9 23 2009 INS 2 275 PLES gt Dues Wale Es i all aly d Pow QE dis INO 99 em pE eom Oy SN PAR E E E RI 2 a Se Eee ifs s Lv 68c A 2 Head Computer Specifications 62 PCM 3370 LV Intel Pentium III PC 104 Plus CPU Module COMI Specifications PC 104 KB Mouse ATX Standby power Windows MIS Embedded General Features ULV Intel Celeron 400 650 MHz Fanless LV Pentium IIl 800 933 MHz Chipset VIA VT8606 TwisterT and VT82C686B VGA LCD controller with opti
45. gned and debugged it still requires real time performance Keeping the application in the Windows application space Ring 3 to obtain memory protection will not result in attaining a significant level of real time performance In fact performance will stay the same or in some instances may actually decrease In a Ring 3 architecture to access resources and functions two types of real time calls are used high level system calls and low level system calls Here is an extract of a Ring 3 product manual describing where it is appropriate to use each level of system call e High level validating calls Write test and debug your application using high level calls with their protection and validation features e Low level non validating calls When the application runs as you desire increase performance by substituting low level systems calls where appropriate The key words in the above bullets are validating and non validating and a further detailed explanation of each type of call is provided below High level validating calls High level calls provide lower performance plus higher protection and validation features Memory is allocated automatically from the process s pool It should be noted here that memory protection is afforded only to applications exclusively using high level system calls at the expense of performance Low level non validating calls Low level calls provide higher performance but lowe
46. ired motion In this step the hardware and mechanics of the Hubo must also be considered to ensure that the Hubo can perform the motion 2 The gesture must be inserted into the Hubo code Various functions and pages must be updated so that the gesture is fully integrated with all of the existing HUBO components 3 The gesture must be triggered The most common way to do this is from the GUI However command line options are also possible The GUI is generally preferable for ease and for greater transparency when running demonstrations The priority concern when creating a gesture must be the safety and stability of the Hubo It is a fragile and expensive piece of equipment and a wrong move could either damage a motor or topple the robot 6 1 3 Using existing gestures For demonstration purposes or for testing the user may wish to perform the Hubo khr4 s existing gestures This can be done directly from the GUI or from the command line 44 Care should be taken to make sure that the startup procedure for the Hubo has already been performed so that variables and flags are correctly set Failure to ensure this could cause damage to the Hubo 1 Click on the kirk walking button on the GUI This sets several flags to prepare the Hubo for gesturing Before pressing any other button press Walk in Place Let Hubo walk in place for a few steps and then press Stop This will need to be done before entering the Gestures
47. iting BLANK 2 jais mals selo c era l a members OnButtonMotion31 zIm e Bx 1 a theApp n pSharedWemcry HotionFlag HotionNo FALSE z E 2 khr3win resources T 705 7000 dim 10 msec 8 8 Bitmap Ej 3 Dialog DataReset E IDD DIALOG READ Korean the pp m pSharedMemory MotionLength MotionNo T IDD DIALOG GAIN SETTING Korean the pp m pSharedMemory MotionFlagALL 1 DD DIALOG GESTURE Korean the pp m pSharedMemory MotionFlag MotionNo TRUE TDD_DIALOG_KIRK2 WALKING Korean theApp m pSharedMemory PROFTime 19 0 D DIALOG MOTOR STATE Korean theApp n pSharedMenory MOTION Stop 0 IDD DIALOG OPEN LOOP TEST Korean Bj ibo DIALOG PARAMETER SETTING Kore IDD DIALOG POSITION CONTROL Korean 100 DIALOG PROF GRAPH Korean lt lt TODO Add yout eT BU ification handler code here 3 100 DALOG TILT READ Korean Aq hene EE 100 DIALOG UTILTKoresn 71 Hemi sev BB ioo DIALOG WALK Korean PEE mm EB ioo DIALOG WALK EXP Korean 123 199 DD DIALOG Z ENCODER Korea 5 ISR D DIALOG Z PHASE Korea 7 6 0 DIALOG 2MP ZERO Korean 7 1 INR D KHRAWIN DIALOG Korean 25 Nm 77 10 REY E Version 72 11 R R 7 12 REB 77 13 RUR 14 RUP 2215 IRHP int JointIndex int t int Ti BUTTON MOTION31 EnableWindow FALSE the pp m pSharedMemory No
48. l embedded market there is a subset of deployments that require the kind of real time determinism that CE and XPe cannot offer on their own To address these real time requirements there are two deployment architectures that can be implemented to augment Windows based systems to deliver the necessary determinism Ring 3 deployments provide memory protection but sacrifice performance The ideal approach is to have a set of development tools that will give developers of real time applications the capability to develop in Ring 3 to ensure code stability and then with a optimizing recompile deploy in Ring 0 to attain immediate performance benefits 2 0 The Need for Real time Windows While Windows provides a rich graphical environment for a sophisticated Industrial Automation programmable logic controller or PLC it does not for example ensure that the control application developed for the PLC will have the ability to run at the necessary priority in the Windows environment Windows has 32 levels of priority of which 7 levels of priority are accessible by Win32 API macros and the device in the Windows system with the highest priority is the Mouse So imagine if you will a PLC is running a critical control application and the mouse is moved Windows will immediately stop processing the control application to service the mouse interrupt Of course this model also applies to other Windows internal functions such as flushing memory cache etc So
49. lect the right hand or left hand checkboxes to control which hand grips 2 Select Hold on Hand to close the hand Hold on Hand and Hold off Hand disable many other buttons on the gesture panel so that the Hubo does not do too many things at once To enable them select the Motion Button Activation button Hand Shaking 1 First select the F T Show button and make sure that the FT variables are within certain bounds Mx My and Fz should all be less than 20 otherwise the robot may destabalize These variables relate to the robots balancing and its force sensors in its feet 2 Click Start Shake Hands to start shaking hands Note This will cause Hubo to lift her right arm hand and put it into a shaking position 3 At this point the force torque FT sensors in the wrist are activated When the user puts their hand in Hubo s right hand and move it up and down Hubo will follow 4 When done click Stop Shake Hands Hubo s arm hand will then re turn it it s default position Wrist Moving 1 Set several values in the write boxes Select 10mm for the distance box as this is a good range for the robot s wrist Select between 1 and 4 Hz in the speed box The Hubo should not go faster than 4 Hz otherwise it may damage itself Finally select a mode 2 Mode 1 rotates the wrist mode 2 makes it go in circles and mode 3 makes it rise and fall 3 Select Go to begin wrist motion and to
50. ll product specifications are subject to change without notice Last updated 20 Mar 2006 PCM 3370 Board Diagram Intel ULV LV Processor ll VIA SDRAM VT8606 SODIMM VGA Connector TTL Panel Connector IDE PC 104 connector COM VIA COM VT82C686B CF CEIDCIUCIUCHUDIOCHODCUCHCHOGUCHU LEIDCIDCUDEHOD ID CELO CH CEU GUCCI 220000062000000500006565000050 LAN Connector PC 104 connector mooomoooomococo mooomoooomoooco Ordering Information Part No CPU ne Chipset CRT uvos TTL 10 00 58 s 232 5 422 4 5 LPT CF Kems PE TU PCM 3370F ROA1E a 256 KB 2 Yes 36bt 2 2 Option Yes Ves Yes Yes Yes Active 10 60 PCM 3370F MOATE patel 256 KB 2 Yes 36bt 2 2 Option Yes 0 Yes Yes Passive 0 60 C PCM 3370F JOME ia 256 KB 2 Yes 36bt 2 2 Option Yes Passive 0 60 C PCM 3370Z JOA1E 256 Yes 36bt 2 2_ Option Ves Yes Yes Yes Passive 20 80 C 337071 0 1 256 KB 2 Yes 36bt 2 2 Option Yes Yes Yes Yes Passive 30 70 C PCM 3370E ROATE me 256 KB Yes 36bit 24bit 1 2 2 Yes Yes Yes
51. mized Shared Memory Architecture SMA 4x AGP VGA LCD amp LCD controller up to 1024 x 768 5 V and 12 V power supply required 10 100Mbps PCI Ethernet interface supports wake on LAN COM 5 V supports power line connected on pin 9 PC 104 and PC 104 Plus expansion connector Support for CompactFlash Card CFC Type Socket 1 6 sec interval Watchdog timer 1 SODIMM socket supports up to 512 MB SDRAM Mechanical and Environmental Dimension L x W 96 x 115 mm Weight 0 162 kg with heat sink Operating Temperature 0 60 C CPU 2nd Cache Memory System Chipset BIOS System Memory Power Management SSD Watchdog Timer Expansion Interface 1 0 1 0 Interface USB IrDA 1 0 Expansion Ethernet Chipset Speed Interface Display Chipset Onboard ULV Intel Celeron 400 650 MHz Fanless or LV Pentium 933 800 MHz optional 256 KB on ULV Celeron 512 KB on Pentium III VIA VT8606 TwiserT VT82C686B AWARD 256 KB Flash BIOS 1x SODIMM socket supports up to 512 MB SDRAM Supports Advanced Power Management Supports CompactFlash Card Type 1 6 sec interval Watchdog timer set up by software jumperless selection generates system reset or IRQ11 104 pin 16 bit PC 104 module connector and 120 pin PCI PC 104 Plus module connector 1x EIDE 1 x LPT 1 x RS 232 422 485 1 x RS232 1xK B 1 x Mouse 2 Universal Serial Bus 1 1 compliant ports Share wi
52. n The Sensors and 12V switches are switches 2 and 3 in Figure 4 respectively This will activate 26 99 2 sln 5 f Al er o on v 2 EO Dependencies E khi3win files C3 Source Files Header Files OJ Resource Files E ReadMe tet External Dependencies X Linking 4 khr3win exe 0 error s 55 warning s Build Debug X FindinFiles t Y FindinFies2 Results 11 rf Ready A Figure 11 Visual Studio 6 Compiled the Hubo KHR4 code Note the 55 warnings is expected Microsoft Visual C Edt Insert Project Buld Tools Window Help la SOM par All class members member unction Workspace HUBO2 2 project HUBO files OJ Source Files m Header Files I Resource Files E HUBOVar asp Extemal Dependencies Ed khr3win files Source Files Ca Header Files Resource Files ReadMe tit External Dependencies khr3win exe 0 error s 55 warning s STE Build Debug Y FindinFiles 1 FindinFiles2 Resuts Tal sf Ready Figure 12 Visual Studio 6 Run the Hubo KHR4 program khr3win exe by clicking the 27 HUBO Controller Pannel XI UN RrXON _ FTREAD Position CTRL exer Parameter Gain Set Kirk Walking Motor State Utility Save Log Exit Figure 13 Hubo Contr
53. n connection On boot and login to the user name hubo the Body Computer will automatically connect to HuNet The wireless con figuration for the Body Computer can be found in Table 6 2 2 4 Wired The Body Computer can be plugged directly in to a 10 100 network and accessed The Body Computer has a Static IP so it can be connected to via a network hub or directly via a crossover cable The connection information can be found in Table 7 2 2 5 Digital I O Unlike the Head Computer the Body Computer does not contain any GPIO General Purpus IO pins 2 3 Head Computer The Head Computer is the secondary compter for the Hubo KHR4 The main purpose of this computer is to act as the processing power for Hubo s human 12 Table 5 PCM 3680 Rev A 1 PC 104 CAN Card Specifications Ports 2 CAN controller 82C200 CAN transceiver 82C250 Signal support CAN L CAN H Memory address From C800H to EF00H IRQ 3 4 5 6 7 9 10 11 12 15 Isolation voltage 1000 VDC Power consumption 5 V 400 mA typical 950 mA max Connectors Dual DB 9 male connectors Operating temperature 32 to 122 0 to 50 C PC 104 form factor 3 6 x 3 8 90 mm x 96 mm Shipping weight 0 9 Ib 0 4 kg interaction capability The Head Computer is a PCM 3372 PC 104 com puter More information on the PCM 3372 can be found in Appendix A 2 All of the communication methods available on the Head Computer can be found in Table 8 2 3
54. ng dialog box will appear see Figure 26 39 192 168 0 1 Ele Edt View Insert Project Buld Tools Window Help HUBO2 classes classes Body Inertia Sensor Body Roll SHARED_DAT ER zl fio renben Ico Mente Functor 21 Incl Roll inci Pich 98 prem Gyro Roi 18 Gyro Pitch S piaim Gyro Yaw T pisi Angle Roll 7 Dea Body Pitch Angle Pitch 0 Deg Gyro Cut Off A 02512 Hz Gyro Cut Ot P 12512 Hz Gyro Cut oft y 0628 Hz Incl Cut Off A 22512 Hz Incl Cut Off P 1572 Hz Fee Tee TE Left Foot Incl Gyro Reset Stop Right Foot Incl Foot Angle Sensor Start Compensation Left Right mi Data S Incl R _ Data Save Incl RS Incl P 550 Foot Reset T HIR m Graph Star 8 Deg 15 074 Deg A 14549 Hide Deg 21 8 Deg 22788 Close khr3vin exe 0 error s 55 warning s Build Debug y FindinFies1 Y FindinFies2 Y Resuts 7 p teady Start oo HUBOZ Microsoft 158 HUBO Controller Figure 22 Tilt Show dialog box Ele Edt View Insert Project Buld Tools Window Help dL ve o 0 0 z tk
55. nlotion31 TODO Add your control notification handler code here 77 0 Torso yaw Head Head pitch int JointIndex int ti int T int MotignNo Mot ionN lo 106 BUTTON MOTION31 Enahlelindow FALSE the pp m pSharedMemory MotionFlag MotionNo FALSE T 900 dim 10 nsec T must be 3 times integer khr3win cpp cpp 21 KakwakinoZ coo m3 Ca View ii ResouceVief I Ready Figure 33 Next go to File View and open PROFILE cpp in the HUBO2 files Source Files section rm BS By 529 GIE Sl 15 28518 Workspace HUBD2 2 projects EF HUBO2 Ej 2 Source Files CAN CPP 2 Controlepp Z FUNCTION epp PROFILE RTXCPP Header Fies CANH CANIDH CommorDefiion h Contralh E Deline h E FUNCTION h HUBOVarh MotorParameter h PROFILE h RIXH SharedMemoy h a Resource Flee 18 HUBOVar asp E External Dependencies i MI khr3win files 8 63 Source Fies 8 Board cpp E CANwin cpp 3 ConmThead cop EncheadDig cpp 19 FT_ReadDig cpp 18 Geinset cpp Gesture cpp khidwin khidwinDlg cpp coo Lo ClassView ii Fesouceview E time 0 if timelc UpperlotionRecovertime timelee else if tinel
56. o Set Dialog and click FT Show in the Main Menu Figure 16 The new dialog box that opens is called FT Sensor Read dialog box see Figure 21 5 34 Click F T Null in the FT Sensor Read dialog box see Figure 21 This will null the FT sensors again You must do this a minimum of one time Make sure that the values in the left boxes of Mx My Fz for the left and right feet and the wrist are all between 4 and 4 before Each time you 36 Insert Project Buld Tools Window Help Remote Desktop 2 22 TATA in face menbers Mon C O Member Function pF T X ZMP 9 2 y L Mx R Fz Accelerometer Acc Roll Raw Pitch Raw Ee Acc Roll LPF Pitch LPF 58 Zmp Zero Position Setting Left Fight Set Adjustment AC E Adj of Eq in Y Dir Left Right Incl Adj of Eq in Ace Pitch Forward Backward _Nulllng F T Sen Exit Ele Edt View Insert project Buld Tools Window Help mote Desktop a sud ae DAE fms E HUBO2 classes khidwin classes mese limo Funcion Right Foot F T p Left Foot F T Sensor Data Right Foot F T Sensor Data Mx My UUJ Foot F T 007 7 052
57. o a particular joint place the magnitude scaled values in the UpperMovement matrix at the appropriate index from Table So to assign the above motion to the left elbow the example command can be found in Program 4 To set multiple joints simply write commands for multiple UpperMove ment values in a row To set more complex gestures such as a joint moving forwards and then returning to its starting position run the FTN half 1 cos function numerous times and sum the result variables the example command can be found in Program 5 48 Program 4 Half Cos Function moving the left elbow from Odet to 30deg FTN half 1 cos 1 0 time 100 200 0 0 amp result 1 0 float 30 xkresult 1 UpperMovement LEB 0 Program 5 Half Cos Function moving the left elbow from Odet to 30deg then back to Odeg FTN half 1 cos 1 0f time 100 200 0 0 amp result 1 FTN half 1 cos 1 0f time 400 200 0 0 amp result 2 No overlap Res 0 float 30 result 1 result 2 UpperMovement LEB Res 0 6 1 6 Adding a gesture to the Hubo code First examine the Gesture cpp file in the khr4 code Find a button which does not have a gesture or whose gesture you will not be using Find the corresponding OnButtonMotion function for that button Set T to the length of your gesture in units of 10 ms Ignore any comments in the code about T REQUIRED to be a multiple of 3 Make a note of the value of the MotionNo v
58. o the ground Lower Hubo to the ground so she is on her feet and has about an inch or so of slack in her hoist cables connected to her 5 26 Wait 10 seconds Make sure Hubo is not moving and wait 10 seconds 5 27 Switch ON the Sensor switch Figure 4 We are now turning on the sensors while Hubo is stationary on the ground so her sensors are zeroed properly 5 28 Lift Hubo by repeating Step 5 5 5 29 Start khr3win exe by repeating Step 5 16 5 30 Turn the CAN on by repeating Step 5 19 5 31 Click ZMP Zero Set in the Main Menu Figure 16 At this point Hubo will move in to her zero default crouched position Re member Hubo is still hanging at this point The ZMP Zero Set dialog will now open Figure 19 35 Buld Tools Window Help ele mme pmo mrio menter Member Function amp v 2 46 1 8100 classes Acc Pitch LPF 2 T kkl i error s 55 warning s z Build Debug X FrdinFlesT FmdinFies2 Resuts 7 Tal afi Ready 99 HUBO Microsoft 158 HUBO Controller P US 5 56 PM Figure 19 ZMP Zero Set Dialog Before Pressing FT Null 5 32 Click FT Null in the ZMP Zero Set Dialog Fig ure 19 This action will null the force torque FT sensors in Hubos ankles and right wrist Note that the button that previously said Null now says Start see Figure 20 5 33 Do NOT Close ZMP Zer
59. ok in HUBO2_R1_5 Current Version v pi EE HUBOZ Win32 RTSS Debug HUBO2 Win32 RTSS Release Femme Files of type Workspaces deu mdp X Cancel 2 Build Debug Y FindinFies1 FindinFiles2 Results File Edit View Insert Project Build Tools Window Help EILAT AE 2 C SE e 1 GELO BH uno HUBO 2 2 project HUBO files Source Files Header Files I Resource Files E HUBOVar asp Header Fies Resource Files 1 ReadMe tt Eternal Dependencies TIEN Buia Debug Y FindinFies 1 Y FindinFies 2 Y Results Ti eean Figure 8 Visual Studio 6 HUBO2 dsw Workspace 24 HUBO2 Microsoft Visual C Fle Edt View Insert Project Buld Tools Window Help jals mas 2 p r DEDIT crc s E Tbe Geste C C Member Funcion 8 05 BLO mbers se I iNo membi H Debug khr3win Win32 Release kein Win32 Debug ETN Debug Findin Fies1 FindinFiles2 Resuts 1411 mm Ready 2 Figure 9 Visual Studio 6 Set Active Project Configuration as HUBO2 Win32 RTSS Release 5 10 Set Active Project Configuration as HUBO2 Go to Build Set Active Configuration and choose HUBO2 Win32 RTSS Release see Figure 9 5 11 Clean Active Project HUBO2 Clean the active project HUBO2 Win32 RTSS Release by going to Build Clean 5 12 Build All HUBO2 Win
60. ol Main Menu at Startup the motor controllers drivers and the sensors Please note that at this point the KHR4 s joints are not activated yet because they have not been set the activation command yet Thus you can still manually move each joint at this time 5 18 Move Hubo KHRA into the Home Position Man ually Move each of the joints until e Each joint is straight to the naked eye like in Figure 14 e Make sure that the hands are at least 1 away from any part of the body e Make sure that the feed are a minimum of 1 apart 5 19 Press CAN On in the Main Menu Press the CAN On button in the Main Menu of the Hubo KHR4 program see Figure 13 and wait until the motor controllers and sensors respond see Figure 15 Note 28 Figure 14 Hubo KHRA Hanging greater then 3 above the ground with limbs straight to the naked eye 29 4 All of the JMC Boards should reply with JMCBoard is ready for 10 msec Int time All of the EJMC boards should reply with EJMC Board is ready for 10 msec Int time The Sensors will respond with the following a Oth Sensor Boarc is ready b 1th Sensor Boarc is ready c 2th Sensor d 3th Sensor 4th Sensor Boarc is ready f g 6th Sensor 5th Sensor Boarc is ready The end result should look like Figure 15 If one or more of the motor controllers or sensors did not respond do the following 1 2 Click the
61. r of hurdles to be able to develop and deploy a real time application including Performance penalty associated with memory protection Significant time to tune for performance with no guarantees Loss of memory protection when using low level calls Lost development time in application tuning Lack of scalability within a single system Most systems designed with real time in mind require some level of determinism and scalability and in a Ring 3 architecture a decision must be made to compromise on either of these two elements as the developer cannot have both Unfortunately the performance penalties associated with memory protection can result in unpredictable performance decreased determinism and lack of scalability and as soon as the developer tries to increase performance in a Ring 3 architecture all memory protection capability is lost Distributed processing with additional hardware is not an acceptable solution to address the lack of scalability for cost reasons Support for complex applications requiring servicing of interrupts in the 30KHz range is not possible in a single platform Code development in a Ring 3 environment makes a great deal of sense as it lets the hardware catch common programming errors Furthermore developers should not have to focus on application performance tuning to compensate for these architectural shortcomings in a Ring 3 environment A Windows real time Ring 0 architecture offers the most flexibility for
62. r protection and validation features Low level objects are not protected against unexpected deletion and do not validate parameters if you need parameter validation use high level system calls Use low level objects in these situations e For well tested code e When performance is critical such as high performance unvalidated sending and receiving of data mailbox messages and semaphore units System calls that manipulate low level objects assume that all memory reference pointers received are valid By interpreting the above description of low level calls we can discern several critical pieces of information concerning memory protection performance and length of development time e Memory protection and high performance are not simultaneously possible Ardence Inc 3 Copyright 2005 266 274 Avenue Waltham MA 02451 e When converting from high level to low level calls the developer must ensure that all memory reference pointers are valid In other words if the pointers are not valid then application failure will result in a blue screen e The developer can only choose from a limited number of low level calls to increase performance thus limiting flexibility in design and lengthening development time As mentioned earlier a developer would code his real time application in Ring 3 using high level calls and once it has been debugged and tested start to substitute a small number of high level calls to low level call
63. s with the idea being to increase performance This can result in a significant amount of time to compile debug and application profiling to assess which of the calls if any improve performance These non validating low level calls are now subject to being over written in memory and over writing memory themselves even though the real time application still resides in Ring 3 As soon as the first low level system call is used the application is no longer memory protected At this point there is no advantage over an architecture where the real time application resides in the kernel space or Ring 0 as the application is developed at the same Ring 3 level and then immediately recompiled as a kernel level application for optimized performance Why should a developer have to worry about any of the above in developing a real time application that should immediately be capable of high performance if it has been developed in compliance with good coding practices Ardence believes that developers should be able to focus on what they do best developing value add features and functionality instead of trying to tune real time application performance when the system should perform in real time to begin with 4 0 Implementing for Performance and Scalability Depending on the complexity of the application and target hardware platform number of sub systems and devices the system designer has to be very concerned with the timely servicing of both hardware an
64. stop it For other gestures in the gesture menu select the appropriate button Hubo will move accordingly without requiring a stop command Note Wait until the gesture is completed until pressing a new gesture DO NOT press multiple gestures at one 46 6 1 4 Creating a Gesture Each joint that can be moved on the Hubo is indexed in several matrices with a three letter variable The joints are listed below in Table Table 12 Hubo Joint Static Variable Values Joint Index Name Static Variable Value 3 Left Shoulder Pitch LSP 4 Left Shoulder Yaw LSY 5 Left Shoulder Roll LSR 6 Left Elbow Bend LEB T Left Wrist Pitch LWP 8 Left Wrist Roll LWR 9 Right Shoulder Pitch RSP 10 Right Shoulder Yaw RSY 11 Right Shoulder Roll RSR 12 Right Elbow Bend REB 13 Right Wrist Roll RWR 14 Right Wrist Pitch RWP To create the gesture first consider where exactly you want the robot to move and in what time span Make sure that the robot has at least 0 1 seconds for every ten degrees Less time than that could damage the Hubo s joints Next consider the direction that you want the Hubo s joints to move Refer to Figure 1 to determine whether this direction will be positive or negative for each joint For example having the Hubo s right shoulder swing back is positive yaw and thus a positive joint angle Having the arm swing forward is negative yaw and thus a negative angle After you have determined all of this create your gesture Use th
65. tch RSP Code UpperMovement RSP res 0 52 Gm D MR rater one Address 2 C Documents and Settings Al UserslDocumentslHUBOIMUBO File and Folder Tasks WD Rename this i Move this He Copy this fie Publish this file to the Web file XK Delete this fle Other Places My Documents Shared Documents M My Computer My Network Places Bevin hl Crete uw h Figure 28 Open HUBO2 dsw hl e 4 Source SharedMemory h Header fie KB 11 For the Left Shoulder Pitch LSP Code UpperMovement LSP 12 BE SURE TO VERIFY THE TRAJECTORY BEFORE RUNNING IT ON HUBO 13 See Program 6 for all of the above code put together res 1 53 Board cop emas 0 7 Boexd cpp implementation file A class members E khr3win resources IDD DIALOG ENC READ Korean IDD DIALOG FT READ Korean EDO DIALOG GAIN SETTING Korean IDD DIALOG GESTURE Korean IDD DIALOG KIRK2 WALKING Korean IDD DIALOG MOTOR STATE Korean IDD DIALOG LOOP TEST Korean ID DIALOG PARAMETER SETTING 77 CBoard IDD DIALOG POSITION CONTROL Korean ILE static char THIS FILE FIE JOD DU Ok PROF PAPH Komae
66. tem For more information on RTX please see Appendix A 5 3 2 Body Computer 3 2 1 Software The Body Computer runs the RTX system as described in Section 3 1 This system runs two hard real time loops 100Hz and 500Hz The 100Hz loop is for the motor controller commands and the 500Hz loop is for the sensor data acquisition 3 2 2 Hardware The Body Computer contains a 1 6sec interval Watchdog timer This is setup via software IntervalZero RTX http www directinsight co uk products venturcom rtx html IntervalZero RTX http www directinsight co uk products venturcom rtx html 16 3 3 Head Computer 3 3 1 Software The Head Computer does not contain any form of hard real time interface 3 3 2 Hardware The Head Computer contains a 255 levels interval Watchdog timer This is setup via software 17 Figure 2 Hubo KHR4 Main Body given in front side and cartesian views 4 Parts This section will explain the main parts of the Jaemi Hubo KHR4 Please note that the figures in this section will be used in other sections as references 4 1 Overview The Hubo series is a 4 3 tall humanoid robot Figure 2 shows the Hubo KHRA in the front side and cartesian view points
67. th COM transfer rate up to 1 15 Mbps Support for 5 V FAN speed detect connector Heat Fan speed Realtek RTL8139D 10 100 Mbps 10 100Base T 1xRJ 45 VIA VT8606 4X AGP controller supporting CRT PCM 3370F 18 24 36 bit TTL interface PCM 3370E 18 24 bit TTL interface and 36 bit dual channel LVDS Operating Humidity Power 0 90 relative humidity non condensing Power Supply Voltage 5 V 2596 12 V 5 Typical 2 43 A Q 5 V ULV Ce Power Consumption Packing List 1 3370 SBC Max 2 83 A Q 45 V ULV Ce 3 50 A 5 V LV Pent 0 02 A Q 12 V ULV C 0 02 A Q 12 V ULV C 0 02 A Q 12 V LV Pen 2 47 5 V ULV Ce 2 97 5 V ULV Ce 3 99 A 5 V LV Penti 0 06 A Q 12 V ULV Celeron 400 MHz CPU 0 06 A Q 12 V ULV Celeron 650 MHz CPU 0 08 A 12 V LV Pentium III 933 MHz CPU eron 400 MHz CPU eron 650 MHz CPU ium 111 933 MHz CPU eleron 400 MHz CPU eleron 650 MHz CPU tium 111 933 MHz CPU eron 400 MHz CPU eron 650 MHz CPU um 111 933 MHz CPU 1xKB Mouse Y Cable p n 1700060202 1 Y Cable external cable p n 1703060053 1 VGA Cable p n 1701160150 1 x Ethernet RJ 45 Conn conversion cable p n 1701100202 1xIDE Cable p n 1701440350 1x COM Port Cable p n 1700100250 1xLPT port cable p n 1700260250 1x Wire ATX Power p n 1703200380 1x Startup manual 1x CD ROM Manual Driver Utility ITEN www advantech com products AD ANTECH A
68. the embedded designer in that they can ensure application stability in Ring 3 and immediately move to Ring 0 to 10096 guarantee predictability and determinism Ardence Inc 7 Copyright 2005 266 27 Avenue Waltham MA 02451
69. thernet Intel 82551ER Table 9 Head Computer Wireless Configuration SSID HuNet Frequency 2 4Ghz Standard 802 11n WPA2 Passkey dasl1234 IP 192 168 0 103 Mask 255 255 255 0 Gateway 192 168 0 1 Domain Hunet Table 10 Head Computer Wired Configuration Network HuNet Standard 10 100 IP Static 192 168 0 113 Mask 255 255 255 0 Gateway 192 168 0 1 Domain Hunet 15 3 Timing Hubo KHRA uses two hard real time loops running at 100Hz and 500Hz for motor commands and control and sensor data acquisition respectively These two hard real time loops are maintained by the the IntervalZero RTX Real Time Extension for Windows RTX formerly Ardence RTX The version that Hubo KHR4 runs is RTX 6 5 For more information please visit IntervalZero RTX home page for more information 3 1 RTX IntervalZero RTX is a hard real time solution for the Windows operating system RTX is used with C or C in the Microsoft Windows environment When a program is written using RTX a hard real time loop loops can be crated When compiled and run these loops will not run within Windows it will run Next to Windows This means that if Windows crashes the RTX loop will still be running just fine Because this system runs on a system running Microsoft Windows the majority of the deceives that with windows will work with the RTX system This means that as long as it works with Windows it will work with our real time sys
70. tionFlag MotionNo FALSE 10 nsec da n 7 T must be 3 times integer Ji ResourceView 41 oft Ready E REC FOL OVA READ Figure 32 You will now be in the potion of the code that controls the functionality of the button In this case we are dealing with Button 31 Here it is important that you note what motion number In this case MotionNo 29 Also note the line T 900 This means that the total time of this motion will last 900 cycles where each cycle is 10ms Thus this motion will last for 9000ms or 9sec 55 2 dla I nButonMotion T 5 Workspace HUBOZ 2 project s 8 HUBO2 amp Source Fies E Define h E FUNCTION h HUBOVarh MotorParameter h PROFILE h RIXH SharedMemoy h 18 HUBOVar asp E External Dependencies E MI khr3win files 5 Source Fies ZEER E CaNwin cpp 3 ConmThead cop EncheadDig cpp 19 FT_ReadDig cpp 18 Gain et cpp Gesture cpp FE theipp n pSharedWemory MotionFlag MotionNo FALSE T 705 7000 dim 10 msec DataReset theApp m pSharedMemory MotionLength MotionNo T theApp n_pSharedMenory MotionFlagALL 1 the pp n pSharedMemory MotionFlag MotionNo TRUE theApp m pSharedMemory PROFTime 19 0 theabp ncbsharedMenory MOTION Stop 0 H void CGesture OnButto
71. ues should then be passed to the Gesture cpp and Profile cpp files as needed 6 1 8 Example Rise and Lower Arm Step By Step The goal of this example is to show you how to make a simple gesture In this case we are going to be raising and lowering Hubo s left and right arms To complete this task please do the following 1 Make a copy of the entire Hubo2 project and increment the version number 2 Open HUBO2 dsw in the project you just incremented the version num ber in see Figure 28 3 Goto Build Set Active Configuration khr3win Release This will set the active project as the front end and NOT the RTX 4 Goto Resource View see Figure 29 5 Double click on DD DIALOG GESTURE see Figure 30 6 Double click on the button you want to edit In this example we will be editing BLANK 2 see Figure 31 7 You will now be in the potion of the code that controls the functionality of the button In this case we are dealing with Button 31 Here it is important that you note what motion number In this case MotionNo 29 Also note the line T 900 This means that the total time of this motion will last 900 cycles where each cycle is 10ms Thus this motion will last for 9000ms or 9sec see Figure 32 50 10 11 12 Next go to File View and open PROFILE cpp in the HUBO2 files Source Files section see Figure 33 When in HUBO2 files Source Files PROFILE cpp find the PROF MotionPlay29 section The
72. uter using a RDP Remote Desktop Protocol pro gram such as Windows Remote Desktop or the Linux rdesktop client Note You must have a remote desktop screen resolution of at least 1024x768 to ensure full functionality 5 8 Run Visual Studio 6 Run Visual Studio 6 through the shortcut on the desktop see Figure 5 You must use this link because the KHR4 runs the Windows XP system on a limited account by default This shortcut will run the program as the admin which is needed to successfully run the Windows RTX later on At this point you should see this screen see Figure 6 5 9 Open the Program s Workspace Go to the file menu and click on Open Workspace Figure 7 should now show on your screen Choose the HUBO2 dsw in the HUBO2 R1 5 Current Version folder This is currently the latest version of the software However this might be updated in the future At this point your screen should look like Figure 8 22 arge 192 168 0 102 Remote Desktop Game 5 45 Pi Figure 5 Visual Studio 6 with Run As Admin set mITII Y I u EEE Edt Insert Project Buld Tools Window Help ESOS s helo mm Spem sl Build Debug FindinFies1 FindinFiles2 Resuts 411 ene Ready Figure 6 Visual Studio 6 Main Window 23 Visual C Edit View Insert Project Build Tools Window Help lels mols vejo umu zl Open Workspace Lo
73. when designing a Windows based system the designer should consider the following when selecting real time Windows components Predictability events happen when they are scheduled The ability to support consistent interrupt rates of 30KHz without performance degradation in either Windows or real time performance Application Blue Screen survivability Standardized design approach for device drivers Deterministic memory allocation for flexible coding techniques Unlimited Threads with priority inversion avoidance and promotion 3 0 Develop in Ring 3 Deploy in Ring 0 There are a few options for designing a system around real time for Windows components In comparing different implementations the developers need to keep their systems requirements and performance objectives in mind at all times Software engineers strive to develop clean code with as few bugs as possible By developing in the Windows application space known as Ring 3 developers can benefit from and take advantage of several features of the Windows environment such as Ardence Inc 2 Copyright 2005 266 27 Avenue Waltham MA 02451 memory protection and comprehensive debugging tools If the application was developed in accordance with sound coding practices and all memory related bugs have been resolved the benefits of memory protection leveraged by running in Ring 3 in the development stage are no longer required for deployment Once the application is desi
74. written for a Ring 3 architecture using C under the NET framework then those applications will be subject to the Longhorn managed code model and it s associated overhead In a Ring 0 architecture because the application is designed and written for the kernel space the developer does not have to be concerned with the managed code model The key take away is that with a Ring O architecture real time performance is in no way affected by the upcoming Longhorn operating system Copyright 2005 266 2 Avenue Waltham MA 02451 7 0 Conclusions The choice for the developer of real time Windows based systems is very clear The Ring 0 architecture clearly represents the most flexible architecture for developers It takes the preeminent elements of both Ring 3 and Ring 0 and combines them to provide the best of both worlds The ability to take advantage of the protection mechanisms in Ring 3 during development and then simply move to Ring 0 when appropriate to achieve optimal performance for deployment is the best solution In summary the RTX Ring 0 architecture provides maximum flexibility In summary the Ring O architecture lets the developer Develop in Ring 3 and deploy in Ring 0 Ensure deterministic and predictable performance Application and system scalability Support highly demanding applications with 30KHz sustained sample rates Rapidly move from prototype to production Developers using Ring 3 architectures must overcome a numbe

Download Pdf Manuals

image

Related Search

Related Contents

RDTS-690 - Fonestar  Falmec Polar    Trendnet TK-C06 keyboard video mouse (KVM) cable  User manual DA14580 Bluetooth® Smart Development Kit  付録 - CASIO  How to Lower Product Compliance Costs  Strategie e tourisme Vallee Bruche  Alimentation et hygiène de vie : l`automne  Targus OHZ002CA  

Copyright © All rights reserved.
Failed to retrieve file