Troubleshooting Guide

From Tekkotsu Wiki

Jump to: navigation, search

Contents

Troubles and Remedies

The Create keeps repeating a four-tone melody

Tekkotsu is trying to talk to the robot, but it's charging and not turned on. Unplug the Create charger, then turn the robot on.

Power light glows steady red: Robot won't turn on

Unplug the Create charger.

Power light flickering green: Tekkotsu won't un-stop

Unplug the Create charger.

The Create moves forward on its own

This happens when you accidentally activate one of the built-in demos. Turn the Create off. Then turn it back on, but do not press any other buttons on the robot until after Tekkotsu has started. Once Tekkotsu is talking to the robot, the built-in demos are disabled.

CreateDriver: Still Attempting to Reconnect to Create

The robot is not turned on, or the serial-to-USB cable is unplugged. This message also occurs when the USB-to-serial cable isn't working. Under Ubuntu 10.04 there is a bug in the usbserial device driver that causes it to crash when a device is unplugged and replugged. To fix the driver, run the fix_usb_serial.sh script. It's in /usr/local/Tekkotsu/tools/sbin. Another possible cause is that the cable is bad; this is covered in a later entry (see below).

Warning: sensor events don't seem to be occurring normally.

This error appears when Tekkotsu cannot talk to the Create. Either the Create is not turned on, or the serial cable is unplugged. On robots with an external webcam or additional devices such as a pan/tilt or gripper, the error can also occur if one of those devices is not plugged in or non-functional.

Tekkotsu starts up but the ControllerGUI never connects to it.

This can happen when a previous Tekkotsu instance did not exit normally and is left around as a "zombie". See the zombie section below. Another possibility is that you have a second ControllerGUI running, perhaps in a window that you minimized and forgot about. To kill all ControllerGUIs, type:

   killall -9 java

How do I exit Tekkotsu cleanly?

Normally you can type control-D (the Linux end-of-file character) or the word quit to Tekkotsu, and it will exit. But sometimes this doesn't work, especially if a crash has occurred. In that case you should follow these steps:

  1. Type control-Z to suspend Tekkotsu and return to the shell
  2. Type kill -9 % to kill the suspended job.
  3. Hit the Enter key one more time to confirm that the job has been killed.

Failure to follow these steps could leave you with a zombie.

What are zombies and how do I kill them?

A zombie is a Tekkotsu instance that should have terminated but didn't. A zombie can tie up devices such as the camera or serial port, which prevents Tekkotsu from functioning normally. To check for zombies, type the following in the shell:

   ps -A | grep tek

To kill all Tekkotsu jobs, including any zombies, type:

   killall -9 tekkotsu-CREATE   (or whatever version of Tekkotsu you are using)

There are no camera images.

The camera is /dev/video0 on a basic robot; it may be /dev/video1 on robots with a separate pan/tilt and webcam. Tekkotsu cannot get access to this device if a previous Tekkotsu instance is still active and has it open. See the zombie section for how to check for and kill zombie jobs.

Another possibility is that the camera is not being turned on during boot. To fix this, go into the BIOS setup dialog (hold the F2 key during power-up) and go to Advanced, then Onboard Devices Configuration, then Onboard Camera, and set it to Enabled. Then hit F10 to save and exit. You only need to do this once.

A final possibility is that the camera driver has been set to the wrong device path. Type set in the Tekkotsu console window and verify that the value of Drivers.Camera.Path is /dev/video0.

The robot doesn't move.

  1. Verify that the robot is powered on and the battery is charged. You can do this by turning the robot off and then on again. It should give a short beep and the LED should flash red-and-green for a couple of seconds and then go solid green, or turn off if Tekkotsu is running. If the power LED glows yellow or red, the battery is low.
  2. Verify that Tekkotsu's Emergency Stop mode is off. The indicator in the lower left corner of the ControllerGUI should be green, not red, and the button in the lower right hand corner should say "Stop", not "Un-Stop".
  3. Make sure the cables connecting the notebook to the Create are firmly plugged in at both ends.
  4. Make sure that the Create is not in safe mode when you power it up. It should be resting on a flat, stable surface, such as the floor or a tabletop, not sitting in your lap.

Tekkotsu can't read the bump sensors or switches.

  1. In the ControllerGUI menu, go to Root Control > Status Reports > Event Logger and select buttonEGID. Then press one of the Create's switches or bump sensors, but do not lift the robot off the table or it will enter "safe mode". You should see button press events reported on the Tekkotu console (terminal window). If not, see the following steps.
  2. Verify that Tekkotsu's Emergency Stop mode is off. The indicator in the lower left corner of the ControllerGUI should be green, not red, and the button in the lower right hand corner should say "Stop", not "Un-Stop".
  3. Make sure the cables connecting the notebook to the Create are firmly plugged in at both ends.
  4. Make sure that the Create is not in safe mode when you power it up. It should be resting on a flat, stable surface, such as the floor or a tabletop, not sitting in your lap.

The USB-to-serial cable is having problems.

If the cable is firmly plugged in at both ends, but you're still getting device errors, it's possible that the cable is defective. To check this, unplug the cable from the ASUS, wait a few seconds, plug the cable back in, and type "dmesg" to the shell to display recent system messages. A normal cable will generate output something like the following. (The exact messages might differ, depending on the brand of cable you're using.)

   $ dmesg
   usb 2-1: new full speed USB device using uhci_hcd and address 18
   usb 2-1: configuration #1 chosen from 1 choice
   usbcore: registered new interface driver usbserial
   usb-serial.c: USB Serial support registered for generic
   usbcore: registered new interface driver usbserial_generic
   usb-serial.c: USB Serial Driver core
   usb-serial.c: USB Serial support registered for pl2303
   pl2303 2-1:1.0: pl2303 converter detected
   usb 2-1: pl2303 converter now attached to ttyUSB0
   usbcore: registered new interface driver pl2303
   pl2303.c: Prolific PL2303 USB to serial adaptor driver

A defective cable will generate messages like this:

   $ dmesg
   usb 2-1: new full speed USB device using uhci_hcd and address 19
   usb 2-1: device descriptor read/64, error -71
   usb 2-1: device descriptor read/64, error -71
   usb 2-1: new full speed USB device using uhci_hcd and address 20
   usb 2-1: device descriptor read/64, error -71
   usb 2-1: device descriptor read/64, error -71
   usb 2-1: new full speed USB device using uhci_hcd and address 21
   usb 2-1: device not accepting address 21, error -71
   usb 2-1: new full speed USB device using uhci_hcd and address 22
   usb 2-1: device not accepting address 22, error -71

Fortunately, USB-to-serial cables are inexpensive, so if yours is giving device errors, just buy another one. We recommend buying the iRobot cable.

The robot can't see the markers I made for it.

If your markers are AprilTags, make sure the robot is close enough to the tag that it can get a good view. Use the RawCam viewer to check what the robot is seeing. Run the AprilTest demo (in Root Control > Framework Demos > Vision Demos > AprilTest) to verify that tag detection works.

If you are using bicolor markers: turn on the SegCam viewer in the ControllerGUI and check that the color segmenter is recognizing the marker colors properly. A common problem is specular reflection from shiny marker material, which causes the marker to appear white instead of its natural color.

See the article on ASUS Camera Settings for advice on adjusting the camera parameters.

Tekkotsu's color threshold file has been carefully tuned to give good performance for pink, blue, green, orange, and yellow, but if you need to recognize other colors or just the boundaries of the color regions, you can use the EasierTrain tool to create your own color threshold file.

How-Tos

How do I test my Create/ASUS robot?

1. Verify that the white serial cable is plugged into the robot, and the other end is securely attached to the silver serial-to-USB converter cable. The other end of the converter cable should be plugged into the notebook's USB port.

2. Turn on the Create. The power button should flash red-and-green for a few seconds and then turn steady green.

3. Start Tekkotsu on the notebook by clicking on Accessories, launching a Terminal window, and typing:

         cd ~/project
         ./tekkotsu-CREATE

The notebook should play a beeping sound when Tekkotsu starts up. Then launch a second terminal window and type:

         ControllerGUI localhost

4. Click on the RawCam button in the ControllerGUI and verify that you get a camera image.

5. Click on the "Un-Stop" button in the bottom right corner of the ControllerGUI.

6. Click on the "W" button in the Teleop row in the ControllerGUI and use the Walk Remote Control to move the robot around a bit.

7. In the ControllerGUI menu, go to Root Control > Status Reports > Event Logger and select buttonEGID. Then press one of the Create's switches or bump sensors, but do not lift the robot off the table or it will enter "safe mode". You should see button press events reported on the Tekkotu console (terminal window).

How do I update my Tekkotsu software?

You can update your software using cvs. You need to update both the master copy in /usr/local/Tekkotsu and any user project directories, such as the one in /home/user/project. See Create/ASUS Software Updates for instructions.

Note: when you do a cvs update, it will print a list of files and directories. For each file, the letter in column 1 of the line indicates the nature of the update: "P" means the file was patched, "U" means it was updated (similar to patched), "M" means the file had local modifications, and "?" means it's a local file not in cvs. All those are fine. But if the first letter is "C", there's a problem you will have to fix. (This should not occur unless you have been modifying framework files yourself.)

The "C" indicates that a conflict was found when updating the file. Conflict lines are set off in the file by "<<<<<<<" and ">>>>>>>>" markers, with a "=======" line in between the two sets of lines that could not be reconciled. The easiest solution is to just delete the file and redo the cvs update. It is also possible to resolve the conflict manually by comparing the code in the two sections and deleting anything that doesn't belong, including the conflict marker lines. If you don't do this, the file will not compile. But for conflicts in the Tekkotsu source code, it's safer to just delete the file and repeat the update.

How do I adjust camera gain, contrast, etc.?

Tekkotsu provides access to the camera controls for the ASUS notebook or any V4L2-compatible webcam. In the Tekkotsu console window, type set Drivers.Camera to see a list of camera controls. Type set Drivers.Camera.QueryOptions=true to see a list of allowable values for each option. Then type, for example, set Drivers.Camera.Contrast=10 to set the camera contrast to 10. For more information, see ASUS Camera Settings.

Compilation Issues

Cannot create ... Permission denied

This occurs either because some files in the user's project directory are (incorrectly) owned by root, or the Tekkotsu framework in /usr/local/Tekkotsu was updated but not properly recompiled. To fix a file ownership problem, see the Linux Tips article. To recompile the framework properly, see the Software Updates article.

Error: expected primary-expression before '<<' token

Check that line of the file. If you see a string that looks like '<<<<<<' then a cvs update has gone wrong. If the file is part of Tekkotsu, the easiest solution is to just delete it and do another cvs update, which will give you a clean version from the repository.

One or more PCH files were found, but they were invalid

This indicates that your compiler version or compiler settings have changed, and the previous pre-compiled headers (PCH) files can no longer be used. Do a "make clean" in /usr/local/Tekkotsu/project to erase these files and then do a "make" to rebuild Tekkotsu. You may also need to do the "make clean" in user project directories.

Other Compilation Problems

If you're getting compilation errors for files you didn't write yourself, it's possible that the dependency files used by "make" were messed up by a previous error you've since corrected. If you run the make again and the problem doesn't resolve, then you may be able to fix things by cleaning the project build directory. Follow these steps:

cd ~/project
make cleanProj
make -j2