<< return to Pixycam.com

Pushing a ball to a corner

For the robocup junior I need to detect aluminium balls and push them to a black corner. To detect the balls I’m using the pixy 2.1 camera and for the corner 2 color sensors. The program that I’m using is the ev3 software. I was wondering if its possible if the pixy camera sees a ball in a certain range, that it will be able to push it to the corner. I haven’t used the pixy camera in the past so I don’t really know how it works.

Ayisha

Hello,
This sounds like a task that Pixy is well suited for. Do you have a LEGO Pixy?
Here is the quickstart for LEGO Pixy:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixy_lego_quick_start

Edward

Hi,
Thank you for the response and sorry for the late reaction. I stil have another question. For another part of the robocup my robot has to avoid an obstacle. But the color of it isn’t specified. So is it possible if the pixy2.1 can detect something in a certain range. without knowing the color?

Ayisha

Hell
This can be challenging because Pixy is good at detecting objects, but detecting the absence of objects that you don’t know the color of is not something it was not designed to do. One idea is that if the ground is a known color (not black, white or gray), you can train Pixy on this color and objects that are a different color will cause the y position of the detected floor to change as the object gets closer.

It’s sometimes referred to as “ground plane assumption obstacle avoidance” and it relies on the fact that the camera is pointing down, which creates the following situation:

Objects that are closer to the camera are lower in the image, and
objects that are farther away from the camera are higher in the image

This page describes the technique (sorta):
https://www.roborealm.com/tutorial/Obstacle_Avoidance/slide010.php

Hope this helps!

Edward