|
From: Stephen S. <rad...@gm...> - 2008-11-07 21:44:43
|
Hi, Okay I finally got around to spending a day playing with libnifalcon. (hurrah!) I had some build issues first... But finally I managed to write an additional "sub program" for falcon_test_cli which presents a touchable cube surface. This adds a nice basic test for the device motors and position reading within a feedback loop. First of all, the build problems. I've attached several patches to this email which resolved them for me, but I can't be sure these are the "right" solutions but they worked for me. Anyways, I'll just list them: 1) I got errors including "gmtl/gtml.h". I had to add /falcon to the include path. 2) Got some segfaults during initialization with libftdi. I found a couple bugs in the device list iteration. 3) If I forgot to specify --libftdi the test_cli program crashed on me, so I added an error condition for when no communication method is specified. I guess this should be done with a proper default instead, but it would depend on what was compiled it. I'm sure it could be done. 4) When I saw my bad timing with --loop_time_test (10!), I decided to download libusb-1.0 and compiled it without problems. I usually use ~/.local for installing locally compiled things, so I had to figure out how to instruct cmake to find it. But even when CMake found it, I still got errors related to "libusb-1.0/libusb.h". The solution I found was to make sure that LIBUSB_1_INCLUDE_DIR is added to the list of include_directories, and to change "libusb-1.0/libusb.h" to just "libusb.h", since the LIBUSB_1_INCLUDE_DIR points to the libusb-1.0 dir. The fifth patch just contains the cube subprogram, which works for me. Hope this is useful. I should mention this was all on Ubuntu 8.10. My --loop_time_test reports 3 now, which still isn't ideal, but at least I can present a stable surface with a stiffness of 5. Steve |