Hello,

Gazebo will set the model_name to and empty string once it has
processed your request. So you should send your request, wait until
the model_name is "", and then read the response.

-nate

On Thu, Apr 17, 2008 at 11:53 AM, Maciej Gabka <[EMAIL PROTECTED]> wrote:
>
>  hello
>  I have got a little problem working with gazebo::SimulationIface, I have
>  seen an example in the source directory
>  simiface.cc. everything working with one robot , but I have a question how
>  get positions from for example 2 robots.
>  I try simply send 2 messages to the SimulationIface sth like that:
>                 uint8_t name[512] = "hmt_test1";
>                 uint8_t cmd[32] = "get_pose";
>                simIface0->Lock(1);
>                 client0->Query(0);
>                 memcpy((simIface0)->data->model_name, name, 512);
>                 memcpy((simIface0)->data->model_req,cmd, 32);
>                 videoData.data[0]->pos.x = 
> (simIface0)->data->model_pose.pos.x; //x
>                 videoData.data[0]->pos.y = 
> (simIface0)->data->model_pose.pos.y; //y
>                 videoData.data[0]->rot = (simIface0)->data->model_pose.yaw;
>                 simIface0->Unlock();
>  This piece of code is in the while loop where I change uint8_t name[512] =
>  "hmt_test1" into uint8_t name[512] = "hmt_test2" where hmt_test2 is the name
>  of my second robot model.
>  but changing the name in memcpy doesnt work...in all cases I recieve the
>  same robot positions but sometimes  this is first robot position and
>  sometimes second robot...its looks like client is not synchronized with the
>  server..
>
>  Anybody can help me?
>
>  Thank you!
>  maciek
>  --
>  View this message in context: 
> http://www.nabble.com/gazebo-0.9-pre2-tp16750979p16750979.html
>  Sent from the playerstage-gazebo mailing list archive at Nabble.com.
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  Don't miss this year's exciting event. There's still time to save $100.
>  Use priority code J8TL2D2.
>  
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>  _______________________________________________
>  Playerstage-gazebo mailing list
>  [email protected]
>  https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to