GithubHelp home page GithubHelp logo

assignment_yarp-find-rgb's Introduction

Design a simple vision-based test

Gitpod

Prerequisites

For this assignment, you just need to be aware of:

Assignment

Before starting working on the robot, we need to check ๐Ÿ”ฆ if everything is working fine ๐Ÿ”ง. Particularly, we want to check if the robot neck and eyes are ok or not.

We ask you to design a simple test to check all these functionalities.

  • The robot stands in its wonderful world and a colorful ball pops up next to it โœจ.
  • We want to test the robot cameras, by checking if they are able to detect the correct ball color.
  • However, the ball is not located in front of the robot view (:smiling_imp:). Look for the ball while moving the robot head, until the robot can stare at this wonderful ball! This way, we can check also if the neck is working.

In practice, the test should be designed like that:

  • Control the robot head with a simple position control. Pay attentionโš ๏ธ the robot head has 6 DOF (degrees-of-freedom):

the first 3 qN (joint no. 0,1,2) control the neck, the last 3 qE (joint no. 3,4,5) control the eyes positions. Hint ๐Ÿ€: moving a single neck joint is enough for accomplish the test, guess which one!

  • Read the image coming from one of the robot cameras and send the RGB code of the image center through a port. Our tester will read this value and will check if everything is working fine! โœ…

How to interact with the code:

Write through a port: your code should receive the angle value through a BufferedPort. While you are developing your code, you can send this message through the terminal:

  • open a BufferedPort to communicate with your module
$ yarp write /angle-port

and you will get something like that

yarp: Port /angle-port active at tcp://192.168.14.1:10060/
yarp: Sending output from /angle-port to /head/ang:i using tcp
>>
  • connect your port thorugh the yarpmanager scripts provided from within app/scripts;
  • now send the angle value:
>>angle 10.0

Read from a port: you can check the RGB code sent from your code:

  • read from a BufferedPort:
$ yarp read /color-port 
  • connect using the yarpmanager scripts provided from within app/scripts;
  • you should see something like that (for instance):
yarp: Port /color-port active at tcp://192.168.14.1:10061/
yarp: Receiving input from /head/color:o to /color-port using tcp
yarp: Removing input from /head/color:o to /color-port
yarp: Receiving input from /head/color:o to /color-port using udp
184.0 199.0 207.0

Requirements to meet

The test is considered fully passed if you are able to:

  1. correctly implement the position control and choose the head joint to move;
  2. correctly send the data through the port;
  3. acquire the RGB code from the correct pixel of the image;

Score map

Requirements Points
1 5
2 5
3 5
Maximum score 15

Expected output

The ball appears next to the robot, but the robot is not looking at it! (Pay attention โš ๏ธ: the ball position is always the same, whereas the color magically changes every time you run your code ๐Ÿ˜ˆ)

At the end of your test, you should get something like that:

How to proceed

We provide you with a starter code that contains missing gaps you have to fill in. Don't panic, most of the software is already done and, where missing, is full of comments to help you out!

Once done, you can test your code in two ways:

  1. Manually: running the yarpmanager scripts provided from within app/scripts. This will help you interact with your code.
  2. Automatically: running the script test.sh in the smoke-test directory. This will give you an idea of how many points you might score.

assignment_yarp-find-rgb's People

Contributors

pabloreyesrobles avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.