From: Kevin B. <ba...@gm...> - 2008-11-06 20:43:22
|
Player 2.1 and Player 2.0 are not protocol compatible. There is no backwards compatibility and protocol compatibility is only designed into the minor releases (ie 2.0.3 and 2.0.4 are compatible) On Thu, Nov 6, 2008 at 3:25 PM, Alberto Valero <va...@di...> wrote: > Hi, I don't know if this will solve your problem, but I have had the same > problem (cannot subscribe) for some days and today I have solved "my" > problem. > > So, in the Ubuntu Repository there is the 2.0 player version (I use it as > a client). I had on the robot the 2.1 player version (from player > sourceforge code repository), for some silly reason, the 2.0 Ubuntu > version cannot "communicate" properly with the 2.1 version. I have solved > it installing on the robot also the 2.0 version (from Ubuntu Repository). > > Please, if anyone else has had the same problem... can you explain how is > it possible that the 2.1 is not "compatible" with the 2.0?? Am I doing > something wrong?? > > --Alberto. > >> >> Hi, >> >> I am using stage 2.0.3 with player 2.0 on Ubuntu Hardy Heron. I am >> working >> a on a predator-prey project. I am planning to use a lot of devices. For >> some reason whenever, I try to run my code it says cannot subscribe. I >> know >> it might something silly but I cant figure it out. Here is my cfg, world >> and >> cc files: >> >> >> driver >> ( >> name "stage" >> provides ["simulation:0"] >> plugin "libstageplugin" >> worldfile "worldfile.world" >> ) >> >> driver( name "stage" provides ["map:0" "6666:map:0" "6667:map:0" >> "6668:map:0" ] model "autolab" ) >> >> # predator 1 robot >> driver( >> name "stage" >> provides ["6666:position2d:0" "6666:laser:0" "6666:gripper:0" >> "6666:fiducial:0"] >> model "predator1" >> ) >> >> driver( >> name "vfh" >> requires ["6666:position2d:0" "6666:laser:0"] >> provides ["6666:position2d:1"] >> safety_dist 0.10 >> distance_epsilon 0.3 >> angle_epsilon 5 >> ) >> >> driver >> ( >> name "amcl" >> provides ["6666:localize:0" "6666:position2d:2"] >> requires ["odometry::6666:position2d:0" "6666:laser:0" >> "laser::6666:map:0"] >> ) >> >> driver( >> name "wavefront" >> provides ["6666:planner:0"] >> requires ["output::6666:position2d:1" "input::6666:position2d:0" >> "6666:map:0"] >> safety_dist 0.15 >> distance_epsilon 0.5 >> angle_epsilon 10 >> ) >> >> # predator 2 robot >> driver( >> name "stage" >> provides ["6667:position2d:0" "6667:laser:0" "6667:gripper:0" >> "6667:fiducial:0"] >> model "predator2" >> ) >> >> driver( >> name "vfh" >> requires ["6667:position2d:0" "6667:laser:0"] >> provides ["6667:position2d:1"] >> safety_dist 0.10 >> distance_epsilon 0.3 >> angle_epsilon 5 >> ) >> >> driver >> ( >> name "amcl" >> provides ["6667:localize:0" "6667:position2d:2"] >> requires ["odometry::6667:position2d:0" "6667:laser:0" >> "laser::6667:map:0"] >> ) >> >> driver( >> name "wavefront" >> provides ["6667:planner:0"] >> requires ["output::6667:position2d:1" "input::6667:position2d:0" >> "6667:map:0"] >> safety_dist 0.15 >> distance_epsilon 0.5 >> angle_epsilon 10 >> ) >> >> # prey robot >> driver( >> name "stage" >> provides ["6668:position2d:0" "6668:laser:0" "6668:gripper:0" >> "6668:fiducial:0"] >> model "prey" >> ) >> >> driver( >> name "vfh" >> requires ["6668:position2d:0" "6668:laser:0"] >> provides ["6668:position2d:1"] >> safety_dist 0.10 >> distance_epsilon 0.3 >> angle_epsilon 5 >> ) >> >> driver >> ( >> name "amcl" >> provides ["6668:localize:0" "6668:position2d:2"] >> requires ["odometry::6668:position2d:0" "6668:laser:0" >> "laser::6668:map:0"] >> ) >> >> driver( >> name "wavefront" >> provides ["6668:planner:0"] >> requires ["output::6668:position2d:1" "input::6668:position2d:0" >> "6668:map:0"] >> safety_dist 0.15 >> distance_epsilon 0.5 >> angle_epsilon 10 >> ) >> >> >> # defines Pioneer-like robots >> include "pioneer.inc" >> >> # defines 'map' object used for floorplans >> include "map.inc" >> >> # defines the laser model `sick_laser' configured like a Sick LMS-200 >> include "sick.inc" >> >> # set the resolution of the underlying raytrace model in meters >> resolution 0.04 >> >> interval_sim 100 # milliseconds per update step >> interval_real 100 # real-time milliseconds per update step >> >> size [25 25] >> >> gui_disable 0 >> gui_interval 100 >> gui_menu_interval 20 >> >> window( >> size [ 850 900 ] >> center [0 0] >> scale 0.03 >> ) >> >> map( >> bitmap "autolab.png" >> map_resolution 0.02 >> size [24 24] >> name "autolab" >> ) >> >> # define a robot type >> define predator pioneer2dx >> ( >> sick_laser >> ( >> pose [0.030 0.000 0.000] >> fiducialfinder(range_max 8 range_max_id 8) >> ) >> >> fiducial_return 1 >> gripper_return 0 >> localization "gps" >> localization_origin [0 0 0] >> ) >> >> # define a robot type >> define prey pioneer2dx >> ( >> sick_laser >> ( >> pose [0.030 0.000 0.000] >> fiducialfinder(range_max 8 range_max_id 8) >> ) >> >> fiducial_return 2 >> gripper_return 0 >> localization "gps" >> localization_origin [0 0 0] >> ) >> >> # create a predator robot >> predator >> ( >> color "red" >> name "predator1" >> #pose [-7 4.5 10] >> pose [-10 4.5 0] >> gripper(pose [0.200 0.000 0.000] color "gray") >> ) >> >> # create a predator robot >> predator >> ( >> color "red" >> name "predator2" >> #pose [-10 2 100] >> pose [-10 2.5 0] >> gripper(pose [0.200 0.000 0.000] color "gray") >> ) >> >> # create a prey robot >> prey >> ( >> color "green" >> name "prey" >> #pose [-3 2 250] >> pose [-10 6.5 270] >> gripper(pose [0.200 0.000 0.000] color "gray") >> ) >> >> #include <libplayerc++/playerc++.h> >> #include <iostream> >> #include <cstdlib> >> #include <cmath> >> #include "prey.h" >> >> using namespace PlayerCc; >> using namespace std; >> >> #include "args.h" >> >> int main(int argc, char** argv) >> { >> parse_args(argc, argv); >> try >> { >> PlayerClient robot(gHostname, gPort); >> Position2dProxy pdp(&robot, gIndex); >> PlannerProxy pp(&robot, gIndex); >> LaserProxy lp(&robot, gIndex); >> FiducialProxy fp(&robot, gIndex); >> >> //pp.SetEnable (true); >> //pp.SetGoalPose(0,0,0); >> >> while(1) >> { >> robot.Read(); >> cout << "fp.getcount = " << fp.GetCount() << endl; >> cout << "fp.id = " << fp.GetFiducialItem(0).id << endl; >> sleep(10); >> } // while >> } // try >> catch (PlayerCc::PlayerError e) >> { >> cerr << e << endl; >> return -1; >> } // catch >> } >> >> Here is my makefile just in case you need to review it: >> SRCS = prey.cc >> >> DEBUG = -g >> CXXFLAGS = $(DEBUG) -Wall >> INCLUDES = -I/usr/include/player-2.0 >> LDPATH = >> LIBS = -lplayerc++ -lplayercore >> >> EXEC = prey >> DEP_FILE = .depend_prey >> OBJS = $(SRCS:.cc=.o) >> >> # >> # You should not have to make any changes below this line! >> # >> >> .PHONY: all clean distclean >> >> >> all: depend_prey $(EXEC) >> >> $(EXEC): $(OBJS) >> @echo Makefile - linking $@ >> @$(CXX) $(LDPATH) $(LIBS) $^ -o $@ >> >> .cc.o: >> @echo Makefile - compiling $< >> @$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ >> >> clean: >> $(RM) core *.o >> #$(RM) core $(OBJS) >> >> distclean: clean >> $(RM) $(EXEC) >> $(RM) $(DEP_FILE) >> $(RM) scaled-autolab.pnm >> >> depend_prey: $(DEP_FILE) >> @touch $(DEP_FILE) >> >> $(DEP_FILE): >> @echo Makefile - building dependencies in: $@ >> @$(CXX) -E -MM $(CXXFLAGS) $(INCLUDES) $(SRCS) >> $(DEP_FILE) >> >> ifeq (,$(findstring clean,$(MAKECMDGOALS))) >> ifeq (,$(findstring distclean,$(MAKECMDGOALS))) >> -include $(DEP_FILE) >> endif >> endif >> >> When I run prey it comes to Position2dProxy command and says this: >> calling connect >> done >> playerc error : got NACK from request >> playerc error : failed to get response >> Position2dProxy::Position2dProxy()(-1) : could not subscribe >> >> Thanks. >> -- >> View this message in context: >> http://www.nabble.com/could-not-subscribe-to-any-device-tp20368257p20368257.html >> Sent from the playerstage-users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Playerstage-users mailing list >> Pla...@li... >> https://lists.sourceforge.net/lists/listinfo/playerstage-users >> > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > |