Friday, December 16, 2011

ssh refused to visit

If you got this problem ,first check if both computers have installed ssh.
This stupid problem wasted me few hours.

vncviewer: keyboard mapping problem

If you encounter a problem of keyboard mapping when you use the vncviewer,
the solution is to add "export XKL_XMODMAP_DISABLE=1" to the file "~/.vnc/xstartup"  on the server which looks like:



xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

Of course, you have to restart xserver to implement the changes.

Opencv 2.3 on Ubuntu 9.10

The ubuntu 9.10 is not supported by ubuntu community any more. To use apt-get,
you have to manually edit "/etc/source.list" file and replace "archive" with "old-release".

The Opencv 2.3 need a cmake 2.8, buth ubuntu 9.10 only has cmake 2.6, so when you compile the opencv 2.3 the cmake gives you errors and warnings such as "incompletely configuration".

What you need to do is downlad cmake 2.8 and install it.

Wednesday, December 14, 2011

URG-04LX-UG01 problems and solutions

Recently our group got a urg laser which has a usb connector. It took me about two days to figure following problems out:
1. Power. The laser comes with a dual usb connector. From the urg website, it says the urg needs two usb port to get enough power (>500mA). I have tried every pairs of usb port. Neither of them work. The possible reasons are: the laser is damaged, the cable doesn't work, or the power from pc usb is not enough. I simply use a single usb connector from my mp3 to replace the dual usb port, then the laser is surprisingly working!! What can I say. Dual port don't work, single port works fine! If you have similar problem, then you can try this solution.

2. Library. Now the laser can work well with XP system after installing the driver. However, the library got some problems when I compile them, such as can no reference to 'floor'. I google the solutions and find one nice patched urg library which works fine for Ubuntu oneiric: You can download the tarball of the urg library and compile it. That works great on my ubuntu machine.

3. Urg program samples. The sample programs also get some problems, such as "undefined reference to" blabla. The solution is very simple: rewriting the Make file (for C++ urg_sample) as : CXXFLAGS = -g `urg-config --cflags` `sdl-config --cflags` LDFLAGS = `urg-config --libs` `sdl-config --libs` LDLIBS = -lc gdScanSample: gdScanSample.cpp g++ -o gdScanSample gdScanSample.cpp $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) clean : $(RM) *.o $(TARGET) .PHONY : all clean

Now, everything works perfectly. Enjoy!