Hello,

#. I am not sure about your compilation command, I have used this and it works !         

g++ -o laserobstacleavoid `pkg-config --cflags playerc++` laserobstacleavoid.cc `pkg-config --libs playerc++`


#. Which tutorial did you follow for an Ubuntu 12.04 installation ? I always recommend this one,

http://www.cnblogs.com/kevinGuo/archive/2012/05/03/2480077.html

Regards,

Arkapravo