Difference between revisions of "Jetson/Tutorials/Using the SCOL Robot"

From eLinux.org
Jump to: navigation, search
(Recharging the batteries on the robot: Added some minor info about recharging LiPo's.)
(To charge the LiPo "logic" computer batteries: Changed formatting & rephrased the balanced charge section)
Line 26: Line 26:
  
 
=== To charge the LiPo "logic" computer batteries ===
 
=== To charge the LiPo "logic" computer batteries ===
(Note: It is recommended that you do a balanced charge of LiPo battery packs, in order to ensure longer battery life, however the following instructions are for a simpler un-balanced charge, to support battery packs that don't have the small connectors to individual battery cells).
+
''(Note: It is normally recommended that you do a "balanced" charge of LiPo battery packs, by setting your battery charger to Balanced mode and plugging in the small connector with wires to each individual cell, to ensure each individual longer battery life. However the following instructions are for a simpler "unbalanced" charge, since it will also work for battery packs that don't have the small connectors to individual battery cells).''
 +
 
 
Disconnect the LiPo battery pack from the robot (using one of the 4-pin connectors behind the robot) and plug the red & black clips from the charger to the red & black (or maybe yellow & black) wires of the LiPo battery connector. Then attach 12V to the battery charger to turn it on (such as using the Jetson TK1 power supply with the 2.5mm to 2.1mm DC barrel adapter I built) and change the charging mode to LiPo and the current to 0.7A. Then hold down the start button for a few seconds to start the battery charging. It will take around 1 or 2 hours, then beep to say it is finished. Then you can remove the charger clips and connect the battery back to the robot. Now when you turn the robot on (silver switch), the voltage display on the front of the robot should show a high voltage (around 13V) because it is newly charged.
 
Disconnect the LiPo battery pack from the robot (using one of the 4-pin connectors behind the robot) and plug the red & black clips from the charger to the red & black (or maybe yellow & black) wires of the LiPo battery connector. Then attach 12V to the battery charger to turn it on (such as using the Jetson TK1 power supply with the 2.5mm to 2.1mm DC barrel adapter I built) and change the charging mode to LiPo and the current to 0.7A. Then hold down the start button for a few seconds to start the battery charging. It will take around 1 or 2 hours, then beep to say it is finished. Then you can remove the charger clips and connect the battery back to the robot. Now when you turn the robot on (silver switch), the voltage display on the front of the robot should show a high voltage (around 13V) because it is newly charged.
  

Revision as of 18:59, 29 July 2014

Using the SCOL "Super-Computer-On-Legs" robot

Recommended sequence of events to activate the SCOL robot demo:

  • hold the robot up straight in the air,
  • turn on the silver switch (for power to the computers),
  • wait for the robot to beep (showing that the motors are initialized),
  • turn on the red switch (for power to the motors),
  • put the robot down on a flat surface,
  • wait a few minutes for the Jetson TK1 to boot up the Ubuntu OS and for it to automatically start running the robot face-following demo.

The webcam's blue lights will turn on when the camera is running, and the 2 green LEDs (at the robot's waist) will both come on while it is loading the face detector. After several seconds the 2 green LEDs will turn off and the robot will beep to signal that it is going to start walking.

Whenever a face is detected, 1 or 2 of the green LEDs will come on to indicate that it will soon start turning in that direction, or both LEDs will be off if no face is detected for a few seconds.

The robot demo runs for a few minutes then stops, in case you want to log into the robot to view or modify it.

NVIDIA SCOL robot

You can also see a Video of the "Super-Computer-On-Legs" SCOL robot.


Recharging the batteries on the robot

There are 2 battery packs in the robot: one that says "NiMh" (made from 5 x AA batteries) for the motors, and one that says "LiPo" for the computers. Smart battery chargers such as the Turnigy Accucell-6 for $23 (download the User Manual) can charge both types of battery packs, but it will only do one type at a time, and you need to change the settings in the charger to switch to a different type.

To charge the NiMh "servo" motor batteries

Disconnect the NiMh battery pack from the robot (using one of the white 2-pin connectors behind the robot) and plug the red & black clips from the charger to the red & black wires of the NiMh battery pack (inside the white connector). Then attach 12V to the battery charger to turn it on (such as using the Jetson TK1 power supply with a 2.5mm to 2.1mm DC barrel adapter) and change the charging mode to NiMh and the current to 0.7A. Then hold down the start button for a few seconds to start the battery charging. It will take around 3 or 4 hours, then beep to say it is finished. Then you can remove the charger clips and connect the battery back to the robot.

To charge the LiPo "logic" computer batteries

(Note: It is normally recommended that you do a "balanced" charge of LiPo battery packs, by setting your battery charger to Balanced mode and plugging in the small connector with wires to each individual cell, to ensure each individual longer battery life. However the following instructions are for a simpler "unbalanced" charge, since it will also work for battery packs that don't have the small connectors to individual battery cells).

Disconnect the LiPo battery pack from the robot (using one of the 4-pin connectors behind the robot) and plug the red & black clips from the charger to the red & black (or maybe yellow & black) wires of the LiPo battery connector. Then attach 12V to the battery charger to turn it on (such as using the Jetson TK1 power supply with the 2.5mm to 2.1mm DC barrel adapter I built) and change the charging mode to LiPo and the current to 0.7A. Then hold down the start button for a few seconds to start the battery charging. It will take around 1 or 2 hours, then beep to say it is finished. Then you can remove the charger clips and connect the battery back to the robot. Now when you turn the robot on (silver switch), the voltage display on the front of the robot should show a high voltage (around 13V) because it is newly charged.

Troubleshooting the SCOL "Super-Computer-On-Legs" robot

The SCOL robot contains:

  • a Jetson TK1 board,
  • an Arduino microcontroller board,
  • a small GPIO interface board for communication between the Jetson & Arduino,
  • a LynxMotion BRAT robot kit (including the Arduino microcontroller & servo motors).
  • a "logic" LiPo battery pack for the Jetson + Arduino + GPIO boards (with a silver switch),
  • a "servo" NiMh battery pack for the robot's motors (with a red switch).

When you turn the silver switch on, you should hear the robot beep within a few seconds, indicating that the Arduino microcontroller has booted up.


If the robot DOESN'T beep within a few seconds of power-up

If there aren't any beeps at all within seconds of the silver switch turning on, then something is wrong with the Arduino microcontroller. A small red LED on the microcontroller board should be on, indicating whether the Arduino is running.

0) If the microcontroller's LED is OFF: Then the Arduino microcontroller board is not being powered, so check that a LiPo "logic" battery is plugged in and is atleast 10V (view it on the voltage display on the top-front of the robot or use a DMM / voltmeter), and that the "VL" & "GND" wiring from the battery through the silver switch to the microcontroller board is not loose or damaged. Also make sure the black inline connector for microcontroller power behind the robot is connected properly, otherwise the Arduino microcontroller won't be getting power.

1) If the microcontroller's LED is ON: Then the microcontroller is getting power so there is some other problem with the microcontroller, such as the Arduino ATMEL chip being damaged or the firmware being overwritten. You will need to attach the Arduino board to a computer (using the USB mini-B port on the board) to see if it is outputting anything to the Serial port (sent through the USB cable). If nothing is being written to the Serial port, then the ATMEL chip is probably dead (due to a short-circuit or loose-circuit or static electricity or over-voltage, etc), so you will need to replace it with the same ATMEL chip (eg: ATMEGA32), flash the Arduino bootloader onto it (only needed if you replace it with a plain ATMEL chip instead of a pre-flashed Arduino chip), then upload the SCOL robot Arduino code onto it through USB.


If the robot DOES beep within a few seconds of power-up

A) Jetson TK1 does not have power: This is very possible, since it could be a loose power cable or loose power connector or a damaged Jetson TK1 or dead batteries or the computer is simply in the OFF state. The Jetson TK1 has a very small green LED (top-left corner of the SCOL robot) that is always on while the Jetson TK1 is running. If this tiny green LED is on then the Jetson TK1 is running, but if it is off then either the Jetson TK1 does not have power (between 9.5V - 13.5V) or it is shutdown (try pressing the small "Power" button on Jetson TK1 in the top-left corner of the SCOL robot near "Reset" & "Recovery" buttons). Also, the robot has a power display that switches between voltage reading & current reading. If it shows a voltage between 9.5 to 13.5 V then the "logic" battery has enough charge, but if it is lower or higher then the "logic" battery has a problem.

B) Jetson TK1 is not running the SCOL robot code upon bootup: This is unlikely to happen if it was working fine before, but it is possible that the USB webcam is unplugged, or for example, the OS does not boot anymore due to a software crash or disk corruption. Try opening a shell command terminal on the robot's Jetson TK1 (using USB or Ethernet or Wifi) and executing "/home/ubuntu/SCOL_Robot/run_SCOL_Robot_Headless" to start the robot code manually. You should see the blue lights on the webcam come on and then the 2 green LEDs (in the waist of the robot) come on, indicating that it is initializing the face detection code, and then after some seconds it should start detecting faces and showing the left or right LED when it is going to turn left or right or walk straight.

C) The SCOL robot is not detecting faces: This could be because the SCOL robot code is not running (as mentioned above in section B) or because the USB webcam is not plugged in or is damaged. Try opening a shell command terminal on the robot's Jetson TK1 (using USB or Ethernet or Wifi) and executing "/home/ubuntu/SCOL_Robot/run_SCOL_Robot_GUI" to start the robot code manually and see the output on a HDMI monitor or remote desktop. You should be able to see the camera stream as well as 2 white lines indicating the left & right regions, and then when a face is detected it should show a green rectangle around it (or a white rectangle around it if it is in CPU mode instead of GPU mode).

D) The SCOL robot's GPIO electronics are misbehaving: When the robot detects a face to the left or right side, it should light up the corresponding 1 or 2 green LEDs (in the waist of the robot) to show it can see a face. Execute "run_SCOL_Robot_GUI" (as mentioned above in section C), if you see that faces are detected but the 2 green LEDs don't change when a face is detected, then there is something wrong with the GPIO board. This board converts the 1.8V signal from Jetson TK1 to a standard 5V signal for the Arduino, and also lights up 2 LEDs to show the signal state. So either the red & black power wires for the GPIO board are disconnected, or the blue & green GPIO wires to the Jetson TK1 header are disconnected, or the GPIO board is damaged (eg: one of the black transistors has been zapped).

E) The robot is constantly beeping: This indicates that the "logic" batteries need recharging. You should turn off the robot and recharge the "logic" LiPo battery pack to ensure it is roughly 11-12V.

F) The robot is detecting faces & beeping but it isn't walking: If the motors aren't moving at all then the red switch (on the top-right of the robot) is probably turned off or there is a loose wire connection between the servo NiMh battery pack to the red switch or to the 2 "VS" servo power pins on the Arduino microcontroller board. Or the servo motor batteries need recharging. If the motors are moving but not by much then the servo motor batteries probably need recharging.

G) The robot is changing motions when a face is left or right or straight, but it is not walking properly or is falling over: This will happen if the robot is not on a suitable surface. The legs are made using the cheapest robot kit available, and the leg motions are very simple Arduino scripts that don't read any sensor data at all, so the robot will only be able to walk on some surfaces. If the surface is too slippery or too sticky then it often will fall, or if it is not flat & horizontal, or if it is soft or cushioned, then it will probably also fall. So it is best to put it on a hard wooden or plastic or tiled surface, and if it falls over a lot then try different surfaces, and possibly add or remove electrical tape to the bottom of the robot's feet to increase or decrease the grip. If the robot was walking fine on your surface but is now often falling then the "servo" battery pack probably needs recharging, since the robot won't have enough strength to walk properly when the servo motor batteries are low.