GithubHelp home page GithubHelp logo

aria_client's Introduction

Aria client for Pioneer robot

This piece of software along with aria_server is intended to help in integrating Pioneer robot and its camera with computer vision software which algorithms might be computationally expensive thus not usable on Pioneer's onboard computer.

Core of the software is robotManager class which is a container for four nested classes requestsHandler, keyHandlerMaster, cameraManager, steeringManager each being another smaller manager. These nested classes are responsible respectively for:

  • requesting and receiving general information about the robot
  • handling key strokes on client side
  • receiving camera stream from robot and steering its camera
  • steering the robot

Beginning

To reach properties and methods of nested classes one can use robotManager properties which are in fact instances of mentioned nested classes.

robotManager rManager( &argc, argv );

rManager.requests->methodOfClass_requestsHandler();
rManager.steering->methodOfClass_steeringManager();
rManager.camera->methodOfClass_cameraManager();
rManager.keyHandler->methodOfClass_keyHandlerMaster();

Verbose mode

To enable verbose mode in particular manager use enableVerboseMode() method.

rManager.camera->enableVerboseMode();

Steering Pioneer and its camera with client's keyboard

In order to activate robot's steering or camera's steering with keyboard use following methods.

  • ← → ↑ ↓ - steering robot
  • w s a d - camera pan / tilt
  • r f - camer zoom in / out
rManager.keyHandler->startKeyMaster(); // Activate key strokes handling
rManager.steering->activateKeySteering(); // Activate robot's steering
rManager.camera->activateCameraSteering(); // Activate camera steering

Camera stream to OpenCV

To get live stream from Pioneer's camera to OpenCV object you can use following code.

cv::namedWindow( "Stream", CV_WINDOW_AUTOSIZE );
std::pair<unsigned char*, int> imageData;
while( true )
{
    imageData = rManager.camera->getSendVideoFrame();
    std::vector<unsigned char> buffer( imageData.first, imageData.first + imageData.second );
    cv::Mat image = imdecode(buffer, cv::IMREAD_ANYCOLOR);
    if(image.empty())
        return 0;
    cv::imshow("Stream", image);
    cv::waitKey( myStream->getSynchroTime_ums() / 1000 );
}

aria_client's People

Contributors

mpiku avatar

Watchers

James Cloos 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.