LESTER looks up, spins its wheels: The Register’s beer-butler can see ...

No beer will be left unbothered


British hip-hopsters The Streets memorably sang "It was supposed to be so easy", and that was our expectation when we approached the task of getting LESTER to "see" and trundle towards an object.

After all, there are innumerable ready-made robot kits, and the Raspberry Pi is ostensibly a tool to get children interested in computing, right?

Right?

beer

LESTER gets ready to trundle: The Register's beer-bot has a name

READ MORE

Getting a stock camera up and running on the Pi was straightforward enough using a fresh install of Raspbian. A few lines of Python, an import of the PiCamera library, and LESTER's single unblinking eye came to life.

Team LESTER planned to use OpenCV to allow LESTER to identify and follow a tag attached to a PFY. A swift apt-get should have been all we needed to import the cv2 library and commence rocking and rolling.

Sadly, it was not to be the case. After staring at a helpful “Import Error: No module named cv2” message for far longer than we should have, a bit of investigation revealed that Python 3.0, which we were running, was not happy with the repository, which needed Python 2.7.

In hindsight, maybe we should have found a way of reverting to Python 2.7, but no. This is Linux, the source is in git, so if we recompiled the OpenCV code on our Pi, everything would be shiny and golden.

Armed with innumerable helpful guides on the subject, and having tracked down all dependencies after a bit of trial and error, we hit "make" and waited...

And waited...

It took quite a while, and we later learned that we could have used multi-threading to save time. That isn't to say we didn't make good use of the hours of CPU churning, and demolished an impressive number of barbecued sausages along with copious amounts of delicious, delicious beer.

After fixing a missing symlink, the original error was gone. It was replaced by a slew of new ones, related to OpenCV's camera capture functions. According to the programmer's standby, StackOverflow, the solution was that the camera had somehow broken.

However, firing up PiCamera again showed LESTER's eye was working perfectly.

We then had the idea of simply taking the working PiCamera capture and converting it into something that OpenCV could understand. This is how we did it:

stream = io.BytesIO() 
camera.capture(stream, format='jpeg', use_video_port=True) 
image = np.fromstring(stream.getvalue(), dtype=np.uint8) 
frame = cv2.imdecode(image,1)

After a bit of configuration using the Range Detector utility LESTER was able to track a nice, bright, red ball.

Youtube Video

LESTER team member and bearded shonk-botherer Mark Wheeler takes a break from removing rust from Opel Monzas to wave a ball at LESTER's eye...

With the optics running, we attempted a first run at motor control. GPIO – the connection between the Pi and the outside world – is considerably simpler to use than anything involving OpenCV, and after a couple of minutes LESTER was turning its motors left and right in response to the motion of the ball.

The next step will be to add proximity detection to stop LESTER from enthusiastically ramming the PFY and mounting the whole assembly onto a frame to allow the prototype to demonstrate it can roll around.

LESTER prototype

LESTER undressed... pic: El Reg

Then we can start scaling things up in a most alarming way. ®

Similar topics


Other stories you might like

  • China rolls out bots to enforce ‘temporary closed-off management’ of Shanghai
    Drones, delivery-bots and robo-sprayers at work in locked-down megacity

    State-controlled media in China is proudly reporting the use of robots to facilitate the “temporary closed-off management” of Shanghai, which has experienced a new surge of COVID.

    The city of 26 million plus residents has been locked down as cases reportedly surge past the 13,000 mark each day, a new high for the city and a level of infection that China will not tolerate under its zero COVID policy. City authorities have quickly created 47,000 temporary hospital beds and increased capacity to four million tests each day. All residents have been required to take a test.

    Robots are helping to enforce the lockdown. Police have employed “drones equipped with a broadcasting system to patrol key areas.” The craft “publicize latest news and anti-pandemic prevention and control measures to the local communities." Which looks and sounds like this.

    Continue reading
  • Boston Dynamics' latest robot is a warehouse workhorse
    When does this thing get to unionize?

    Robotics company Boston Dynamics is making one of its latest robots more generally commercially available: a mobile, autonomous arm called Stretch.

    Stretch is outfitted with a vacuum gripping arm able to move a wide variety of box types and sizes, up to 50 pounds (≈22.7kg). Its footprint is about that of a warehouse pallet, and it can move around on its own, which Boston Dynamics said makes it a good fit for companies trying to automate without building a whole new factory.

    "Stretch offers logistics providers an easier path to automation by working within existing warehouse spaces and operations, without requiring costly reconfiguration or investments in new fixed infrastructure," Boston Dynamics said this week.

    Continue reading
  • Japanese startup makes baby carrier-style sling for 'Love Robots'
    Fittings open on Saturday, to make it easier to take motorized pals with you wherever you go

    Japanese startup Groove X will on Saturday stage fittings for a wearable sling - somewhat akin to baby carriers - designed to let owners of "Love Robots" more easily carry the machines wherever they go.

    The robots in question are called LOVOTs – a name that combines the words Love and Robot to reflect the creations' intended role as an object of domestic affection for residents of Japan that fancy cuddling up to a furry machine. LOVOTs roll around on wheels and have a cylindrical object on their head containing a camera and other sensors.

    The fitting session will take place in the newly expanded LOVOT Studio – a store in downtown Tokyo that this week opened a space in which LOVOT owners can congregate, with their robots, to enjoy each other's company among like-minded friends.

    Continue reading
  • Google helps develop AI-driven lab machine to diagnose Parkinson's
    Robo-worker manipulates test tubes and pipettes, images skin cells to classify disease

    A robotic system armed with AI-powered cameras can grow and image skin cells from test tubes to diagnose Parkinson's disease with minimal human help, according to researchers from Google and the New York Stem Cell Foundation.

    Parkinson's disease is estimated to affect 2 to 3 percent of the population over the age of 65. Nerve cells located deep within the basal ganglia region of the brain slowly die over time, impacting motion. Patients find it difficult to control their movements; their limbs may shake or feel stiff. Scientists aren't sure what causes the disease, and it is currently incurable.

    "Traditional drug discovery isn't working very well, particularly for complex diseases like Parkinson's," NYSCF's CEO Susan Solomon explained in a statement. "The robotic technology NYSCF has built allows us to generate vast amounts of data from large populations of patients, and discover new signatures of disease as an entirely new basis for discovering drugs that actually work."

    Continue reading

Biting the hand that feeds IT © 1998–2022