No Sensor Reading

Requests regarding how to set up experiments in ARGoS.
Waqar731
Posts: 65
Joined: Thu Oct 23, 2014 12:33 pm
Location: Pakistan
Contact:

No Sensor Reading

Postby Waqar731 » 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.

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
Waqar Hussain

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: No Sensor Reading

Postby pincy » Fri Jan 09, 2015 1:27 am

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
I made ARGoS.

Waqar731
Posts: 65
Joined: Thu Oct 23, 2014 12:33 pm
Location: Pakistan
Contact:

Re: No Sensor Reading

Postby Waqar731 » Wed Jan 21, 2015 12:37 pm

Thanks a lot
Waqar Hussain


Return to “How to... ?”