From: A.Turner <and...@gm...> - 2010-03-01 13:29:56
|
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. |