Distance value and proximity sensor id.

Requests regarding how to set up experiments in ARGoS.
AntonioC
Posts: 48
Joined: Mon Aug 30, 2021 7:02 pm

Distance value and proximity sensor id.

Postby AntonioC » Thu Oct 21, 2021 3:42 pm

Code: Select all

const CCI_FootBotProximitySensor::Treadings& tProxReads = m_pcProximity -> GetReadings();
The Footbot has 24 proximity sensors, numbered from 0 to 23. How can I get the measured value and the sensor ID?

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

Re: Distance value and proximity sensor id.

Postby pincy » Thu Oct 21, 2021 4:19 pm

Have a look at this example.
I made ARGoS.

AntonioC
Posts: 48
Joined: Mon Aug 30, 2021 7:02 pm

Re: Distance value and proximity sensor id.

Postby AntonioC » Thu Oct 21, 2021 4:56 pm

I read that. But I didn't understand how to get the last measured value for each sensor.

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

Re: Distance value and proximity sensor id.

Postby pincy » Thu Oct 21, 2021 5:02 pm

I'm sorry, but I don't understand the question. The values can be accessed using tProxReads[ i ].Value, where i is the index of the sensor you want. Do you need something else?
I made ARGoS.

AntonioC
Posts: 48
Joined: Mon Aug 30, 2021 7:02 pm

Re: Distance value and proximity sensor id.

Postby AntonioC » Fri Oct 22, 2021 7:37 pm

Now it's all clear. Thanks.


Return to “How to... ?”