From: Paul O. <new...@ki...> - 2010-05-27 08:20:55
|
I was using SetProperty() in Stage-2.x for implementing example of implicit communication: although there was no explicit communication link used by robots, a robot could broadcast two messages ("follow me, I know where to go" vs "don't follow me, I'm wandering now") just by changing its color. Ability to change color at run time is not a common thing for real robots (however, I know about some rare examples), unfortunately, I can't see any other means for sending visual messages in Stage (consider, we could for example use a gripper: its open/close state would mean something; unfortunately, no sensor on other robot can distinguish current gripper state of its peer). This implicit communication example is not that important for me to make huge changes in Stage, so I won't miss it much, however it would be nice to have it back again. Paul On Wed, 26 May 2010, Richard Vaughan wrote: > I recently removed the SetProperty() code from Stage as it was very > little used and quite a large body of code to maintain. Right now > there is no way to change a robot's color from Player. > > if you're interested in hacking this functionality back in, get in > touch if you need some help. > > Richard/ > > On Mon, Mar 1, 2010 at 2:14 PM, A.Turner <and...@gm...> wrote: >> >> All, >> >> I have been trying to fix some code which worked in an earlier version of >> stage. I'm currently using stage v3.2.2 and player v3.0.1. I need to be able >> to change the colour of a robot during simulation, using it as a signalling >> procedure. Having searched the mailing list and other sites I have found >> some others with problems similar to mine however no solutions for later >> versions of stage. >> >> Extracts of the code I am using are given below. >> >> >> static uint32_t cyan = 0x0000ffff; >> >> uint32_t *color; >> color = &cyan; >> >> char *robotID = new char[7]; >> >> stringstream robot; >> robot << "eric" << id; >> robotID = const_cast<char*>(robot.str().c_str()); >> simProx->SetProperty(robotID,"_mp_color",color,(size_t)sizeof(uint32_t)); >> >> >> When the setProperty method is called get: >> >> playerc error : got NACK from request >> >> >> with an error trace of: >> >> warn: stg_simulation doesn't support msg with type/subtype 3/6 >> (/home/andy/Downloads/Stage-3.2.2-Source/libstageplugin/p_simulation.cc >> ProcessMessage) >> warning : Unhandled message for driver device=16777343:6665:simulation:0 >> type=request subtype=6 len=36 >> >> >> The identifier is correct when printed out. I was wondering whether the >> _mp_color property had changed, as in p_simulation.cpp in the stage source >> code it seemed to indicate it was called color now - not sure on this, >> however I tried this and it didn't work either. I also tried using 0x00ffff >> as in the definition in p_simulation.cpp it didn't have the proceeding alpha >> values in the RGB colour format - again unsure, simply stating 0xRRGGBB. I >> know from a previous issue that the colour format has changed recently from >> 0xffRRGGBB to 0x00RRGGBB. >> >> If anyone could shed any light on the issue that would be great. >> >> Thanks >> >> - Andy >> >> >> >> >> -- >> View this message in context: http://old.nabble.com/setProperty-Error-tp27743169p27743169.html >> Sent from the playerstage-users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Playerstage-users mailing list >> Pla...@li... >> https://lists.sourceforge.net/lists/listinfo/playerstage-users >> > > > > -- > Richard Vaughan > Autonomy Lab / Computing Science / Simon Fraser University > > ------------------------------------------------------------------------------ > > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > |