From: Eshwaran V. <esh...@gm...> - 2008-02-27 17:55:30
|
Hi, I have been trying to work on inter robot communcication using Opaque proxy . I am using the new CVS version of Player/Stage . While i am able to to send and receive data for a single robot , when i declare a second robot i get a segmentation fault. The .cc , cfg file are as follows #include <libplayerc++/playerc++.h> #include <libplayerc/playerc.h> #include <iostream> #include "args.h" int main(int argc, char **argv) { parse_args(argc,argv); //try //{ using namespace PlayerCc; using namespace std; PlayerClient robot(gHostname,6665); Position2dProxy pp(&robot, 0); LaserProxy lp(&robot, 0); OpaqueProxy op(&robot, 0); player_opaque_data_t opData; uint8_t opGetData[200]; uint8_t op1GetData[200]; PlayerClient robot1(gHostname,6666); Position2dProxy pp1(&robot1, gIndex); LaserProxy lp1(&robot1, gIndex); for(;;) { robot.Read(); robot1.Read(); pp.SetSpeed(0.5,dtor(30)); pp1.SetSpeed(0.8,dtor(45)); opData.data_count = 3; opData.data[0]='a'; opData.data[1]='b'; opData.data[2]='c'; opData.data[3]='\0'; op.SendCmd(&opData); std::cout << "SENT DATA"<<opData.data << std::endl; uint count = op.GetCount(); std::cout << "SENT count=" << count << std::endl; op.GetData(op1GetData); std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; } } *************************************************************************** driver ( name "stage" provides ["simulation:0" ] plugin "libstageplugin" # load the named file into the simulator worldfile "opq1.world" ) driver( name "stage" model "r0" provides ["6665:position2d:0" "6665:laser:0" ] requires ["6665:opaque:0"] ) driver( name "stage" model "r1" provides ["6666:position2d:0" "6666:laser:0"] requires ["localhost:6665:opaque:0"] ) driver ( name "relay" provides ["6665:opaque:0"] ) ************************************************************************ The GDB backtrace is as follows [swarm@localhost libplayerc++]$ gdb opq3 GNU gdb Red Hat Linux (6.6-35.fc8rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"... (no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 warning: Missing the separate debug info file: /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug (no debugging symbols found) (no debugging symbols found) warning: Missing the separate debug info file: /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug [Thread debugging using libthread_db enabled] [New process 3224] warning: Missing the separate debug info file: /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug warning: Missing the separate debug info file: /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug [New Thread -1209096496 (LWP 3224)] warning: Missing the separate debug info file: /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1209096496 (LWP 3224)] 0x08049c9f in main () ********************************************************************************** Any help with this code or some other alternate code for inter robot communication would be much appreciated. Regards Eshwaran |
From: Toby C. <tco...@pl...> - 2008-02-27 19:00:28
|
you only recieve the data from the relay driver after you call read, so your second robot wont get that data until after you try and print it out, hence causing the segfault. Toby On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > Hi, > I have been trying to work on inter robot communcication using Opaque > proxy . I am using the new CVS version of Player/Stage . While i am able to > to send and receive data for a single robot , when i declare a second robot > i get a segmentation fault. > > The .cc , cfg file are as follows > > #include <libplayerc++/playerc++.h> > #include <libplayerc/playerc.h> > #include <iostream> > #include "args.h" > > int > main(int argc, char **argv) > { > parse_args(argc,argv); > > //try > //{ > using namespace PlayerCc; > using namespace std; > > PlayerClient robot(gHostname,6665); > Position2dProxy pp(&robot, 0); > LaserProxy lp(&robot, 0); > OpaqueProxy op(&robot, 0); > player_opaque_data_t opData; > uint8_t opGetData[200]; > uint8_t op1GetData[200]; > PlayerClient robot1(gHostname,6666); > Position2dProxy pp1(&robot1, gIndex); > LaserProxy lp1(&robot1, gIndex); > for(;;) > { > robot.Read(); > robot1.Read(); > pp.SetSpeed(0.5,dtor(30)); > pp1.SetSpeed(0.8,dtor(45)); > opData.data_count = 3; > opData.data[0]='a'; > opData.data[1]='b'; > opData.data[2]='c'; > opData.data[3]='\0'; > op.SendCmd(&opData); > std::cout << "SENT DATA"<<opData.data << std::endl; > uint count = op.GetCount(); > std::cout << "SENT count=" << count << std::endl; > op.GetData(op1GetData); > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > } > } > > > *************************************************************************** > > driver > ( > name "stage" > provides ["simulation:0" ] > plugin "libstageplugin" > > # load the named file into the simulator > worldfile "opq1.world" > ) > > driver( > name "stage" > model "r0" > provides ["6665:position2d:0" "6665:laser:0" ] > requires ["6665:opaque:0"] ) > > driver( name "stage" > model "r1" > provides ["6666:position2d:0" "6666:laser:0"] > requires ["localhost:6665:opaque:0"] ) > > driver > ( > name "relay" > provides ["6665:opaque:0"] > ) > > ************************************************************************ > The GDB backtrace is as follows > > [swarm@localhost libplayerc++]$ gdb opq3 > GNU gdb Red Hat Linux (6.6-35.fc8rh) > Copyright (C) 2006 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "i386-redhat-linux-gnu"... > (no debugging symbols found) > Using host libthread_db library "/lib/libthread_db.so.1". > (gdb) run > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > (no debugging symbols found) > (no debugging symbols found) > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > [Thread debugging using libthread_db enabled] > [New process 3224] > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > [New Thread -1209096496 (LWP 3224)] > > warning: Missing the separate debug info file: > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1209096496 (LWP 3224)] > 0x08049c9f in main () > > ********************************************************************************** > > Any help with this code or some other alternate code for inter robot > communication would be much appreciated. > > Regards > Eshwaran > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > -- This email is intended for the addressee only and may contain privileged and/or confidential information |
From: Eshwaran V. <esh...@gm...> - 2008-02-27 19:30:50
|
Hi I am not using the second robot in this piece of code for communication. What I am trying to explain is that , even if I declare a second robot for some other purpose without declaring an opaqueproxy for that robot, I am getting a seg fault. Thanks again. Regards Eshwaran On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett <tco...@pl...> wrote: > you only recieve the data from the relay driver after you call read, so > your second robot wont get that data until after you try and print it out, > hence causing the segfault. > > Toby > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > > Hi, > > I have been trying to work on inter robot communcication using Opaque > > proxy . I am using the new CVS version of Player/Stage . While i am able to > > to send and receive data for a single robot , when i declare a second robot > > i get a segmentation fault. > > > > The .cc , cfg file are as follows > > > > #include <libplayerc++/playerc++.h> > > #include <libplayerc/playerc.h> > > #include <iostream> > > #include "args.h" > > > > int > > main(int argc, char **argv) > > { > > parse_args(argc,argv); > > > > //try > > //{ > > using namespace PlayerCc; > > using namespace std; > > > > PlayerClient robot(gHostname,6665); > > Position2dProxy pp(&robot, 0); > > LaserProxy lp(&robot, 0); > > OpaqueProxy op(&robot, 0); > > player_opaque_data_t opData; > > uint8_t opGetData[200]; > > uint8_t op1GetData[200]; > > PlayerClient robot1(gHostname,6666); > > Position2dProxy pp1(&robot1, gIndex); > > LaserProxy lp1(&robot1, gIndex); > > for(;;) > > { > > robot.Read(); > > robot1.Read(); > > pp.SetSpeed(0.5,dtor(30)); > > pp1.SetSpeed(0.8,dtor(45)); > > opData.data_count = 3; > > opData.data[0]='a'; > > opData.data[1]='b'; > > opData.data[2]='c'; > > opData.data[3]='\0'; > > op.SendCmd(&opData); > > std::cout << "SENT DATA"<<opData.data << std::endl; > > uint count = op.GetCount(); > > std::cout << "SENT count=" << count << std::endl; > > op.GetData(op1GetData); > > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > } > > } > > > > > > *************************************************************************** > > > > driver > > ( > > name "stage" > > provides ["simulation:0" ] > > plugin "libstageplugin" > > > > # load the named file into the simulator > > worldfile "opq1.world" > > ) > > > > driver( > > name "stage" > > model "r0" > > provides ["6665:position2d:0" "6665:laser:0" ] > > requires ["6665:opaque:0"] ) > > > > driver( name "stage" > > model "r1" > > provides ["6666:position2d:0" "6666:laser:0"] > > requires ["localhost:6665:opaque:0"] ) > > > > driver > > ( > > name "relay" > > provides ["6665:opaque:0"] > > ) > > > > ************************************************************************ > > The GDB backtrace is as follows > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > Copyright (C) 2006 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you > > are > > welcome to change it and/or distribute copies of it under certain > > conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for > > details. > > This GDB was configured as "i386-redhat-linux-gnu"... > > (no debugging symbols found) > > Using host libthread_db library "/lib/libthread_db.so.1". > > (gdb) run > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > (no debugging symbols found) > > (no debugging symbols found) > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > [Thread debugging using libthread_db enabled] > > [New process 3224] > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > [New Thread -1209096496 (LWP 3224)] > > > > warning: Missing the separate debug info file: > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread -1209096496 (LWP 3224)] > > 0x08049c9f in main () > > > > ********************************************************************************** > > > > Any help with this code or some other alternate code for inter robot > > communication would be much appreciated. > > > > Regards > > Eshwaran > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > -- > This email is intended for the addressee only and may contain privileged > and/or confidential information > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > |
From: Toby C. <tco...@pl...> - 2008-02-27 19:45:44
|
If you dont perform the read on robot1 does it still segfault? On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > Hi > I am not using the second robot in this piece of code for communication. > What I am trying to explain is that , even if I declare a second robot for > some other purpose without declaring an opaqueproxy for that robot, I am > getting a seg fault. > Thanks again. > > Regards > Eshwaran > > > > On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett < > tco...@pl...> wrote: > > > you only recieve the data from the relay driver after you call read, so > > your second robot wont get that data until after you try and print it out, > > hence causing the segfault. > > > > Toby > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > wrote: > > > > > Hi, > > > I have been trying to work on inter robot communcication using Opaque > > > proxy . I am using the new CVS version of Player/Stage . While i am able to > > > to send and receive data for a single robot , when i declare a second robot > > > i get a segmentation fault. > > > > > > The .cc , cfg file are as follows > > > > > > #include <libplayerc++/playerc++.h> > > > #include <libplayerc/playerc.h> > > > #include <iostream> > > > #include "args.h" > > > > > > int > > > main(int argc, char **argv) > > > { > > > parse_args(argc,argv); > > > > > > //try > > > //{ > > > using namespace PlayerCc; > > > using namespace std; > > > > > > PlayerClient robot(gHostname,6665); > > > Position2dProxy pp(&robot, 0); > > > LaserProxy lp(&robot, 0); > > > OpaqueProxy op(&robot, 0); > > > player_opaque_data_t opData; > > > uint8_t opGetData[200]; > > > uint8_t op1GetData[200]; > > > PlayerClient robot1(gHostname,6666); > > > Position2dProxy pp1(&robot1, gIndex); > > > LaserProxy lp1(&robot1, gIndex); > > > for(;;) > > > { > > > robot.Read(); > > > robot1.Read(); > > > pp.SetSpeed(0.5,dtor(30)); > > > pp1.SetSpeed(0.8,dtor(45)); > > > opData.data_count = 3; > > > opData.data[0]='a'; > > > opData.data[1]='b'; > > > opData.data[2]='c'; > > > opData.data[3]='\0'; > > > op.SendCmd(&opData); > > > std::cout << "SENT DATA"<<opData.data << std::endl; > > > uint count = op.GetCount(); > > > std::cout << "SENT count=" << count << std::endl; > > > op.GetData(op1GetData); > > > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > > } > > > } > > > > > > > > > *************************************************************************** > > > > > > driver > > > ( > > > name "stage" > > > provides ["simulation:0" ] > > > plugin "libstageplugin" > > > > > > # load the named file into the simulator > > > worldfile "opq1.world" > > > ) > > > > > > driver( > > > name "stage" > > > model "r0" > > > provides ["6665:position2d:0" "6665:laser:0" ] > > > requires ["6665:opaque:0"] ) > > > > > > driver( name "stage" > > > model "r1" > > > provides ["6666:position2d:0" "6666:laser:0"] > > > requires ["localhost:6665:opaque:0"] ) > > > > > > driver > > > ( > > > name "relay" > > > provides ["6665:opaque:0"] > > > ) > > > > > > > > > ************************************************************************ > > > The GDB backtrace is as follows > > > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > GDB is free software, covered by the GNU General Public License, and > > > you are > > > welcome to change it and/or distribute copies of it under certain > > > conditions. > > > Type "show copying" to see the conditions. > > > There is absolutely no warranty for GDB. Type "show warranty" for > > > details. > > > This GDB was configured as "i386-redhat-linux-gnu"... > > > (no debugging symbols found) > > > Using host libthread_db library "/lib/libthread_db.so.1". > > > (gdb) run > > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > > (no debugging symbols found) > > > (no debugging symbols found) > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > > [Thread debugging using libthread_db enabled] > > > [New process 3224] > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > > [New Thread -1209096496 (LWP 3224)] > > > > > > warning: Missing the separate debug info file: > > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > [Switching to Thread -1209096496 (LWP 3224)] > > > 0x08049c9f in main () > > > > > > ********************************************************************************** > > > > > > Any help with this code or some other alternate code for inter robot > > > communication would be much appreciated. > > > > > > Regards > > > Eshwaran > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Playerstage-developers mailing list > > > Pla...@li... > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > -- > > This email is intended for the addressee only and may contain privileged > > and/or confidential information > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > -- This email is intended for the addressee only and may contain privileged and/or confidential information |
From: Eshwaran V. <esh...@gm...> - 2008-02-27 20:18:49
|
Hi again, Yes, I just tried that now. If I declare the second robot (robot1) and don't use it at all and don't perform a read on robot1, the code segfaults. However if while declaring robot1, I also subscribe to OpaqueProxy, then irrespective of whether I perform a read on robot1 or not, I get a NACK error. [swarm@localhost libplayerc++]$ ./opq3 playerc error : got NACK from request playerc error : failed to get response terminate called after throwing an instance of 'PlayerCc::PlayerError' Aborted Regards Eshwaran On Thu, Feb 28, 2008 at 1:15 AM, Toby Collett <tco...@pl...> wrote: > If you dont perform the read on robot1 does it still segfault? > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > > > Hi > > I am not using the second robot in this piece of code for > > communication. What I am trying to explain is that , even if I declare a > > second robot for some other purpose without declaring an opaqueproxy for > > that robot, I am getting a seg fault. > > Thanks again. > > > > Regards > > Eshwaran > > > > > > > > On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett < > > tco...@pl...> wrote: > > > > > you only recieve the data from the relay driver after you call read, > > > so your second robot wont get that data until after you try and print it > > > out, hence causing the segfault. > > > > > > Toby > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > wrote: > > > > > > > Hi, > > > > I have been trying to work on inter robot communcication using > > > > Opaque proxy . I am using the new CVS version of Player/Stage . While i am > > > > able to to send and receive data for a single robot , when i declare a > > > > second robot i get a segmentation fault. > > > > > > > > The .cc , cfg file are as follows > > > > > > > > #include <libplayerc++/playerc++.h> > > > > #include <libplayerc/playerc.h> > > > > #include <iostream> > > > > #include "args.h" > > > > > > > > int > > > > main(int argc, char **argv) > > > > { > > > > parse_args(argc,argv); > > > > > > > > //try > > > > //{ > > > > using namespace PlayerCc; > > > > using namespace std; > > > > > > > > PlayerClient robot(gHostname,6665); > > > > Position2dProxy pp(&robot, 0); > > > > LaserProxy lp(&robot, 0); > > > > OpaqueProxy op(&robot, 0); > > > > player_opaque_data_t opData; > > > > uint8_t opGetData[200]; > > > > uint8_t op1GetData[200]; > > > > PlayerClient robot1(gHostname,6666); > > > > Position2dProxy pp1(&robot1, gIndex); > > > > LaserProxy lp1(&robot1, gIndex); > > > > for(;;) > > > > { > > > > robot.Read(); > > > > robot1.Read(); > > > > pp.SetSpeed(0.5,dtor(30)); > > > > pp1.SetSpeed(0.8,dtor(45)); > > > > opData.data_count = 3; > > > > opData.data[0]='a'; > > > > opData.data[1]='b'; > > > > opData.data[2]='c'; > > > > opData.data[3]='\0'; > > > > op.SendCmd(&opData); > > > > std::cout << "SENT DATA"<<opData.data << std::endl; > > > > uint count = op.GetCount(); > > > > std::cout << "SENT count=" << count << std::endl; > > > > op.GetData(op1GetData); > > > > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > > > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > > > } > > > > } > > > > > > > > > > > > *************************************************************************** > > > > > > > > driver > > > > ( > > > > name "stage" > > > > provides ["simulation:0" ] > > > > plugin "libstageplugin" > > > > > > > > # load the named file into the simulator > > > > worldfile "opq1.world" > > > > ) > > > > > > > > driver( > > > > name "stage" > > > > model "r0" > > > > provides ["6665:position2d:0" "6665:laser:0" ] > > > > requires ["6665:opaque:0"] ) > > > > > > > > driver( name "stage" > > > > model "r1" > > > > provides ["6666:position2d:0" "6666:laser:0"] > > > > requires ["localhost:6665:opaque:0"] ) > > > > > > > > driver > > > > ( > > > > name "relay" > > > > provides ["6665:opaque:0"] > > > > ) > > > > > > > > > > > > ************************************************************************ > > > > The GDB backtrace is as follows > > > > > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > > GDB is free software, covered by the GNU General Public License, and > > > > you are > > > > welcome to change it and/or distribute copies of it under certain > > > > conditions. > > > > Type "show copying" to see the conditions. > > > > There is absolutely no warranty for GDB. Type "show warranty" for > > > > details. > > > > This GDB was configured as "i386-redhat-linux-gnu"... > > > > (no debugging symbols found) > > > > Using host libthread_db library "/lib/libthread_db.so.1". > > > > (gdb) run > > > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > > > (no debugging symbols found) > > > > (no debugging symbols found) > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > > > [Thread debugging using libthread_db enabled] > > > > [New process 3224] > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > > > [New Thread -1209096496 (LWP 3224)] > > > > > > > > warning: Missing the separate debug info file: > > > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > [Switching to Thread -1209096496 (LWP 3224)] > > > > 0x08049c9f in main () > > > > > > > > ********************************************************************************** > > > > > > > > Any help with this code or some other alternate code for inter robot > > > > communication would be much appreciated. > > > > > > > > Regards > > > > Eshwaran > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Playerstage-developers mailing list > > > > Pla...@li... > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > -- > > > This email is intended for the addressee only and may contain > > > privileged and/or confidential information > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Playerstage-developers mailing list > > > Pla...@li... > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > -- > This email is intended for the addressee only and may contain privileged > and/or confidential information > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > |
From: Toby C. <tco...@pl...> - 2008-02-27 20:50:25
|
Hi, You shouldnt need the requires lines you have in the config file for the stage driver, they could be causing strange behaviour... Toby On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > Hi again, > Yes, I just tried that now. If I declare the second robot (robot1) and > don't use it at all and don't perform a read on robot1, the code segfaults. > However if while declaring robot1, I also subscribe to OpaqueProxy, then > irrespective of whether I perform a read on robot1 or not, I get a NACK > error. > [swarm@localhost libplayerc++]$ ./opq3 > playerc error : got NACK from request > playerc error : failed to get response > terminate called after throwing an instance of 'PlayerCc::PlayerError' > Aborted > > Regards > Eshwaran > > > On Thu, Feb 28, 2008 at 1:15 AM, Toby Collett < > tco...@pl...> wrote: > > > If you dont perform the read on robot1 does it still segfault? > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > wrote: > > > > > > Hi > > > I am not using the second robot in this piece of code for > > > communication. What I am trying to explain is that , even if I declare a > > > second robot for some other purpose without declaring an opaqueproxy for > > > that robot, I am getting a seg fault. > > > Thanks again. > > > > > > Regards > > > Eshwaran > > > > > > > > > > > > On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett < > > > tco...@pl...> wrote: > > > > > > > you only recieve the data from the relay driver after you call read, > > > > so your second robot wont get that data until after you try and print it > > > > out, hence causing the segfault. > > > > > > > > Toby > > > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > > wrote: > > > > > > > > > Hi, > > > > > I have been trying to work on inter robot communcication using > > > > > Opaque proxy . I am using the new CVS version of Player/Stage . While i am > > > > > able to to send and receive data for a single robot , when i declare a > > > > > second robot i get a segmentation fault. > > > > > > > > > > The .cc , cfg file are as follows > > > > > > > > > > #include <libplayerc++/playerc++.h> > > > > > #include <libplayerc/playerc.h> > > > > > #include <iostream> > > > > > #include "args.h" > > > > > > > > > > int > > > > > main(int argc, char **argv) > > > > > { > > > > > parse_args(argc,argv); > > > > > > > > > > //try > > > > > //{ > > > > > using namespace PlayerCc; > > > > > using namespace std; > > > > > > > > > > PlayerClient robot(gHostname,6665); > > > > > Position2dProxy pp(&robot, 0); > > > > > LaserProxy lp(&robot, 0); > > > > > OpaqueProxy op(&robot, 0); > > > > > player_opaque_data_t opData; > > > > > uint8_t opGetData[200]; > > > > > uint8_t op1GetData[200]; > > > > > PlayerClient robot1(gHostname,6666); > > > > > Position2dProxy pp1(&robot1, gIndex); > > > > > LaserProxy lp1(&robot1, gIndex); > > > > > for(;;) > > > > > { > > > > > robot.Read(); > > > > > robot1.Read(); > > > > > pp.SetSpeed(0.5,dtor(30)); > > > > > pp1.SetSpeed(0.8,dtor(45)); > > > > > opData.data_count = 3; > > > > > opData.data[0]='a'; > > > > > opData.data[1]='b'; > > > > > opData.data[2]='c'; > > > > > opData.data[3]='\0'; > > > > > op.SendCmd(&opData); > > > > > std::cout << "SENT DATA"<<opData.data << std::endl; > > > > > uint count = op.GetCount(); > > > > > std::cout << "SENT count=" << count << std::endl; > > > > > op.GetData(op1GetData); > > > > > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > > > > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > > > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > > > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > > > > } > > > > > } > > > > > > > > > > > > > > > *************************************************************************** > > > > > > > > > > driver > > > > > ( > > > > > name "stage" > > > > > provides ["simulation:0" ] > > > > > plugin "libstageplugin" > > > > > > > > > > # load the named file into the simulator > > > > > worldfile "opq1.world" > > > > > ) > > > > > > > > > > driver( > > > > > name "stage" > > > > > model "r0" > > > > > provides ["6665:position2d:0" "6665:laser:0" ] > > > > > requires ["6665:opaque:0"] ) > > > > > > > > > > driver( name "stage" > > > > > model "r1" > > > > > provides ["6666:position2d:0" "6666:laser:0"] > > > > > requires ["localhost:6665:opaque:0"] ) > > > > > > > > > > driver > > > > > ( > > > > > name "relay" > > > > > provides ["6665:opaque:0"] > > > > > ) > > > > > > > > > > > > > > > ************************************************************************ > > > > > The GDB backtrace is as follows > > > > > > > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > > > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > > > GDB is free software, covered by the GNU General Public License, > > > > > and you are > > > > > welcome to change it and/or distribute copies of it under certain > > > > > conditions. > > > > > Type "show copying" to see the conditions. > > > > > There is absolutely no warranty for GDB. Type "show warranty" for > > > > > details. > > > > > This GDB was configured as "i386-redhat-linux-gnu"... > > > > > (no debugging symbols found) > > > > > Using host libthread_db library "/lib/libthread_db.so.1". > > > > > (gdb) run > > > > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > > > > (no debugging symbols found) > > > > > (no debugging symbols found) > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > > > > [Thread debugging using libthread_db enabled] > > > > > [New process 3224] > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > > > > [New Thread -1209096496 (LWP 3224)] > > > > > > > > > > warning: Missing the separate debug info file: > > > > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > [Switching to Thread -1209096496 (LWP 3224)] > > > > > 0x08049c9f in main () > > > > > > > > > > ********************************************************************************** > > > > > > > > > > Any help with this code or some other alternate code for inter > > > > > robot communication would be much appreciated. > > > > > > > > > > Regards > > > > > Eshwaran > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by: Microsoft > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > _______________________________________________ > > > > > Playerstage-developers mailing list > > > > > Pla...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > -- > > > > This email is intended for the addressee only and may contain > > > > privileged and/or confidential information > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Playerstage-developers mailing list > > > > Pla...@li... > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Playerstage-developers mailing list > > > Pla...@li... > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > -- > > This email is intended for the addressee only and may contain privileged > > and/or confidential information > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > -- This email is intended for the addressee only and may contain privileged and/or confidential information |
From: Eshwaran V. <esh...@gm...> - 2008-02-27 21:24:35
|
Hi, I have tried removing the requires lines. I saw that someone had posted it as a solution for interrobot communication using relay which is why I used it. However, removing or inserting back those lines has no effect on this particular behaviour. Regards Eshwaran On Thu, Feb 28, 2008 at 2:20 AM, Toby Collett <tco...@pl...> wrote: > Hi, > You shouldnt need the requires lines you have in the config file for the > stage driver, they could be causing strange behaviour... > > > Toby > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > > > Hi again, > > Yes, I just tried that now. If I declare the second robot (robot1) > > and don't use it at all and don't perform a read on robot1, the code > > segfaults. However if while declaring robot1, I also subscribe to > > OpaqueProxy, then irrespective of whether I perform a read on robot1 or not, > > I get a NACK error. > > [swarm@localhost libplayerc++]$ ./opq3 > > playerc error : got NACK from request > > playerc error : failed to get response > > terminate called after throwing an instance of 'PlayerCc::PlayerError' > > Aborted > > > > Regards > > Eshwaran > > > > > > On Thu, Feb 28, 2008 at 1:15 AM, Toby Collett < > > tco...@pl...> wrote: > > > > > If you dont perform the read on robot1 does it still segfault? > > > > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > wrote: > > > > > > > > Hi > > > > I am not using the second robot in this piece of code for > > > > communication. What I am trying to explain is that , even if I declare a > > > > second robot for some other purpose without declaring an opaqueproxy for > > > > that robot, I am getting a seg fault. > > > > Thanks again. > > > > > > > > Regards > > > > Eshwaran > > > > > > > > > > > > > > > > On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett < > > > > tco...@pl...> wrote: > > > > > > > > > you only recieve the data from the relay driver after you call > > > > > read, so your second robot wont get that data until after you try and print > > > > > it out, hence causing the segfault. > > > > > > > > > > Toby > > > > > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > > > wrote: > > > > > > > > > > > Hi, > > > > > > I have been trying to work on inter robot communcication using > > > > > > Opaque proxy . I am using the new CVS version of Player/Stage . While i am > > > > > > able to to send and receive data for a single robot , when i declare a > > > > > > second robot i get a segmentation fault. > > > > > > > > > > > > The .cc , cfg file are as follows > > > > > > > > > > > > #include <libplayerc++/playerc++.h> > > > > > > #include <libplayerc/playerc.h> > > > > > > #include <iostream> > > > > > > #include "args.h" > > > > > > > > > > > > int > > > > > > main(int argc, char **argv) > > > > > > { > > > > > > parse_args(argc,argv); > > > > > > > > > > > > //try > > > > > > //{ > > > > > > using namespace PlayerCc; > > > > > > using namespace std; > > > > > > > > > > > > PlayerClient robot(gHostname,6665); > > > > > > Position2dProxy pp(&robot, 0); > > > > > > LaserProxy lp(&robot, 0); > > > > > > OpaqueProxy op(&robot, 0); > > > > > > player_opaque_data_t opData; > > > > > > uint8_t opGetData[200]; > > > > > > uint8_t op1GetData[200]; > > > > > > PlayerClient robot1(gHostname,6666); > > > > > > Position2dProxy pp1(&robot1, gIndex); > > > > > > LaserProxy lp1(&robot1, gIndex); > > > > > > for(;;) > > > > > > { > > > > > > robot.Read(); > > > > > > robot1.Read(); > > > > > > pp.SetSpeed(0.5,dtor(30)); > > > > > > pp1.SetSpeed(0.8,dtor(45)); > > > > > > opData.data_count = 3; > > > > > > opData.data[0]='a'; > > > > > > opData.data[1]='b'; > > > > > > opData.data[2]='c'; > > > > > > opData.data[3]='\0'; > > > > > > op.SendCmd(&opData); > > > > > > std::cout << "SENT DATA"<<opData.data << std::endl; > > > > > > uint count = op.GetCount(); > > > > > > std::cout << "SENT count=" << count << std::endl; > > > > > > op.GetData(op1GetData); > > > > > > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > > > > > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > > > > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > > > > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > > > > > } > > > > > > } > > > > > > > > > > > > > > > > > > *************************************************************************** > > > > > > > > > > > > driver > > > > > > ( > > > > > > name "stage" > > > > > > provides ["simulation:0" ] > > > > > > plugin "libstageplugin" > > > > > > > > > > > > # load the named file into the simulator > > > > > > worldfile "opq1.world" > > > > > > ) > > > > > > > > > > > > driver( > > > > > > name "stage" > > > > > > model "r0" > > > > > > provides ["6665:position2d:0" "6665:laser:0" ] > > > > > > requires ["6665:opaque:0"] ) > > > > > > > > > > > > driver( name "stage" > > > > > > model "r1" > > > > > > provides ["6666:position2d:0" "6666:laser:0"] > > > > > > requires ["localhost:6665:opaque:0"] ) > > > > > > > > > > > > driver > > > > > > ( > > > > > > name "relay" > > > > > > provides ["6665:opaque:0"] > > > > > > ) > > > > > > > > > > > > > > > > > > ************************************************************************ > > > > > > The GDB backtrace is as follows > > > > > > > > > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > > > > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > > > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > > > > GDB is free software, covered by the GNU General Public License, > > > > > > and you are > > > > > > welcome to change it and/or distribute copies of it under > > > > > > certain conditions. > > > > > > Type "show copying" to see the conditions. > > > > > > There is absolutely no warranty for GDB. Type "show warranty" > > > > > > for details. > > > > > > This GDB was configured as "i386-redhat-linux-gnu"... > > > > > > (no debugging symbols found) > > > > > > Using host libthread_db library "/lib/libthread_db.so.1". > > > > > > (gdb) run > > > > > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > > > > > (no debugging symbols found) > > > > > > (no debugging symbols found) > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > > > > > [Thread debugging using libthread_db enabled] > > > > > > [New process 3224] > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > > > > > [New Thread -1209096496 (LWP 3224)] > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > > [Switching to Thread -1209096496 (LWP 3224)] > > > > > > 0x08049c9f in main () > > > > > > > > > > > > ********************************************************************************** > > > > > > > > > > > > Any help with this code or some other alternate code for inter > > > > > > robot communication would be much appreciated. > > > > > > > > > > > > Regards > > > > > > Eshwaran > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > This SF.net email is sponsored by: Microsoft > > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > _______________________________________________ > > > > > > Playerstage-developers mailing list > > > > > > Pla...@li... > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > This email is intended for the addressee only and may contain > > > > > privileged and/or confidential information > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by: Microsoft > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > _______________________________________________ > > > > > Playerstage-developers mailing list > > > > > Pla...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Playerstage-developers mailing list > > > > Pla...@li... > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > -- > > > This email is intended for the addressee only and may contain > > > privileged and/or confidential information > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Playerstage-developers mailing list > > > Pla...@li... > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > -- > This email is intended for the addressee only and may contain privileged > and/or confidential information > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > |
From: Toby C. <tco...@pl...> - 2008-02-27 21:56:00
|
The problem is you are not allocating data for you get data correctly... you need something like this.... player_opaque_data_t opData; opData.data = new uint8_t[1234]; Toby On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > Hi, > I have tried removing the requires lines. I saw that someone had posted > it as a solution for interrobot communication using relay which is why I > used it. However, removing or inserting back those lines has no effect on > this particular behaviour. > Regards > Eshwaran > > > On Thu, Feb 28, 2008 at 2:20 AM, Toby Collett < > tco...@pl...> wrote: > > > Hi, > > You shouldnt need the requires lines you have in the config file for the > > stage driver, they could be causing strange behaviour... > > > > > > Toby > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > wrote: > > > > > > Hi again, > > > Yes, I just tried that now. If I declare the second robot (robot1) > > > and don't use it at all and don't perform a read on robot1, the code > > > segfaults. However if while declaring robot1, I also subscribe to > > > OpaqueProxy, then irrespective of whether I perform a read on robot1 or not, > > > I get a NACK error. > > > [swarm@localhost libplayerc++]$ ./opq3 > > > playerc error : got NACK from request > > > playerc error : failed to get response > > > terminate called after throwing an instance of 'PlayerCc::PlayerError' > > > Aborted > > > > > > Regards > > > Eshwaran > > > > > > > > > On Thu, Feb 28, 2008 at 1:15 AM, Toby Collett < > > > tco...@pl...> wrote: > > > > > > > If you dont perform the read on robot1 does it still segfault? > > > > > > > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > > wrote: > > > > > > > > > > Hi > > > > > I am not using the second robot in this piece of code for > > > > > communication. What I am trying to explain is that , even if I declare a > > > > > second robot for some other purpose without declaring an opaqueproxy for > > > > > that robot, I am getting a seg fault. > > > > > Thanks again. > > > > > > > > > > Regards > > > > > Eshwaran > > > > > > > > > > > > > > > > > > > > On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett < > > > > > tco...@pl...> wrote: > > > > > > > > > > > you only recieve the data from the relay driver after you call > > > > > > read, so your second robot wont get that data until after you try and print > > > > > > it out, hence causing the segfault. > > > > > > > > > > > > Toby > > > > > > > > > > > > On 28/02/2008, Eshwaran VijayKumar < > > > > > > esh...@gm...> wrote: > > > > > > > > > > > > > Hi, > > > > > > > I have been trying to work on inter robot communcication > > > > > > > using Opaque proxy . I am using the new CVS version of Player/Stage . While > > > > > > > i am able to to send and receive data for a single robot , when i declare a > > > > > > > second robot i get a segmentation fault. > > > > > > > > > > > > > > The .cc , cfg file are as follows > > > > > > > > > > > > > > #include <libplayerc++/playerc++.h> > > > > > > > #include <libplayerc/playerc.h> > > > > > > > #include <iostream> > > > > > > > #include "args.h" > > > > > > > > > > > > > > int > > > > > > > main(int argc, char **argv) > > > > > > > { > > > > > > > parse_args(argc,argv); > > > > > > > > > > > > > > //try > > > > > > > //{ > > > > > > > using namespace PlayerCc; > > > > > > > using namespace std; > > > > > > > > > > > > > > PlayerClient robot(gHostname,6665); > > > > > > > Position2dProxy pp(&robot, 0); > > > > > > > LaserProxy lp(&robot, 0); > > > > > > > OpaqueProxy op(&robot, 0); > > > > > > > player_opaque_data_t opData; > > > > > > > uint8_t opGetData[200]; > > > > > > > uint8_t op1GetData[200]; > > > > > > > PlayerClient robot1(gHostname,6666); > > > > > > > Position2dProxy pp1(&robot1, gIndex); > > > > > > > LaserProxy lp1(&robot1, gIndex); > > > > > > > for(;;) > > > > > > > { > > > > > > > robot.Read(); > > > > > > > robot1.Read(); > > > > > > > pp.SetSpeed(0.5,dtor(30)); > > > > > > > pp1.SetSpeed(0.8,dtor(45)); > > > > > > > opData.data_count = 3; > > > > > > > opData.data[0]='a'; > > > > > > > opData.data[1]='b'; > > > > > > > opData.data[2]='c'; > > > > > > > opData.data[3]='\0'; > > > > > > > op.SendCmd(&opData); > > > > > > > std::cout << "SENT DATA"<<opData.data << std::endl; > > > > > > > uint count = op.GetCount(); > > > > > > > std::cout << "SENT count=" << count << std::endl; > > > > > > > op.GetData(op1GetData); > > > > > > > std::cout << "op1GetData[0]=" << op1GetData[0] << std::endl; > > > > > > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > > > > > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > > > > > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > > > > > > } > > > > > > > } > > > > > > > > > > > > > > > > > > > > > *************************************************************************** > > > > > > > > > > > > > > driver > > > > > > > ( > > > > > > > name "stage" > > > > > > > provides ["simulation:0" ] > > > > > > > plugin "libstageplugin" > > > > > > > > > > > > > > # load the named file into the simulator > > > > > > > worldfile "opq1.world" > > > > > > > ) > > > > > > > > > > > > > > driver( > > > > > > > name "stage" > > > > > > > model "r0" > > > > > > > provides ["6665:position2d:0" "6665:laser:0" ] > > > > > > > requires ["6665:opaque:0"] ) > > > > > > > > > > > > > > driver( name "stage" > > > > > > > model "r1" > > > > > > > provides ["6666:position2d:0" "6666:laser:0"] > > > > > > > requires ["localhost:6665:opaque:0"] ) > > > > > > > > > > > > > > driver > > > > > > > ( > > > > > > > name "relay" > > > > > > > provides ["6665:opaque:0"] > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > ************************************************************************ > > > > > > > The GDB backtrace is as follows > > > > > > > > > > > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > > > > > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > > > > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > > > > > GDB is free software, covered by the GNU General Public > > > > > > > License, and you are > > > > > > > welcome to change it and/or distribute copies of it under > > > > > > > certain conditions. > > > > > > > Type "show copying" to see the conditions. > > > > > > > There is absolutely no warranty for GDB. Type "show warranty" > > > > > > > for details. > > > > > > > This GDB was configured as "i386-redhat-linux-gnu"... > > > > > > > (no debugging symbols found) > > > > > > > Using host libthread_db library "/lib/libthread_db.so.1". > > > > > > > (gdb) run > > > > > > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > > > > > > (no debugging symbols found) > > > > > > > (no debugging symbols found) > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > > > > > > [Thread debugging using libthread_db enabled] > > > > > > > [New process 3224] > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > > > > > > [New Thread -1209096496 (LWP 3224)] > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > > > [Switching to Thread -1209096496 (LWP 3224)] > > > > > > > 0x08049c9f in main () > > > > > > > > > > > > > > ********************************************************************************** > > > > > > > > > > > > > > Any help with this code or some other alternate code for inter > > > > > > > robot communication would be much appreciated. > > > > > > > > > > > > > > Regards > > > > > > > Eshwaran > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > This SF.net email is sponsored by: Microsoft > > > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > > _______________________________________________ > > > > > > > Playerstage-developers mailing list > > > > > > > Pla...@li... > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > This email is intended for the addressee only and may contain > > > > > > privileged and/or confidential information > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > This SF.net email is sponsored by: Microsoft > > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > _______________________________________________ > > > > > > Playerstage-developers mailing list > > > > > > Pla...@li... > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by: Microsoft > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > _______________________________________________ > > > > > Playerstage-developers mailing list > > > > > Pla...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > -- > > > > This email is intended for the addressee only and may contain > > > > privileged and/or confidential information > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Playerstage-developers mailing list > > > > Pla...@li... > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Playerstage-developers mailing list > > > Pla...@li... > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > -- > > This email is intended for the addressee only and may contain privileged > > and/or confidential information > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > -- This email is intended for the addressee only and may contain privileged and/or confidential information |
From: Eshwaran V. <esh...@gm...> - 2008-02-28 03:23:31
|
Hi, I modified my code as per your suggestions: My cfg file is the same as before (except that requires lines have been removed. driver( name "stage" model "r0" provides ["6665:position2d:0" "6665:laser:0" ] ) driver( name "stage" model "r1" provides ["6666:position2d:0" "6666:laser:0"] ) driver ( name "relay" provides ["opaque:0"] ) My code is #include <libplayerc++/playerc++.h> #include <libplayerc/playerc.h> #include <iostream> #include "args.h" int main(int argc, char **argv) { parse_args(argc,argv); using namespace PlayerCc; using namespace std; PlayerClient robot(gHostname,6665); Position2dProxy pp(&robot, 0); LaserProxy lp(&robot, 0); OpaqueProxy op(&robot, 0); player_opaque_data_t opData,op1Data; PlayerClient robot1(gHostname,6666); Position2dProxy pp1(&robot1, gIndex); OpaqueProxy op1(&robot1,0); for(;;) { robot.Read(); robot1.Read(); pp.SetSpeed(0.5,dtor(30)); pp1.SetSpeed(0.8,dtor(45)); opData.data_count = 3; opData.data[0]='a'; opData.data[1]='b'; opData.data[2]='c'; opData.data[3]='\0'; op.SendCmd(&opData); std::cout << "SENT DATA"<<opData.data << std::endl; uint count = op1.GetCount(); std::cout << "SENT count=" << count << std::endl; op1.GetData(op1Data.data); std::cout<<"GET DATA"<<op1Data.data<<std::endl; } } The error I am getting : >>>>>>>Client Error: playerc error : got NACK from request playerc error : failed to get response terminate called after throwing an instance of 'PlayerCc::PlayerError' Aborted >>>>>>>Player Terminal Window: Stage plugin: 6665.simulation.0 is a Stage world [Loading ./opq1.world][Include pioneer.inc][Include map.inc][Include sick.inc][Load time 0.115sec] Stage plugin: 6665.position2d.0 is attempting to find a model under model "r0" of type [position] "r0" Stage plugin: 6665.laser.0 is attempting to find a model under model "r0" of type [laser] "r0.laser:0" Stage plugin: 6666.position2d.0 is attempting to find a model under model "r1" of type [position] "r1" Stage plugin: 6666.laser.0 is attempting to find a model under model "r1" of type [laser] "r1.laser:0" listening on 6665 listening on 6666 Listening on ports: 6665 6666 accepted TCP client 0 on port 6665, fd 14 accepted TCP client 1 on port 6666, fd 15 warning : skipping subscription to unknown device opaque:0 warning : other error on client 0 closing TCP connection to client 0 on port 6665 unsubscribe from r0 0 unsubscribe from r0.laser:0 0 Shutting stage driver down stage driver has been shutdown warning : other error on client 0 closing TCP connection to client 0 on port 6666 unsubscribe from r1 0 Shutting stage driver down stage driver has been shutdown I would like to point that even though the opaque driver is not bound to any port specifically (by giving a provides["opaque:0"]), I am unable to send data from it to the other clients that subscribe to it. Only one client is able to subscribe to the driver. Both robots are however able to subscribe to two separate relay drivers when each has a specific opaque proxy diffrentiated by index or port. I mention this because once I remove OpaqueProxy op1(&robot1,0); and change op1.GetData(op1Data.data); to op.GetData(op1Data.data), the code runs perfectly in that I am able to send and receive data to and from the SAME robot while the other robot can be used for other purposes. However this doesn't serve my purpose of communicating between two robots. Any help again would be much appreciated. Thanks in advance, Regards Eshwaran On Thu, Feb 28, 2008 at 3:24 AM, Toby Collett <tco...@pl...> wrote: > The problem is you are not allocating data for you get data correctly... > > you need something like this.... > > player_opaque_data_t opData; > opData.data = new uint8_t[1234]; > > > Toby > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> wrote: > > > > Hi, > > I have tried removing the requires lines. I saw that someone had > > posted it as a solution for interrobot communication using relay which is > > why I used it. However, removing or inserting back those lines has no effect > > on this particular behaviour. > > Regards > > Eshwaran > > > > > > On Thu, Feb 28, 2008 at 2:20 AM, Toby Collett < > > tco...@pl...> wrote: > > > > > Hi, > > > You shouldnt need the requires lines you have in the config file for > > > the stage driver, they could be causing strange behaviour... > > > > > > > > > Toby > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > wrote: > > > > > > > > Hi again, > > > > Yes, I just tried that now. If I declare the second robot > > > > (robot1) and don't use it at all and don't perform a read on robot1, the > > > > code segfaults. However if while declaring robot1, I also subscribe to > > > > OpaqueProxy, then irrespective of whether I perform a read on robot1 or not, > > > > I get a NACK error. > > > > [swarm@localhost libplayerc++]$ ./opq3 > > > > playerc error : got NACK from request > > > > playerc error : failed to get response > > > > terminate called after throwing an instance of > > > > 'PlayerCc::PlayerError' > > > > Aborted > > > > > > > > Regards > > > > Eshwaran > > > > > > > > > > > > On Thu, Feb 28, 2008 at 1:15 AM, Toby Collett < > > > > tco...@pl...> wrote: > > > > > > > > > If you dont perform the read on robot1 does it still segfault? > > > > > > > > > > > > > > > On 28/02/2008, Eshwaran VijayKumar <esh...@gm...> > > > > > wrote: > > > > > > > > > > > > Hi > > > > > > I am not using the second robot in this piece of code for > > > > > > communication. What I am trying to explain is that , even if I declare a > > > > > > second robot for some other purpose without declaring an opaqueproxy for > > > > > > that robot, I am getting a seg fault. > > > > > > Thanks again. > > > > > > > > > > > > Regards > > > > > > Eshwaran > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Feb 28, 2008 at 12:30 AM, Toby Collett < > > > > > > tco...@pl...> wrote: > > > > > > > > > > > > > you only recieve the data from the relay driver after you call > > > > > > > read, so your second robot wont get that data until after you try and print > > > > > > > it out, hence causing the segfault. > > > > > > > > > > > > > > Toby > > > > > > > > > > > > > > On 28/02/2008, Eshwaran VijayKumar < > > > > > > > esh...@gm...> wrote: > > > > > > > > > > > > > > > Hi, > > > > > > > > I have been trying to work on inter robot communcication > > > > > > > > using Opaque proxy . I am using the new CVS version of Player/Stage . While > > > > > > > > i am able to to send and receive data for a single robot , when i declare a > > > > > > > > second robot i get a segmentation fault. > > > > > > > > > > > > > > > > The .cc , cfg file are as follows > > > > > > > > > > > > > > > > #include <libplayerc++/playerc++.h> > > > > > > > > #include <libplayerc/playerc.h> > > > > > > > > #include <iostream> > > > > > > > > #include "args.h" > > > > > > > > > > > > > > > > int > > > > > > > > main(int argc, char **argv) > > > > > > > > { > > > > > > > > parse_args(argc,argv); > > > > > > > > > > > > > > > > //try > > > > > > > > //{ > > > > > > > > using namespace PlayerCc; > > > > > > > > using namespace std; > > > > > > > > > > > > > > > > PlayerClient robot(gHostname,6665); > > > > > > > > Position2dProxy pp(&robot, 0); > > > > > > > > LaserProxy lp(&robot, 0); > > > > > > > > OpaqueProxy op(&robot, 0); > > > > > > > > player_opaque_data_t opData; > > > > > > > > uint8_t opGetData[200]; > > > > > > > > uint8_t op1GetData[200]; > > > > > > > > PlayerClient robot1(gHostname,6666); > > > > > > > > Position2dProxy pp1(&robot1, gIndex); > > > > > > > > LaserProxy lp1(&robot1, gIndex); > > > > > > > > for(;;) > > > > > > > > { > > > > > > > > robot.Read(); > > > > > > > > robot1.Read(); > > > > > > > > pp.SetSpeed(0.5,dtor(30)); > > > > > > > > pp1.SetSpeed(0.8,dtor(45)); > > > > > > > > opData.data_count = 3; > > > > > > > > opData.data[0]='a'; > > > > > > > > opData.data[1]='b'; > > > > > > > > opData.data[2]='c'; > > > > > > > > opData.data[3]='\0'; > > > > > > > > op.SendCmd(&opData); > > > > > > > > std::cout << "SENT DATA"<<opData.data << std::endl; > > > > > > > > uint count = op.GetCount(); > > > > > > > > std::cout << "SENT count=" << count << std::endl; > > > > > > > > op.GetData(op1GetData); > > > > > > > > std::cout << "op1GetData[0]=" << op1GetData[0] << > > > > > > > > std::endl; > > > > > > > > std::cout << "op1GetData[1]=" <<op1GetData[1] << std::endl; > > > > > > > > std::cout << "op1GetData[2]=" <<op1GetData[2] << std::endl; > > > > > > > > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > > > > > > > > } > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > *************************************************************************** > > > > > > > > > > > > > > > > driver > > > > > > > > ( > > > > > > > > name "stage" > > > > > > > > provides ["simulation:0" ] > > > > > > > > plugin "libstageplugin" > > > > > > > > > > > > > > > > # load the named file into the simulator > > > > > > > > worldfile "opq1.world" > > > > > > > > ) > > > > > > > > > > > > > > > > driver( > > > > > > > > name "stage" > > > > > > > > model "r0" > > > > > > > > provides ["6665:position2d:0" "6665:laser:0" ] > > > > > > > > requires ["6665:opaque:0"] ) > > > > > > > > > > > > > > > > driver( name "stage" > > > > > > > > model "r1" > > > > > > > > provides ["6666:position2d:0" "6666:laser:0"] > > > > > > > > requires ["localhost:6665:opaque:0"] ) > > > > > > > > > > > > > > > > driver > > > > > > > > ( > > > > > > > > name "relay" > > > > > > > > provides ["6665:opaque:0"] > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > ************************************************************************ > > > > > > > > The GDB backtrace is as follows > > > > > > > > > > > > > > > > [swarm@localhost libplayerc++]$ gdb opq3 > > > > > > > > GNU gdb Red Hat Linux (6.6-35.fc8rh) > > > > > > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > > > > > > GDB is free software, covered by the GNU General Public > > > > > > > > License, and you are > > > > > > > > welcome to change it and/or distribute copies of it under > > > > > > > > certain conditions. > > > > > > > > Type "show copying" to see the conditions. > > > > > > > > There is absolutely no warranty for GDB. Type "show > > > > > > > > warranty" for details. > > > > > > > > This GDB was configured as "i386-redhat-linux-gnu"... > > > > > > > > (no debugging symbols found) > > > > > > > > Using host libthread_db library "/lib/libthread_db.so.1". > > > > > > > > (gdb) run > > > > > > > > Starting program: /home/swarm/Desktop/player-2.1.0rc1/examples/libplayerc++/opq3 > > > > > > > > > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/ac/2eeb206486bb7315d6ac4cd64de0cb50838ff6.debug > > > > > > > > (no debugging symbols found) > > > > > > > > (no debugging symbols found) > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/e8/38ce6093590b08883fd28e6008fb91964ef067.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/59/2af63ddff2a1ff221065e557f938cc2cb25cc7.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/88/27308433e33aeefb560f42fb133577c8936f20.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/92/8ab51a53627c59877a85dd9afecc1619ca866c.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/db/8cb95645d5df469d4aece301cdb5e60087be21.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/ba/4ea1118691c826426e9410cafb798f25cefad5.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/6c/1cdbb38ae2a292613c8c31195417ee80ea7e1e.debug > > > > > > > > [Thread debugging using libthread_db enabled] > > > > > > > > [New process 3224] > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/d0/b716d925c00494a40cff204a21530d0b96df8b.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/e3/3448de964a5ca97b70edbdcea227c6ea5d3657.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/04/aefaf601793e8d276f6b6c6f4da080babe3faf.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/07/b722c2a7fed5b96cf4b40ce0f2a06eb0f8d2fc.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/db/a292aff9720bfc3f25c53fa8e469168460a894.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/59/90d96516d0966b3e75c018e6129eee43965a6a.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/fa/4de2ee94deb82d3b7b6dddba32b4cbfb94dd8e.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/cc/a2a51671562775f944bce85a9476972b6994c8.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/34/0daf994019a9e2655d5c027d938d489510070c.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/03/5807c541381466da2f8457545e62c87066fd4f.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/90/ebf9c172c9332feed316b7c0fdff30ce1a15ae.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/8a/cc903fa48e73406552c64938e7866699a10801.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/54/97ce83a1cf21660e17bef3f4831e2f24afe795.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/41/b572ad1b8e3fac8fb0dadf6bcc2b61ef6e08a9.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/60/d593e7987c4f31a338bf509b15d713aa1fe1fb.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/7c/f32ecc91202c1747b80e3356a6828ae7ee97e7.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/13/e7ce3022231431f7402aed8afd467f81d091f0.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/0d/605d38e5e2d23fb14837dd95144b2d330b946c.debug > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/87/d66bafb3c5d1af9e5a91a447ef5efcc0a3ec3c.debug > > > > > > > > [New Thread -1209096496 (LWP 3224)] > > > > > > > > > > > > > > > > warning: Missing the separate debug info file: > > > > > > > > /usr/lib/debug/.build-id/a7/eabb854181ef5ff0c22b78c3e5048c64a2ebb8.debug > > > > > > > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > > > > [Switching to Thread -1209096496 (LWP 3224)] > > > > > > > > 0x08049c9f in main () > > > > > > > > > > > > > > > > ********************************************************************************** > > > > > > > > > > > > > > > > Any help with this code or some other alternate code for > > > > > > > > inter robot communication would be much appreciated. > > > > > > > > > > > > > > > > Regards > > > > > > > > Eshwaran > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > > This SF.net email is sponsored by: Microsoft > > > > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > > > _______________________________________________ > > > > > > > > Playerstage-developers mailing list > > > > > > > > Pla...@li... > > > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > This email is intended for the addressee only and may contain > > > > > > > privileged and/or confidential information > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > This SF.net email is sponsored by: Microsoft > > > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > > _______________________________________________ > > > > > > > Playerstage-developers mailing list > > > > > > > Pla...@li... > > > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > This SF.net email is sponsored by: Microsoft > > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > _______________________________________________ > > > > > > Playerstage-developers mailing list > > > > > > Pla...@li... > > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > This email is intended for the addressee only and may contain > > > > > privileged and/or confidential information > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by: Microsoft > > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > _______________________________________________ > > > > > Playerstage-developers mailing list > > > > > Pla...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Microsoft > > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > > > > Playerstage-developers mailing list > > > > Pla...@li... > > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > > > > > > -- > > > This email is intended for the addressee only and may contain > > > privileged and/or confidential information > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > Playerstage-developers mailing list > > > Pla...@li... > > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Playerstage-developers mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > > > > > > -- > This email is intended for the addressee only and may contain privileged > and/or confidential information > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > |