No Sensor Reading
Posted: Sun Jan 04, 2015 4:17 pm
Hello
I am trying to get values from Distance Scannar Sensor. My code is given below. I am trying to display the obtained values. Is there any problem in this code while getting the readings.
Unfortunately, my code is not entering into for loop. While there is no syntax error.
Thanks
I am trying to get values from Distance Scannar Sensor. My code is given below. I am trying to display the obtained values. Is there any problem in this code while getting the readings.
Code: Select all
const CCI_FootBotDistanceScannerSensor::TReadingsMap& tReads = m_ds->GetLongReadingsMap();
CCI_FootBotDistanceScannerSensor::TReadingsMap::const_iterator it;
for(it = tReads.begin(); it != tReads.end(); ++it)
{
printf("%s%d\t%s%f\t\n","Distance: ",it->second,"Angle : ", it->first.GetValue());
}
Thanks