Coder Social home page Coder Social logo

icub_crawling's Introduction

iCub_crawling

This is the repo for new code for the iCub crawling. The code is under development :)

Overview of the modules

CrawlManager:

  • it is the main manager module, used for high-level interface and control of the limb controllers (generators)
  • input port /check_port/ gets the speed and the status from the generators
  • output port /parts_port sends the parameters to each part (amplitude, stance, swing etc.)
  • reads parameters from a configuration file crawling_managerConfig.ini which is currently in icub_crawling/app/contexts/crawling/
  • when launched, it is expecting the generators (x6, one for each limb) to be already running and connected to the robot. if they are not running, it gives a warning but the module starts

CrawlGenerator:

  • lower level module generating the motion patterns, using parameters given by the CrawlManager module
  • this class is instanciated once for each robot part :
    • the two arms
    • the two legs
    • the head
    • the torso each instance needs a parameter file describing the limb to be controlled
  • through connexions to other instances of this class, it couples the motion of the body parts_port
  • the actual velocity control of the actuators is delegated to the velocityControl module to which it sends the desired velocities
  • one instance of CrawlGenerator needs a corresponding one of velocityControl

Compiling and installation

For the three modules:

cd iCub_crawling/modules/crawlManager
mkdir build
cd build
ccmake ..
make

Where "crawlManager" has to be replaced by the name of the module to be compiled.

To make sure the configuration file crawling_managerConfig.ini is read correctly by the module, add these lines to .bashrc (if you are on Linux) or .bash_profile (if you are on OSX).

export crawling_root=PATH_WHERE_YOU_PUT_THE_CRAWLING_PROJECT/iCub_crawling
export YARP_DATA_DIRS=$YARP_DATA_DIRS:$crawling_root/app/
export PATH=$PATH:$crawling_root/app/contexts/crawling

To allow the programs to be executed without the need to explicitly type their path, one has also to update the PATH environment variable as follows in .bashrc (if you are on Linux) or .bash_profile (if you are on OSX).

export PATH=$PATH:$crawling_root/modules/crawlGenerator/build:$crawling_root/modules/crawlManager/build

It is possible not to do this, but then yarpmanager won't be able to find the crawlGenerator modules.

Finally, in order to create a crawling iCub model in Gazebo, do the following.

go to icub_gazebo folder

cp -r PATH_WHERE_YOU_PUT_THE_CRAWLING_PROJECT/gazebo_addin/icub_crawling/ PATH_WHERE_YOU_PUT_THE_GAZEBO_PLUGIN/icub-gazebo/

How to use it

For now, the ports the crawlGenerator connects to are hard-coded in the source. Thus, it would only work with iCub_SIM out of the box but one could change the port names in generatorThread.cpp to use the Gazebo simulator or the actual robot. Also the application description file crawling.xml should be adapted.

How to use it on iCub:

  1. start the yarp server with yarpserver
  2. start the gazebo simulator and insert the iCub into the world
  3. move to the app folder
  4. launch the yarp manager with the application description for the crawlGenerator module
    yarpmanager --application yarpmanager/crawling-gazebo.xml
    
    One only needs to open the Crawling applicaion (couble-click on it) and launch it by pressing the green button with a play-like shape.
  5. launch crawlManager (from modules/crawlManager/build)

The terminal is used to choose the appropriate action to do:

  1. init pos
  2. crawl straight
  3. faster
  4. slower
  5. turn right
  6. turn left
  7. stop (also closes the manager module)

icub_crawling's People

Contributors

serena-ivaldi avatar jbmouret avatar pi-q avatar

Watchers

 avatar  avatar  avatar Dorian Goepp 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.