Troubleshooting Checklist for the Tekkotsu Planar Hand-Eye System David S. Touretzky version 1.1; January, 2009 Step 1. Make sure the computer can see the USB devices. In response to an lsusb command you should see these two entries, and probably several others: % lsusb ... Bus xxx Device yyy: ID 046d:0990 Logitech, Inc. Bus xxx Device yyy: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC ... The first of these is the Logitech webcam. The second is a USB-to-serial-bus module that allows the computer to talk to the Dynamixel servos. The module is attached to the back of the mast. You will see additional USB devices listed if your computer has a USB keyboard, mouse, speakers, or disk drive. TROUBLESHOOT: if you don't see the webcam or the FTDI module, check that your USB cable connections are secure. Step 2. Make sure the USB interface can see the servos. The dynamixel_util program can be used to query the servos and confirm that they are visible on the serial bus. To use it, put /usr/local/Tekkotsu/tools on your search path. If you haven't run it before, you'll need to compile it first: % cd /usr/local/Tekkotsu/tools/dynamixel_util % make A successful query of the servos looks like this: % Dynamixel scan 1-5 Opening comm port...done! Servo 1: AX-12 detected Servo 2: AX-12 detected Servo 3: AX-12 detected Servo 4: AX-12 detected Servo 5: AX-12 detected Here is the mapping of joints to the servo ids: Joint Name Servo ID ARM:shldr 1 ARM:elbow 2 ARM:wrist 3 NECK:pan 4 NECK:tilt 5 TROUBLESHOOT: - If no servos are visible, check that the a/c power adapter is plugged in to the wall, and that the other end is plugged in to the USB-serial interface module on the mast. - If some but not all servos are visible, check that all servo cables are plugged in and firmly seated. - Some servo cables are actually two cables mated together with a little three-prong male-male adapter. If you disconnect a cable to do maintenance on the arm, and reconnect the two halves incorrectly, this will short out the cable and no servos will be visible. When two servo plugs are correctly joined, they are asymmetric, i.e., the three holes in the back of the plug will face up on one plug and down on the other. - If you use dynamixel_util to change the servo IDs (not a good idea), you can render the arm inoperable. If two servos are assigned the same ID, they will collide when queried, and neither will be visible on the bus. The only way to fix this is to disconnect one servo and change the ID of the remaining one. Note that if you have to replace a damaged servo, new servos (available for $45 from Trossen Robotics or CrustCrawler) always have an ID of 1. But if you use servos from a Bioloid kit, each servo will have a unique ID, which will be marked on the servo. Use dynamixel_util to change the ID. Step 3. Make sure Linux sees the USB-to-serial device correctly. % ls -l /dev/ttyUSB* crw-rw---- 1 root dialout 188, 0 2009-01-24 22:42 /dev/ttyUSB0 TROUBLESHOOT: - If you don't see any /dev/ttyUSB device, you may not have the driver installed. It appears to be standard on Linux systems but has to be installed specially on Macs. - If you see /dev/ttyUSB1 where you normally see /dev/ttyUSB0, what probably happened is that the USB-to-serial interface module was momentarily disconnected from the computer (loose USB cable), and when it reconnected, the computer assigned it a different device descriptor. One way to correct the problem is to simply unplug the module's USB cable for a bit, perhaps 10 seconds. Then plug it back in and it should come back as /dev/ttyUSB0. The other approach is to just tell Tekkotsu to use /dev/ttyUSB1 for the serial port for now, which can be done by typing "set CommPorts.Serial.Path=/dev/ttyUSB1" to the HAL:HandEye> prompt. (HAL is the Hardware Abstraction Layer.) Step 4. Make sure Linux sees the webcam correctly. % ls -l /dev/video* crw-rw---- 1 root video 81, 0 2009-01-24 22:31 /dev/video0 TROUBLESHOOT: - If you don't see any /dev/video device, your computer might not have the uvcvideo device driver installed. You can get it from here: http://linux-uvc.berlios.de/#download - If you see /dev/video1 but you normally see /dev/vide0, what probably happened is that the webcam was momentarily disconnected from the computer (loose USB cable), and when it reconnected, the computer assigned it a different device descriptor. One way to correct the problem is to simply unplug the webcam for a bit, perhaps 10 seconds. Then plug it back in and it should come back as /dev/video0. The other approach is to just tell Tekkotsu to use /dev/video1 for input for now, which can be done by typing "set Drivers.Camera.Path=/dev/video1" to the HAL:HandEye> prompt. - To test your webcam to see if it's working, use luvcview, which you can get here: http://packages.ubuntu.com/hardy/x11/luvcview Step 5. Exercise the camera and servos. Run tekkotsu-HANDEYE and start a ControllerGUI. Click on RawCam in the ControllerGUI window to get a camera image. Click on the "H" to pop up a Head Remote Control, and try moving the camera around. Verify that when the red command dot is in the center of the window, the camera is pointing straight out at the horizon. Moving the dot to the left (click and drag) should pan the camera to the left; moving the dot up should tilt the camera up. Click on the "A" to pop up an Arm Remote Control, and try moving the arm around. Alternatively, go to Root Control > File Access > Posture Editor and set individual joint angles that way. TROUBLESHOOT: - If Tekkotsu can't access /dev/video0 or /dev/ttyUSB0, but the devices exist, there could be a permissions problem. You may have to modify /etc/group to put the user into the group that owns the device. A short-term fix is to "sudo chmod ugo+rw /dev/video0", which will work until the device is disconnected or the machine is rebooted. - Another reason Tekkotsu might not be able to access these devices is if another Tekkotsu process has them locked. Do "ps -A | grep tek" to check for this, and kill any lingering processes. - If a joint rotates the wrong way, the servo could be installed backwards, or Drivers.Dynamixel.Servos.nnn.InvertRotation could be set to the wrong value. These values are set in the project/defaults/hal-HandEye.plist file. Make sure that this file exists in project/defaults, and that there is no file with the same name in the project directory. which would override the default. ================ If the system passes the above 5 steps, it is fully functional.