Using player 2.0.5 and writing my own plugin driver. I have written 2 others that load just fine, so I don't think it's a path issue.
my puma.cfg file:
DRIVER_SRC = PumaDriver.cpp PumaBody.cpp PumaMotor.cpp base_manipulation.cpp serialPort.cpp
DRIVER_INC = PumaDriver.h PumaBody.h PumaMotor.h base_manipulation.h serialPort.h silvermax_commands.h
All: $(DRI_SRC) $(DRI_INC)
g++ -Wall -Wextra -g3 -fpic `pkg-config --cflags playercore` -c $(DRIVER_SRC)
g++ -Wall -Wextra -nostartfiles -shared -rdynamic -o libPumaMotorDriver.so PumaDriver.o PumaBody.o PumaMotor.o serialPort.o base_manipulation.o
cp *.so /usr/local/lib
rm -f *.o *.so
rm -f *.o *.so
It does create the libPumaMotorDriver.so file, but when I use the command player puma.cfg, I get these messages:
diane@dianelaptop:~/puma/pumasvn/player-2.0.5/PumaDriver$ player puma.cfg
* Part of the Player/Stage/Gazebo Project [http://playerstage.sourceforge.net].
* Copyright (C) 2000 - 2006 Brian Gerkey, Richard Vaughan, Andrew Howard,
* Nate Koenig, and contributors. Released under the GNU General Public License.
* Player comes with ABSOLUTELY NO WARRANTY. This is free software, and you
* are welcome to redistribute it under certain conditions; see COPYING
* for details.
trying to load /home/diane/puma/pumasvn/player-2.0.5/PumaDriver/./libPumaMotorDriver.so...
trying to load /usr/local/lib/libPumaMotorDriver.so...
trying to load libPumaMotorDriver.so...
error : error loading plugin: libPumaMotorDriver.so
error : failed to load plugin: libPumaMotorDriver.so
error : failed to parse config file puma.cfg
The contents of the .player file are
plugins.cc:147 trying to load /home/diane/puma/pumasvn/player-2.0.5/PumaDriver/./libPumaMotorDriver.so...
plugins.cc:151 failed (file not found)
plugins.cc:161 trying to load /usr/local/lib/libPumaMotorDriver.so...
plugins.cc:166 failed (file not found)
plugins.cc:174 trying to load libPumaMotorDriver.so...
plugins.cc:178 failed (file not found)
plugins.cc:183 error : error loading plugin: libPumaMotorDriver.so
configfile.cc:2070 error : failed to load plugin: libPumaMotorDriver.so
server.cc:152 error : failed to parse config file puma.cfg
I have uploaded my driver.cpp file.
Thinking it's my makefile. The files have several dependencies. The driver file is PumaDriver.cpp and it includes PumaDriver.h. PumaDriver.h also includes PumaBody.h. PumaBody.cpp includes PumaBody.h. PumaBody.h includes PumaMotor.h. PumaMotor.cpp includes PumaMotor.h. PumaMotor.h includes serialPort.h, base_manipulation.h, silvermax_commands.h. serialPort.cpp includes serialPort.h. base_manipulation.cpp includes base_manipulation.h.
Please help me find the error. I have been searching for several hours and tried various makefile versions, but I keep getting the same errors.
try ldd -r on the .so file, that will tell you if there are any unresolved dependencies.
2009/5/2 willydlw <[hidden email]>
This email is intended for the addressee only and may contain privileged and/or confidential information
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
Playerstage-users mailing list
Try without the -nostartfiles flag. I am not sure why this works, but one of the Player Developers had post that solution long time ago and it worked for me.
|Free forum by Nabble||Edit this page|