Example #1
0
void MAPSJoin::WriteOutputs()
{
	_ioOutput = StartWriting(Output("LaserObjects"));
	AUTO_Objects &LaserObj = *static_cast<AUTO_Objects*>(_ioOutput->Data());
	LaserObj = ArrayLaserObjects;
	StopWriting(_ioOutput);

	_ioOutput = StartWriting(Output("CameraObjects"));
	AUTO_Objects &CameraObj = *static_cast<AUTO_Objects*>(_ioOutput->Data());
	CameraObj = ArrayCameraObjects;
	StopWriting(_ioOutput);

	_ioOutput = StartWriting(Output("AObjects"));
	AssociatedObjs &AssociatedObj = *static_cast<AssociatedObjs*>(_ioOutput->Data());
	AssociatedObj = joined;
	StopWriting(_ioOutput);

	_ioOutput = StartWriting(Output("NALaser"));
	NonAssociated &NALObj = *static_cast<NonAssociated*>(_ioOutput->Data());
	NALObj = nonLaserJoined;
	StopWriting(_ioOutput);

	_ioOutput = StartWriting(Output("NACamera"));
	NonAssociated &NACObj = *static_cast<NonAssociated*>(_ioOutput->Data());
	NACObj = nonCameraJoined;
	StopWriting(_ioOutput);
}
Example #2
0
void MAPSPredictor::WriteOutputs()
{
	// When we write the output we put the variable predicted to false to predict the next frame
	predicted = false;

	_ioOutput = StartWriting(Output("LaserObjects"));
	AUTO_Objects &list = *static_cast<AUTO_Objects*>(_ioOutput->Data());
	list = LaserObjectsOutput;
	StopWriting(_ioOutput);

	_ioOutput = StartWriting(Output("CameraObjects"));
	AUTO_Objects &list2 = *static_cast<AUTO_Objects*>(_ioOutput->Data());
	list2 = CameraObjectsOutput;
	StopWriting(_ioOutput);
}
Example #3
0
void GameGPD::CleanGPD()
{
    StartWriting();
	xdbf->Clean();
    io = xdbf->io;
    StopWriting();
}
Example #4
0
//To be completed by programmer, then called by programmer whenever necessary in order to
//output a data sample on output port data
void MAPShokuyo::Output_data(MAPSTimestamp t)
{
	MAPSIOElt* ioeltout = StartWriting(Output("data"));

// 	Start of user code Output on data implementation
	int count_LaserScan_out = 1; 	//changed it to the number of samples to write in output MAPSIOElt 
											//(but never more than the max vector size allocated on the output).
	LaserScan* data_out = (LaserScan*)ioeltout->Data();

	int i ;

	//Fill in data_out here.

	    for (i=0 ; i < 361 ; i++ )
	    {		data_out->range.push_back(  10.10f  ) ;
			if (i == 300 ) data_out->range.push_back(  1.10f  ) ;
	    }

	    for (i=361 ; i < 421 ; i++ )
	    {		data_out->range.push_back(  10.10f  ) ;
			if (i == 400 ) data_out->range.push_back(  2.20f  ) ;
	    }


	    for (i=461 ; i < 621 ; i++ )
	    {		data_out->range.push_back(  10.10f ) ;
			if (i == 600 ) data_out->range.push_back(  3.30f  ) ;
	    }


	    for (i=621 ; i < 721 ; i++ )
	    {		data_out->range.push_back(  10.10f ) ;
			if (i == 700 ) data_out->range.push_back(  4.40f  ) ;
	    }


	    for (i=721 ; i < 1081 ; i++ )
	    {		data_out->range.push_back( 10.10f ) ;
			if (i == 900 ) data_out->range.push_back(  5.50f  ) ;
	    }




    data_out->angle_min = -135.0f ;
    data_out->angle_max = 135.0f ;
 

	//....

	ioeltout->VectorSize() =  count_LaserScan_out * sizeof(LaserScan); //For non-standard datatypes, by convention,  
//	End of user code

	ioeltout->Timestamp() = t;	
	StopWriting(ioeltout);
}
void MAPSwifibot_inputs_robotml_to_rtmaps::Core() 
{
	MAPSIOElt* ioeltin = StartReading(Input(0));
	if (ioeltin == NULL)
		return;

	Speed_Tics_Left_Right* data_in = (Speed_Tics_Left_Right*)ioeltin->Data();

	MAPSIOElt* ioeltout = StartWriting(Output(0));
	ioeltout->Integer32(0) = data_in->speed_tics_left.value;
	ioeltout->Integer32(1) = data_in->speed_tics_right.value;

	ioeltout->Timestamp() = ioeltin->Timestamp();
	StopWriting(ioeltout);
}
Example #6
0
//To be completed by programmer, then called by programmer whenever necessary in order to
//output a data sample on output port ouput
void MAPSPilote::Output_ouput(MAPSTimestamp t)
{
	MAPSIOElt* ioeltout = StartWriting(Output("ouput"));

// 	Start of user code Output on ouput implementation
	int count_SpeedTics_out = 1; 	//changed it to the number of samples to write in output MAPSIOElt 
											//(but never more than the max vector size allocated on the output).
	SpeedTics* data_out = (SpeedTics*)ioeltout->Data();

	//Fill in data_out here.
	//....

	ioeltout->VectorSize() =  count_SpeedTics_out * sizeof(SpeedTics); //For non-standard datatypes, by convention,  
//	End of user code

	ioeltout->Timestamp() = t;	
	StopWriting(ioeltout);
}
//To be completed by programmer, then called by programmer whenever necessary in order to
//output a data sample on output port output
void MAPSPerception::Output_output(MAPSTimestamp t)
{
	MAPSIOElt* ioeltout = StartWriting(Output("output"));

// 	Start of user code Output on output implementation
	int count_Zone_out = 1; 	//changed it to the number of samples to write in output MAPSIOElt 
											//(but never more than the max vector size allocated on the output).
	Zone* data_out = (Zone*)ioeltout->Data();

	//Fill in data_out here.
	data_out->values[0] = (UInt16)(m_rfl[0]) ;
	data_out->values[1] = (UInt16)(m_rfl[1]) ;
	data_out->values[2] = (UInt16)(m_rfl[2]) ;
	data_out->values[3] = (UInt16)(m_rfl[3]) ;
	data_out->values[4] = (UInt16)(m_rfl[4]) ;

	ioeltout->VectorSize() =  count_Zone_out * sizeof(Zone); //For non-standard datatypes, by convention,  
//	End of user code

	ioeltout->Timestamp() = t;	
	StopWriting(ioeltout);
}
Example #8
0
bf_write::bf_write( void *pData, int nBytes, int nBits )
{
	m_bAssertOnOverflow = true;
	StartWriting( pData, nBytes, 0, nBits );
}
Example #9
0
bf_write::bf_write( const char *pDebugName, void *pData, int nBytes, int nBits )
{
	m_bAssertOnOverflow = true;
	m_pDebugName = pDebugName;
	StartWriting( pData, nBytes, 0, nBits );
}
Example #10
0
old_bf_write::old_bf_write( void *pData, int nBytes, int nBits )
{
	m_bAssertOnOverflow = true;
	m_pDebugName = NULL;
	StartWriting( pData, nBytes, 0, nBits );
}