player error loading my plugin driver

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

player error loading my plugin driver

willydlw
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
(
        name "PumaMotorDriver"
        plugin "libPumaMotorDriver.so"
        provides ["position2d:0"]
)

my makefile:

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

       
       
install:
        cp *.so /usr/local/lib

uninstall:
        rm -f *.o *.so
        rm /usr/local/lib/libPumaMotorDriver.so

clean:
        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
Player v.2.0.5

* 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.

PumaDriver.cpp

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.

Thank you,
diane


Reply | Threaded
Open this post in threaded view
|

Re: player error loading my plugin driver

Toby Collett-3
try ldd -r on the .so file, that will tell you if there are any unresolved dependencies.

Toby

2009/5/2 willydlw <[hidden email]>

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
(
       name "PumaMotorDriver"
       plugin "libPumaMotorDriver.so"
       provides ["position2d:0"]
)

my makefile:

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



install:
       cp *.so /usr/local/lib

uninstall:
       rm -f *.o *.so
       rm /usr/local/lib/libPumaMotorDriver.so

clean:
       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
Player v.2.0.5

* 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.

http://www.nabble.com/file/p23349119/PumaDriver.cpp PumaDriver.cpp

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.

Thank you,
diane



--
View this message in context: http://www.nabble.com/player-error-loading-my-plugin-driver-tp23349119p23349119.html
Sent from the playerstage-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users



--
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: player error loading my plugin driver

Giri_Nathan
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.


Toby Collett-3 wrote
try ldd -r on the .so file, that will tell you if there are any unresolved
dependencies.

Toby

2009/5/2 willydlw <willydlw@comcast.net>

>
> 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
> (
>        name "PumaMotorDriver"
>        plugin "libPumaMotorDriver.so"
>        provides ["position2d:0"]
> )
>
> my makefile:
>
> 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
>
>
>
> install:
>        cp *.so /usr/local/lib
>
> uninstall:
>        rm -f *.o *.so
>        rm /usr/local/lib/libPumaMotorDriver.so
>
> clean:
>        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
> Player v.2.0.5
>
> * 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.
>
> http://www.nabble.com/file/p23349119/PumaDriver.cpp PumaDriver.cpp
>
> 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.
>
> Thank you,
> diane
>
>
>
> --
> View this message in context:
> http://www.nabble.com/player-error-loading-my-plugin-driver-tp23349119p23349119.html
> Sent from the playerstage-users mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> 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
> Playerstage-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/playerstage-users
>



--
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
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users