Perspective camera eye-bot

Requests regarding how to set up experiments in ARGoS.
emerckx
Posts: 15
Joined: Tue Mar 29, 2016 1:37 pm
Location: Belgium
Contact:

Perspective camera eye-bot

Postby emerckx » Thu May 26, 2016 4:39 pm

Hello,

I'm using the perspective camera of the eye-bot to determine whether there's a colored spot on the ground.
This camera is pointed towards the ground by default, right?
However, when I call the GetReadings method, the SReadings is empty.

Code: Select all

const CCI_ColoredBlobPerspectiveCameraSensor::SReadings& sBlobs = m_pcCamera->GetReadings();
Is this correct behaviour or am I doing something wrong?

The attached picture is a frame of the experiment, which might make my issue more clear.
In the frame, I would like to have the eye-bot, which is on top of the red spot, detecting the color of the spot.
frame_00105.png
frame_00105.png (14.29 KiB) Viewed 11960 times
Sincerely yours,
Ewout Merckx

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

Re: Perspective camera eye-bot

Postby pincy » Thu May 26, 2016 4:55 pm

Hi Ewout,

The camera can only see LEDs or colored lights, not drawings on the floor.

Cheers,
Carlo
I made ARGoS.

emerckx
Posts: 15
Joined: Tue Mar 29, 2016 1:37 pm
Location: Belgium
Contact:

Re: Perspective camera eye-bot

Postby emerckx » Thu May 26, 2016 7:05 pm

Hello Carlo,

I've also tested it with lights, but still the readings remain empty...

In the picture below you can see the previous experiment, but now lights were added.
I have also tried to add lights of different colors, but got no result.
frame_00111.png
frame_00111.png (20.93 KiB) Viewed 11956 times
Sincerely yours,
Ewout merckx

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

Re: Perspective camera eye-bot

Postby pincy » Thu May 26, 2016 7:12 pm

Hi Ewout,

Can you show me your .argos file?

Cheers,
Carlo
I made ARGoS.

emerckx
Posts: 15
Joined: Tue Mar 29, 2016 1:37 pm
Location: Belgium
Contact:

Re: Perspective camera eye-bot

Postby emerckx » Thu May 26, 2016 10:03 pm

Hello Carlo,

I've added the (simplified) .argos file in the attached compressed file.

Sincerely yours,
Ewout Merckx
Attachments
eyebot_perspective_camera.zip
(1.01 KiB) Downloaded 595 times

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

Re: Perspective camera eye-bot

Postby pincy » Fri May 27, 2016 8:34 pm

Hi Ewout,

Do you call the method CCI_ColoredBlobPerspectiveCameraSensor::Enable() in your code? If you don't, the camera won't detect anything.

Cheers,
Carlo
I made ARGoS.

emerckx
Posts: 15
Joined: Tue Mar 29, 2016 1:37 pm
Location: Belgium
Contact:

Re: Perspective camera eye-bot

Postby emerckx » Sat May 28, 2016 3:39 pm

Hello Carlo,

Apparently I didn't call the method... :?
So I added a call to the method, as you can see in the code below, and now it works! :D

Code: Select all

m_pcCamera = GetSensor<CCI_ColoredBlobPerspectiveCameraSensor>("colored_blob_perspective_camera"); m_pcCamera->Enable();
Thank you so very much Carlo, for all your help.

Sincerely yours,
Ewout Merckx


Return to “How to... ?”