Escolar Documentos
Profissional Documentos
Cultura Documentos
Group Members: Ying Li Paul Mulcahy Joe Chapman Group Supervisor: Dr. Pan Agathoklis
http://web.uvic.ca/~hexapod hexapod@uvic.ca
Table of Contents
1 Introduction ......................................................................................................................... 2 1.1 The Definition of a Robot ............................................................................................. 2 1.1.1 Industrial Robots ................................................................................................... 2 1.1.2 Agriculture Robots ................................................................................................ 2 1.1.3 Telerobots............................................................................................................. 2 1.1.4 Service Robots ..................................................................................................... 2 1.1.5 Mobile Robots ....................................................................................................... 2 1.2 Mobile Robots .............................................................................................................. 3 1.2.1 Wheeled Robots ................................................................................................... 3 1.2.2 Tracked Robots .................................................................................................... 3 1.2.3 Legged Robots ..................................................................................................... 3 1.3 Hexapod ...................................................................................................................... 4 1.4 Objectives .................................................................................................................... 5 Hexapod Construction......................................................................................................... 6 2.1 Servo Erector Set:........................................................................................................ 7 2.2 Servo Motor: ................................................................................................................ 7 2.3 Force Sensors: ............................................................................................................ 8 2.4 Ultrasonic Sensors ....................................................................................................... 8 2.5 Infrared Sensors: ........................................................................................................10 2.6 Arduino Mega 2560 ADK Board: .................................................................................10 2.7 SSC-32 Servo Controller:............................................................................................10 Inverse Kinematic Calculations ..........................................................................................12 Hexapod Modelling ............................................................................................................16 Module Description and Design .........................................................................................18 5.1 Software Development ................................................................................................18 5.1.1 Software Development Platform...........................................................................18 5.1.2 Interfacing with Servo Controller ..........................................................................18 5.1.3 Walking Algorithm ................................................................................................18 5.1.4 Turning and Walking Backwards ..........................................................................19 5.1.5 Walking in High Mode ..........................................................................................20 5.1.6 Interfacing with Infrared Sensors..........................................................................20 5.1.7 Interfacing with Ultrasonic Sensors ......................................................................21 5.1.8 Interfacing with Touch Sensors ............................................................................21 5.1.9 Avoiding Walking Over Cliffs ................................................................................22 Test Results and Problems Encountered ...........................................................................23 6.1 Inverse Kinematics Testing .........................................................................................23 6.2 Ultrasonic Sensors ......................................................................................................24 6.3 Infrared Sensors .........................................................................................................24 6.4 Force Sensors ............................................................................................................24 6.5 Power Supply..............................................................................................................25 6.6 Analog Ports ...............................................................................................................25 6.7 Climbing over Obstacles .............................................................................................26
3 4 5
ii
7 8 9
Future Development and Recommendations .....................................................................27 Conclusions .......................................................................................................................28 Works Cited .......................................................................................................................29
List of Tables
Table 1 - Servo Channels used for Hex Sequencer ..................................................................18 Table 2 - Walking Sequence States ..........................................................................................19
List of Figures
Figure 1 - A bomb manipulator of the German Army with tracks [2]............................................ 3 Figure 2 - Toyota's monopod robot [3]........................................................................................ 4 Figure 3 - Honda's ASIMO bipod robot [4] .................................................................................. 4 Figure 4: Hexapod ..................................................................................................................... 6 Figure 5: System Diagram.......................................................................................................... 6 Figure 6: Servo Brackets............................................................................................................ 7 Figure 7: Hitec HS-645MG Servo ............................................................................................... 7 Figure 8: Force Sensor Construction.......................................................................................... 8 Figure 9 - Ultrasonic transmitter circuit ....................................................................................... 8 Figure 10 - Ultrasonic receiver circuit ......................................................................................... 9 Figure 11 - Ultrasonic ranging .................................................................................................... 9 Figure 12: Parallax Ultrasonic Sensor ........................................................................................ 9 Figure 13: Infrared Sensor ........................................................................................................10 Figure 14: Arduino Mega 2560 ADK..........................................................................................10 Figure 15: Lynxmotion SSC-32 Servo Controller .......................................................................11 Figure 16: Leg Schematic (XY-Plane) .......................................................................................12 Figure 17: Case 1 Leg Schematic (XZ-Plane) ...........................................................................12 Figure 18: Case 2 Leg Schematic (XZ-plane) ...........................................................................13 Figure 19: Servo Leg Joints ......................................................................................................16 Figure 20: Modelling Leg Rotation.............................................................................................16 Figure 21 - Walking Motion using Hexapod Sequencer .............................................................19 Figure 22: Infrared Sensor Schematics .....................................................................................21 Figure 23: Force Sensor Indicator Schematics ..........................................................................22 Figure 24: Actual Leg Position ..................................................................................................23 Figure 25: Modelled Leg Position ..............................................................................................23 Figure 26: Resistance vs. Force ................................................................................................25
iii
1 Introduction
In todays technological society, people have grown accustomed to daily use of several kinds of technology from personal computers to supercomputers, from personal vehicles to commercial airplanes, from mobile phones to communicating through the Internet and everything in between. As such, the use of robots has also become increasingly common. Robots can be used to complete repeated tasks, increase manufacturing production, carry extra weight and many other common tasks that humans do.
1.1.3 Telerobots
Telerobots are pieces of equipment such as a set of arms which are controlled by an operator at a distance. This is helpful in situations where it is hazardous for a human such as in a nuclear power plant setting or where a person of importance cant physically be where they need to be such as a specialist surgeon.
1.2.3.1 One-Legged Robots Toyota developed a one legged robot in 2006 which was revolutionary in that it was able to hop up and down and land stable. This is attributed to the active joint in the toe as well as in the knee and the hip. The 1m tall robot is able to jump 4cm into the air. [3]
1.2.3.2 Two-Legged Robots Two-Legged robots are also known as humanoid robots because humans also walk on two feet and are usually the most human-like. The most famous humanoid robot is probably Hondas ASIMO which first appeared in 2000. It can walk, run, and turn corners all on only two feet. It has been used to encourage students to pursue careers in Science and Engineering. [4]
1.2.3.3 Three or More Legged Robots For better stability over rougher terrain, multiple legs can be used (usually in multiples of 2). Four-legged robots will mimic movements of most mammals while six or more will move more like insects or arachnids. The advantages to these robots over a bipod is that they are statically stable and do not require balancing mechanisms to keep from falling over.
1.3 Hexapod
The hexapod robot has, by definition, six legs and is inspired by insects such as ants and crickets. This gives it the ability to move flexibly across various terrains and, as stated in Section 1.2.3.3, does not require any balancing mechanisms to stand upright. The main purpose for building this robot is to study the motions and movements of an insect. Applications for such a 4
robot include environment exploration, search and rescue, and as a computer numerical control machine.
1.4 Objectives
The objectives for this 3-month term from January to March 2012 are provided in the following list. 1. Design the body and legs. 2. Determine appropriate parts and hardware to order. 3. Build the robot. 4. Calculate inverse kinematics for the leg movements. 5. Program walking functions 6. Program a rising function. 7. Program a climbing function. 8. Test and redesign where appropriate.
2 Hexapod Construction
Figure 4: Hexapod
Our team designed the hexapod as shown in Figure 4. The hexapod is controlled by an Arduino Mega 2560 ADK microcontroller. The microcontroller is serial linked to the servo controller which sends commands to control the servo motors. The front of the robot has two infrared sensors which rotate 90 degrees from straight ahead to their respective sides to scan the front area for obstacles. The front ultrasonic sensor is positioned to detect the height of the hexapod when the robot is standing up. Force sensors are installed on the tip of each leg to let the robot know when its feet are touching something. Two Li-Po batteries are used to supply power to the servo motors. An additional Ni-MH battery is used to power the microcontroller and the servo controller. The system diagram is shown in Figure 5 and detailed parts selection is explained in the rest of this section.
By programming the Arduino to send a small pulse signal through the transmitter, a reflected signal could be detected at the receiver. The delay between the transmitted and received signals can be measured and the distance to the object using the known speed of sound can be calculated as shown in Figure 11.
Unfortunately our group could not get the designed ultrasonic sensor to work (most likely due to an error in the soldering of the board), an alternate ultrasonic sensor kit was ordered from parallax. This sensor kit is configured for easy programming, streamlined integration into Arduino microcontrollers, and the readings are accurate with a distance range of 1cm to 30cm.
10
11
12
Two cases of finding coordinates of joint P1 are considered in our calculation. Case 1: when Pz is greater than coordinates of joint P1 is represented below: , this indicates that joint P1 is below X-axis. The
Case 2: when Pz is less than , this indicates that joint P1 is above the X-axis. The coordinates of joint P1 are represented below: (Same as Case 1)
The law of cosines for the triangle defined by the segments with lengths L13, L12 and L23, states that:
13
The formula for finding 2 applies for both cases. The angle 3 consists of angle and angle for Case 1. In Case 2, additional 90 degrees need to be included in finding angle 3.
The angle 3 is found by following formula: Case 1: Case 2: The angle is also needed in order to determine the position of the servo motor at joint P1. Case 1:
Case 2:
14
After we determined the angles of each leg joints, we need to convert the joint angles to servo positions. The servo controller only takes servo position readings, so we derived the following equations to convert the servo angles:
The analog servo rotates 180 by its rotation range from 500s to 2500s. If the calculated servo position is not within this range then the servo will switch into an idle state in which the position can be random. When the robot is in walking mode, the bad servo position data will cause the robot to collapse suddenly. Therefore we need to set a limit in the program to make sure servo is within the desired range.
15
4 Hexapod Modelling
The robot leg was modelled in 2D using AutoCAD drafting software. The dimension is drawn in the actual scale based on leg dimension measured from the hexapod. We can use the AutoCAD model to verify our inverse kinematics results and configure the physical rotation limit of each leg joint.
The result of the inverse kinematics (IK) calculations is compared with the AutoCAD model. The measurement results in AutoCAD should match the results from our IK equations. First of all, the coordinates of the end effector is measured in AutoCAD. The coordinates are then entered into the calculation program and the program returns the angle of each leg joint.
16
Next, go back to the AutoCAD model and measure the angle of each leg joint to compare with the calculation results. If both measurements match, the calculation has performed correctly in the program. Due to the physical constraint of the leg construction, it was noticed that there are coordinates where the legs are not able to reach but the program still returns calculated leg joint angles. In this case the calculated results will be incorrect. Limits need to be set in the program to prevent such errors from occurring. Multiple leg positions are drawn in the 2D model to reflect the physical limit on each leg joint. By looking at the 2D model, limits can be set on the servo positions to prevent each leg from reaching false positions.
17
0 1 2 3 4 5
Right Rear Vertical Right Rear Horizontal Right Center Vertical Right Center Horizontal Right Front Vertical Right Front Horizontal
16 17 18 19 20 21
Left Rear Vertical Left Rear Horizontal Left Center Vertical Left Center Horizontal Left Front Vertical Left Front Horizontal
18
pushing the entire robot over. As the rest of the tripod ascended above the obstacle, the affected leg would begin moving again. The initial and ending [X, Y, Z] coordinates for each tripod were sent to a function dedicated to calculating the inverse kinematics. This function calculated the servo values to be given to each servo in the legs of that tripod for that particular sub-state.
Figure 21 - Walking Motion using Hexapod Sequencer Table 2 - Walking Sequence States
Tripod State 0 1 2 3 4 5 6 7 Vertical Low Low Low Low to Mid Mid to High High to Mid Mid to Low Low
A Horizontal Front to Center Center to Rear Rear Rear Rear to Center Center to Front Front Front
Tripod Vertical Mid to High High to Mid Mid to Low Low Low Low Low Low to Mid
B Horizontal Rear to Center Center to Front Front Front Front to Center Center to Rear Rear Rear
19
If at least one of the readings of the left infrared sensor is determined to be high but none are found by the right infrared sensor, then the robot is programmed to turn right. If at least one of the readings of the right infrared sensor is determined to be high but none are found by the left infrared sensor, then the robot is programmed to turn left. If at least one high reading is found by both infrared sensors, the robot is programmed to rise up into a high mode. Once in high mode, the robot takes new infrared sensor readings. These readings are to determine if the obstacle directly in front of the robot can be stepped over. If any of the readings return high, the robot lowers down to Low mode and is programmed to walk backwards. The robot is programmed to turned left, right, or walk backwards by altering the horizontal values given to the tripod legs in each walk state. To turn left or right, one of the tripods horizontal values are reversed while the others are kept the same. To walk backwards, both horizontal values are reversed for the walk states. In order to effectively turn or walk backwards, the robot must keep turning/reversing for more than one cycle of states. For this reason, a 'turning' variable is assigned a number of walking state cycles to go through before the walking mode is reset to walking forwards. Infrared inputs are ignored while the robot is turning or walking backwards.
20
The infrared sensor is connected to the Arduino Mega board using the configuration shown in Figure 22.
21
The main purpose of the touch sensors in current design is to keep legs touching obstacles from tipping over the robot. By ignoring all vertical (Z) servo movements that are below the obstacle when the touch sensor is activated, the robot stays in the correct stance. The LEDs were extremely useful for finding errors in the implementation.
22
The result of the Inverse Kinematics Calculation is compared with the AutoCAD model as shown in Figure 24 and Figure 25. The actual leg position is close to the 2D model. We are satisfied with the calculation results. The servo joints on the left side is directly opposite from the right side. When placing the left side servo joint at 0 degrees, the right side joints to set the joints at 180 degrees in order to match the left side. There were offsets between leg joints on the right side. The right side servo joints rotate over 180 degrees. Since the servos we used are not digital servo motors, we cannot calibrate the servo position internally. The only way to get rid of the offset is manually adjust the servo horn positions to eliminate the offset.
23
24
25
26
27
8 Conclusions
Our team has built an autonomous 6 legged robotics walker (Hexapod Robot). The robot is used to study and simulate the walking motion of a 6 legged insect. The hexapod robot consists of 6 legs with 4 degrees of freedom on each leg to allow for better mobility and exceptional range of movement. To achieve autonomous functionalities, we used infrared sensors and ultrasonic sensors for range detection and utilized touch sensors for close obstacle detection. The inverse kinematics calculations were derived to find the angles of each leg joint. A 2D AutoCAD model was created to compare the results with the inverse kinematics calculation. The leg position was measured to match the 2D AutoCAD model and the inverse kinematics system proved to be successful. The hexapod was tested to be able to avoid head-on obstacles by constantly scanning the front area using infrared sensors. The hexapod was able to lift up its body and scan the height of the obstacle to determine if it was able to climb over the obstacle or not. The tripod gait walking method works great on even terrain. Unfortunately, the robot was having trouble climbing over obstacles due to instability when in high mode and underrated servo torques. The force sensors did not perform well and stopped working due to long term usage. Overall, the hexapod has achieved its main objective to autonomously walk and differentiate the size of obstacles to either avoid or climb over. For that reason, this project has been deemed a success.
28
9 Works Cited
[1] Meriam-Webster Inc., "Robot - Deffinition and more from the free Merriam-Webster Dictionary," 2012. [Online]. Available: http://mw1.merriam-webster.com/dictionary/robot. [Accessed 20 March 2012]. [2] RaBoe/Wikipedia, "Bundeswehr Manipulator," 24 March 2012. [Online]. Available: http://commons.wikimedia.org/wiki/File:Bundeswehr_manipulator_04.jpg. [Accessed 3 April 2012]. [3] PROSPECTOR, "Robot Gossip: Jumping Robot Leg," 13 September 2006. [Online]. Available: http://robotgossip.blogspot.ca/2006/09/jumping-robot-leg.html. [Accessed 4 April 2012]. [4] Wikimedia Foundation Inc., "ASIMO," 28 March 2012. [Online]. Available: http://en.wikipedia.org/wiki/ASIMO. [Accessed 4 April 2012].
29