Upload
tan-phat-huynh
View
21
Download
2
Embed Size (px)
Citation preview
Robot Contruction and Testing WorkshopDecember 11, 2016
http://neptune.fulton.ad.asu.edu/VIPLE/
VIPUnity Simulator
Web Simulator
Lego EV3Galileo Robot ASU Edison Robot
pcDuinoRobot
Minnow and Curie Robot
1
pcDuino Robot Construction and TestingIntroduction
pcDuino robots are design to support ASU VIPLE programming environment. Operating system and ASU VIPLE middleware have been installed on the robots.
Hardware specifications
pcDuino3B o Allwinner A20 Dual-core ARM Cortex A7 o 1GB RAM o 8G SD flash o Onboard WiFi moduleo Arduino-compatible slot
Power shield for driving pcDuino3B and servo motors Ultrasonic sensor HC-RS04 x 2 High quality continuous rotation servo motor (5V DC) x 2 7.4V 18650 lithium battery 8.4V battery charger Aluminium robot platform 8.4V battery charger Aluminum robot platform
Software specifications
OS on Robot: Ubuntu 12.04 Programming tool ASU VIPLE program supporting Win7 or later
Exercise 1: Robot Construction
In this laboratory, we will construct pcDuino-based robot using the given robot kit. A video is assembling the robot is available at: https://www. youtube .com/watch?v=2mjQVTMJZtc
The photos of the assembled robot in different angles are given in Figure 1.
Step 1 Chassis assembly
Secure the two servo motors to the chassis with screws Secure the wheels to the servo motors with screws Secure the caster to the chassis with screws
Note: The caster and the two wheels should be at the same height, and you need to add shims if necessary.
pcDuino Robot assembly and testing 2
Step 2: Pallet assembly
Use three copper studs to attach the pcDuino3B to the pallet The Ultrasonic Sensor has been installed on the bracket, so you just need to secure the two ultrasonic
brackets to the pallet Stick the label to a free position of the pallet
Note: The two ultrasonic sensors should be placed at the front and right respectively. Check whether the installation is correct according to the following pictures.
Step 3. Complete Robot assembly
Use two screws to secure the chassis and the pallet together. Note that the caster points to the front. Secure the battery to the caster side with a cable tie as the following picture Secure the charging port of the battery to the pallet with a cable tie as the following picture.
pcDuino Robot assembly and testing 3
Step 4. Wiring
Connect the Power Base Shield to the pcDuino3B Connect the ultrasonic sensor to the Power Base Shield according to the following tables
Connect the servo motors to the Power Base Shield according to the following tables
Connect the battery power output to the Power Base Shield power input Use the following pictures to check your wiring
pcDuino Robot assembly and testing 4
Figure 1. Photos of the pcDuino robot
pcDuino Robot assembly and testing 5
Exercise 2: Configuring Sensors and Motors of the Robot
In the VIPLE program, we need to identify each sensor and each servo (motor) through device configuration, which includes the main Robot, each sensor and each motor. Figure 7 shows the VIPLE code for testing the different type of sensors connected to a robot.
When you drag the Robot service into the Main Diagram, you will choose the connection type. The available types are: Wi-Fi, WebSocket Sever, and Bluetooth. For pcDuino robots, we use Wi-Fi.
First, we will configure the Robot service as shown in Figure 6:
Figure 6. Configure the mina robot
Next, we will add the sensors and motors and configure them. In order for the main robot, the sensors, and the motors to communicate with VIPLE properly, we need to configure the partnership between the main robot and its devices, the IP address (physical or virtual), and the ports. For the pcDuino robots that we use in the course, the configuration is shown in Figure 7.
pcDuino Robot assembly and testing 6
Figure 7. Configure the ports of the distance sensors and the motors
The data needed are summarized as follows:
TCP Port: 8124
IP Address: 10.0.0.1
Partner: My Robot 0
Left Wheel: 0
Right Wheel: 1
Distance Sensor 0 (front): 0
Distance Sensor 1 (side): 1
For connecting your computer to the robot, the robot is implemented as a hotspot router, You can connect to it using:
Hotspot name: pcDuino-xxxx (the last four digital on your robot)
Password: 12345678
Exercise 3: Testing Sensors and Motors of the Robot
Now, we can write a simple program to read the sensor values. Figure 8 shows the VIPLE code for testing the sensors that could be connected to a robot. In our pcDuino robot, we use distance sensors only.
Figure 8. VIPLE code testing different sensors
Next, we can write a simple program to control the robot by keyboard. Figure 9 shows the VIPLE code for testing the motors connected to a robot.
You can add “space” key to stop the robot by giving 0 power to both wheels.
pcDuino Robot assembly and testing 7
Figure 9. VIPLE code testing motors
Now, you will use your programs written for the Unity Simulator as the basis to implement different maze navigation algorithms.
The full course materials, with for 14-hour lectures and 26-hour lab can be freely downloaded at the link:
http://neptune.fulton.ad.asu.edu/wsrepository/viple/
pcDuino Robot assembly and testing 8