Page 1 of 1

No Sensor Reading

Posted: Sun Jan 04, 2015 4:17 pm
by Waqar731
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.

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()); }
Unfortunately, my code is not entering into for loop. While there is no syntax error.


Thanks

Re: No Sensor Reading

Posted: Fri Jan 09, 2015 1:27 am
by pincy
Hi,

The distance scanner is a device that comes as a pair sensor/actuator.

To activate the sensor, you need to call the enable methods in the actuator. These methods also set the angle and the rotation speeds.

Cheers,
Carlo

Re: No Sensor Reading

Posted: Wed Jan 21, 2015 12:37 pm
by Waqar731
Thanks a lot