195 std::string
cmd=msg->get(0).asString();
216 std::string name(msg->get(1).asString().c_str());
219 for (
int i=0; i<size; ++i)
273 if (
cmd==
"object" ||
cmd==
"object_with_label")
277 std::string name(msg->get(idd++).asString().c_str());
278 std::string label(
cmd==
"object_with_label"?msg->get(idd++).asString().c_str():
"");
280 double dx=msg->get(idd++).asFloat64();
281 double dy=msg->get(idd++).asFloat64();
282 double dz=msg->get(idd++).asFloat64();
284 double px=msg->get(idd++).asFloat64();
285 double py=msg->get(idd++).asFloat64();
286 double pz=msg->get(idd++).asFloat64();
288 double rx=msg->get(idd++).asFloat64();
289 double ry=msg->get(idd++).asFloat64();
290 double rz=msg->get(idd++).asFloat64();
292 int r=msg->get(idd++).asInt32();
293 int g=msg->get(idd++).asInt32();
294 int b=msg->get(idd++).asInt32();
296 double alpha=msg->get(idd++).asFloat64();
302 mObjectsRoot[i]->set(dx,dy,dz,px,py,pz,rx,ry,rz,r,g,b,alpha,label);
311 mObjectsWorld[i]->set(dx,dy,dz,px,py,pz,rx,ry,rz,r,g,b,alpha,label);
316 bool bWorld=(msg->size()>idd && msg->get(idd).asString()==
"WORLD");
320 mObjectsWorld.push_back(
new VisionObj(name,dx,dy,dz,px,py,pz,rx,ry,rz,r,g,b,alpha,label));
324 mObjectsRoot.push_back(
new VisionObj(name,dx,dy,dz,px,py,pz,rx,ry,rz,r,g,b,alpha,label));
330 if (
cmd==
"trajectory")
332 std::string name(msg->get(1).asString().c_str());
333 std::string label(msg->get(2).asString().c_str());
335 int bufflen=msg->get(3).asInt32();
336 double persistence=msg->get(4).asFloat64();
338 int R=msg->get(5).asInt32();
339 int G=msg->get(6).asInt32();
340 int B=msg->get(7).asInt32();
342 double alpha=msg->get(8).asFloat64();
343 GLfloat width=(GLfloat)msg->get(9).asFloat64();
363 bool bWorld=(msg->size()>10 && msg->get(10).asString()==
"WORLD");
379 std::string name(msg->get(1).asString().c_str());
381 double x=msg->get(2).asFloat64();
382 double y=msg->get(3).asFloat64();
383 double z=msg->get(4).asFloat64();