Anda di halaman 1dari 3

Make the Robot Move

Robot Details
The robot is a Wild Thumper 4WD all terrain platform. It is equipped with its own controller and motor drivers manufactured by Dagu electronics. This controller is pre-programmed and will be controlled using a separate Arduino using a serial interface. The claw of the robot extends past the sonar sensor as shown in Figure 1.

Figure 1 - Wild Thumper Robot

Course Layout
The layout of the course is shown in Figure 2. The robot will start facing the 150mm deep box, placed a random distance away. A cone will be placed on an arc of 3.5m radius, measured from a centre point 500mm in front of the box.

Figure 2 - Course Layout

Specific Objectives
The robot will need to: Approach the box and stop Deliver the ball into the box o The ball needs to make contact with any part of the box o No part of the robot may touch the box Rotate until the robot is facing the cone o It is recommended that the robot first move to the centre of the arc before rotating, such that the cone is a known distance away regardless of its position along the arc o The sonar sensor should be attempting to detect an object in some distance range in which the cone is expected to be o The sensor will detect the cone when it enters the detection band, well before it is directly in front of the robot Approach the cone and stop nearby o The robot needs to come to a controlled stop such that some part of the robot is within 300mm of the cone

Optional Objective
For a challenge, the above objectives should be completed without any wheels of the robot crossing the marked line, 500mm away from the box. Thus it will not be possible to simply drop the ball into the box and some other delivery method will need to be used, noting that the ball is soft and will not roll along the ground. The main objectives will need to be completed successfully before an attempt can be made at repeating the course for an optional objective run. If the robot then completes the course and the optional objective successfully a +10% bonus will be awarded.

Controlling the Robot


Movement The robot does not have steering, however the left and right motors can be powered independently, thus allowing the robot to turn like a tracked vehicle; by spinning each set of wheels in a different direction. The movement will be controlled by sending serial input to the on board controller. This input will be sent through a single wire connected to the Arduinos TX pin: digital pin 1. The serial environment will need to be activated in the setup call of the code as follows. void setup() { Serial.begin(9600); } To move the robot the goRobot function will need to be called. The function accepts 4 inputs Left direction o 0 is forward, 2 is reverse Left speed o A value between 0 and 255, where 255 is full speed o The robot will not move for values less than 60 o 100 is a fairly safe travelling speed Right direction Right speed

The function will be added to the end of the code during the tutorial and is called as follows. goRobot(0,128,0,128); This will make the robot go forward at roughly half speed. Similarly to stop the robot the stopRobot function can be called: stopRobot(); These functions need only be called once and the robot will continue to move in the specified manner until another move or stop function is called. Gripper Arm The gripper arm or claw of the robot is controlled by a servo, which will be connected directly to the Arduino. The servo code can be modified from the example code found in: Examples>Servo>Sweep. The following points should be noted when dealing with the gripper arms servo: is the fully open position is the fully closed position o This can vary between robots, experiment and use the smallest possible value that still grips the ball firmly o The servo should ideally not vibrate or hum once in the closed position The claw should not be closed by setting its position to immediately, instead it should be closed slowly in a similar method to the sweep example mentioned above The claw should be opened in a similar controlled manner o For the optional objective, opening the claw as quickly as possible may be desired and the claw servo can be written to the open position immediately to get achieve this.

Anda mungkin juga menyukai