Exemplo n.º 1
0
  void RobotConfiguration::deserialize(ObjectData& data, IdContext& /*context*/) {
    /*Serializable::deserialize(data,context);*/
    _name = data.getString("name");
    _baseReferenceFrameId = data.getString("baseReferenceFrameId");
    ArrayData& frameArray=data.getField("frames")->getArray();
    for (size_t i =0; i< frameArray.size(); i++){
      ValueData& v = frameArray[i];
      Identifiable* id = v.getPointer();
      ReferenceFrame* f = dynamic_cast<ReferenceFrame*>(id);
      if (f){
	addReferenceFrame(f);
      }
    }
    ArrayData& sensorArray=data.getField("sensors")->getArray();
    for (size_t i =0; i< sensorArray.size(); i++){
      ValueData& v = sensorArray[i];
      Identifiable* id = v.getPointer();
      BaseSensor* s = dynamic_cast<BaseSensor*>(id);
      if (s){
	cerr << "Adding Sensor: " << id->className() << endl;
	addSensor(s);
      }
    }
    isReadyUpdate();
  }
 void TwoDepthImageAlignerNode::Relation::deserialize(ObjectData& data, IdContext& context) {
   MapNodeBinaryRelation::deserialize(data,context);
   data.getReference("aligner").bind(_aligner);
   data.getReference("converter").bind(_converter);
   data.getReference("currentSensingFrame").bind(_currentSensingFrame);
   data.getReference("referenceSensingFrame").bind(_referenceSensingFrame);
   _topic = data.getString("topic");
   _inliers = data.getInt("inliers");
   _error = data.getFloat("error");
 }
Exemplo n.º 3
0
 void PinholeImageSensor::deserialize(ObjectData& data, IdContext& context){
   BaseSensor::deserialize(data, context);
   _cameraMatrix.fromBOSS(data, "cameraMatrix");
   _distortionModel=data.getString("distortionModel");
   _distortionParameters.fromBOSS(data, "distortionParameters");
 }
Exemplo n.º 4
0
 void BaseSensor::deserialize(ObjectData& data, IdContext& context){
   Identifiable::deserialize(data,context);
   _topic = data.getString("topic");
   _frame = 0;
   data.getReference("frame").bind(_frame);
 }
Exemplo n.º 5
0
void SensorDataNodeMaker::deserialize(ObjectData& data, IdContext& context) {
    StreamProcessor::deserialize(data,context);
    data.getReference("manager").bind(_mapManager);
    _topic = data.getString("topic");
}