diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b6d1a34..0d9ce1e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# This file is part of ocra-yarp. +# This file is part of ocra-icub. # Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) # author(s): Ryan Lober, Antoine Hoarau # @@ -59,6 +59,7 @@ yarp_configure_external_installation(codyco) add_subdirectory(ocra-icub) add_subdirectory(ocra-icub-server) +add_subdirectory(ocra-icub-clients) # add a target to generate API documentation with Doxygen diff --git a/NOTES.md b/NOTES.md deleted file mode 100644 index 5ea3ac8c..00000000 --- a/NOTES.md +++ /dev/null @@ -1,53 +0,0 @@ -#Usage notes for the ISIRWholeBodyController/gocraController - -These notes are written specifically for the iCubParis robots. Please be careful if you are implementing the controller on another platform. - -##General - -In order to run the controller `wholeBodyDynamicsTree` must be running to do torque estimation. Additionally, as of this writing, the `jointTorqueControl` module must be running for each part. This is generally accomplished by running `codycomoddev --from jtc_[part].ini` for each part. - - -##iCubParis02 - -###Setup - -Right now the left leg is not working so it has been deactivated in robotInterface. Because of this we have to modify the `.ini` for `wholeBodyDynamicsTree` and `yarpWholeBodyInterface`. These modified files are in: - - `$CODYCO_SUPERBUILD_ROOT/main/codyco-modules/src/modules/wholeBodyDynamicsTree/app/robots/iCubParis02/wholeBodyDynamicsTree_no_left_leg.ini` - - `$CODYCO_SUPERBUILD_ROOT/libraries/yarp-wholebodyinterface/app/robots/iCubParis02/yarpWholeBodyInterface_no_left_leg.ini` - - - We also have to modify the `.urdf` used by these programs, such that the left leg joints are all `fixed` rather than `revolute`. - - `$CODYCO_SUPERBUILD_ROOT/libraries/yarp-wholebodyinterface/app/robots/iCubParis02/model_fixed_left_leg.urdf` - - - Because the controller uses `yarpWholeBodyInterface` and `jointTorqueControl` we use an additional `yarpWholeBodyInterface` initialization file that ignores the left leg, and uses `JTC`. This is done in: - - `$CODYCO_SUPERBUILD_ROOT/libraries/yarp-wholebodyinterface/app/robots/iCubParis02/yarpWholeBodyInterface_no_left_leg_jtc.ini` - - where the actuator ports are prepended with /jtc/. Note that this assumes that JTC is running. - - Once this is modified, the [`ISIRWholeBodyController.ini`](/modules/ISIRWholeBodyController/app/robots/iCubParis02/ISIRWholeBodyController.ini) file must too be modified to call `yarpWholeBodyInterface_no_left_leg_jtc.ini` - - - Finally we need to calibrate the JTC gains and coeffs in the various `.ini` files located here: - - `$CODYCO_SUPERBUILD_ROOT/main/codyco-modules/src/devices/jointTorqueControl/app/robots/iCubParis02` - - - -###Launch - - 1. Make sure all computers in the cluster are turned on including pc104. - 2. Open `icub-cluster.py` and start yarpserver and yarprun on the computers. - 3. Open `yarpmanager`. - 4. Under `Applications` go to `WBD_JTC_Fixed_Base`. Open the application. - 5. Click `run` (the green play button). - 6. Launch `ISIRWholeBodyController` with whatever task set or sequence desired. - - -###Lookout for... - - The function [`getNominalPosture()`](/libs/taskSequences/src/sequenceTools.cpp) tries to access joint indexes on the left leg so when running without the left leg, make sure the appropriate lines are commented out. - - Some of the Cpp sequences work well in simulation but need much larger gains on the real robot. Additionally, many of them assume you are starting in the home posture and may cause collisions if starting from some other posture. - - Make sure to recalibrate `wholeBodyDynamicsTree` every 15-30 minutes: - ``` - yarp rpc /wholeBodyDynamicsTree/rpc:i - calib all 400 - ``` diff --git a/README.md b/README.md index e07e87e9..957eedcf 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,47 @@ -#ocra-wbi-plugins [![Build Status](https://travis-ci.org/ocra-recipes/ocra-wbi-plugins.svg?branch=master)](https://travis-ci.org/ocra-recipes/ocra-wbi-plugins) +# ocra-wbi-plugins [![Build Status](https://travis-ci.org/ocra-recipes/ocra-wbi-plugins.svg?branch=master)](https://travis-ci.org/ocra-recipes/ocra-wbi-plugins) Controller implementations and plugins for communicating between the whole body controller libraries developed at ISIR, [`ocra-recipes`](https://github.com/ocra-recipes/ocra-recipes), and the iCub Whole Body Interface, [`WBI`](https://github.com/robotology/wholebodyinterface), libraries. -##Code Structure - +## Code Structure Here's how everything is laid out... -###libs - -- [ocraWbiPlugins](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/ocraWbiPlugins) - - - Interface libraries between WBI and ocra. The interface consists primarily of an inherited [`Model`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/ocraWbiPlugins/src/ocraWbiModel.cpp) class who's virtual functions are implemented using WBI's functions. A [`utilities`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/ocraWbiPlugins/src/ocraWbiUtil.cpp) class is also available for converting between various dynamic representations. - -- [taskSequences](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/taskSequences) - - - This library contains a dictionary of "sequences" which are hard coded sets of tasks and control logic. New sequences go in the subdirectory [`sequences/`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/taskSequences/include/taskSequences/sequences) and are included in [`sequenceLibrary.h`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/taskSequences/include/sequenceLibrary.h) and their defintions are included in [`sequenceLibrary.cpp`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/taskSequences/src/sequenceLibrary.cpp). - -- [ocraObservers](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/ocraObservers) - - - *under construction* - - This library will eventually provide the base set of classes for creating "observerThreads" which can be launched in parallel to the controller for recording data in a way which will not affect controller performance. - -- [activityManagerTools](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/libs/activityManagerTools) - - - This library provides the necessary classes and tools for creating [`activityManagers`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/modules/activityManagers) which provide high level control logic and task set management. - - -###modules - -- [wocraController](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/modules/wocraController) - - - wocra controller implementation for the iCub. This module builds an executable which controls the iCub using a weighted QP controller. More info [here](https://github.com/ocra-recipes/ocra-recipes). - -- [gocraController](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/modules/gocraController) +### [ocra-icub](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/ocra-icub) - - gocra controller implementation for the iCub. This module builds an executable which controls the iCub using a generalized hierarchical QP controller. More info [here](https://github.com/ocra-recipes/ocra-recipes). +Interface libraries between WBI and ocra. The interface consists primarily of an inherited [`Model`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/ocra-icub/src/ocraWbiModel.cpp) class who's virtual functions are implemented using WBI's functions. A [`Utilities`](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/ocra-icub/src/Utilities.cpp) class is also available for converting between various dynamic representations. -- [ocraObservers](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/modules/ocraObservers) - - *under construction* - - "ObserverThreads" which can be launched in parallel to the controller for recording data in a way which will not affect controller performance will be held here. +### [ocra-icub-server](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/ocra-icub-server) -- [activityManagers](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/modules/activityManagers) +This is an implementation of the ocra-server interface which gets the robot specific model info, calls the `computeTorque()` function and then sends it to the robot. The rest of the code is designed around yarp `RFModule` and `RateThread`, to parse command line args, and talk to the WBI. At the core of this code is the implementation of [`ocra_recipes::ControllerServer`](https://github.com/ocra-recipes/ocra-recipes/tree/master/ocra-recipes/src/ContControllerServer.cpp) class. The rest of the code is icub specific. - - High level control logic and task set management modules. +### [ocra-icub-clients](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/ocra-icub-clients) -###cmake +### [cmake](https://github.com/ocra-recipes/ocra-wbi-plugins/tree/master/cmake) This folder provides various cmake modules which allow cmake to find various packages and build packages from these projects. -##Installation +## Installation -Superbuild! More details soon... +Everything here should be built with [`codyco-superbuild`](https://github.com/robotology/codyco-superbuild) to make sure you have all of the required libs. -##Usage +## Usage See the video tutorials... Work in progress. -##Authors +## Authors -###current developers +### current developers - [Ryan Lober](https://github.com/rlober) - [Antoine Hoarau](https://github.com/ahoarau) + - [Jorhabib Eljaik](https://github.com/jeljaik) - [Silvio Traversaro](https://github.com/traversaro) -###past developers +### past developers - [Darwin Lau](https://github.com/darwinlau) - [Mingxing Liu](https://github.com/mingxing-liu) diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 32654f8c..7fcc31c8 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "ocra-yarp" +PROJECT_NAME = "ocra-icub" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version diff --git a/ocra-icub-server/CMakeLists.txt b/ocra-icub-server/CMakeLists.txt index 87a729fd..be22d0b3 100644 --- a/ocra-icub-server/CMakeLists.txt +++ b/ocra-icub-server/CMakeLists.txt @@ -1,4 +1,4 @@ -# This file is part of ocra-yarp. +# This file is part of ocra-icub. # Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) # author(s): Ryan Lober, Antoine Hoarau # @@ -35,10 +35,6 @@ ADD_EXECUTABLE(${PROJECTNAME} ${folder_source} ${folder_header}) TARGET_LINK_LIBRARIES( ${PROJECTNAME} ocra-icub -# ${OcraRecipes_LIBRARIES} -# ${iDynTree_LIBRARIES} -# ${yarpWholeBodyInterface_LIBRARIES} -# ${Boost_LIBRARIES} ) INSTALL(TARGETS ${PROJECTNAME} DESTINATION bin) diff --git a/ocra-icub-server/app/CMakeLists.txt b/ocra-icub-server/app/CMakeLists.txt index bc17b8fd..85b847fa 100644 --- a/ocra-icub-server/app/CMakeLists.txt +++ b/ocra-icub-server/app/CMakeLists.txt @@ -1,4 +1,4 @@ -# This file is part of ocra-yarp. +# This file is part of ocra-icub. # Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) # author(s): Ryan Lober, Antoine Hoarau # diff --git a/ocra-icub-server/include/ocra-icub-server/Module.h b/ocra-icub-server/include/ocra-icub-server/Module.h index 9f993ba4..18145f31 100644 --- a/ocra-icub-server/include/ocra-icub-server/Module.h +++ b/ocra-icub-server/include/ocra-icub-server/Module.h @@ -7,7 +7,7 @@ * \copyright GNU General Public License. */ /* - * This file is part of ocra-yarp. + * This file is part of ocra-icub. * Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) * * This program is free software: you can redistribute it and/or modify diff --git a/ocra-icub-server/include/ocra-icub-server/Thread.h b/ocra-icub-server/include/ocra-icub-server/Thread.h index 800ff159..79b7c85a 100644 --- a/ocra-icub-server/include/ocra-icub-server/Thread.h +++ b/ocra-icub-server/include/ocra-icub-server/Thread.h @@ -7,7 +7,7 @@ * \copyright GNU General Public License. */ /* - * This file is part of ocra-yarp. + * This file is part of ocra-icub. * Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) * * This program is free software: you can redistribute it and/or modify diff --git a/ocra-icub-server/src/Module.cpp b/ocra-icub-server/src/Module.cpp index 6c3b2ce2..b8e38a61 100644 --- a/ocra-icub-server/src/Module.cpp +++ b/ocra-icub-server/src/Module.cpp @@ -7,7 +7,7 @@ * \copyright GNU General Public License. */ /* - * This file is part of ocra-yarp. + * This file is part of ocra-icub. * Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) * * This program is free software: you can redistribute it and/or modify diff --git a/ocra-icub-server/src/Thread.cpp b/ocra-icub-server/src/Thread.cpp index 6e6d85ef..5c5783fc 100644 --- a/ocra-icub-server/src/Thread.cpp +++ b/ocra-icub-server/src/Thread.cpp @@ -7,7 +7,7 @@ * \copyright GNU General Public License. */ /* - * This file is part of ocra-yarp. + * This file is part of ocra-icub. * Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) * * This program is free software: you can redistribute it and/or modify diff --git a/ocra-icub-server/src/main.cpp b/ocra-icub-server/src/main.cpp index 35c8f248..54fc145f 100644 --- a/ocra-icub-server/src/main.cpp +++ b/ocra-icub-server/src/main.cpp @@ -7,7 +7,7 @@ * \copyright GNU General Public License. */ /* - * This file is part of ocra-yarp. + * This file is part of ocra-icub. * Copyright (C) 2016 Institut des Systèmes Intelligents et de Robotique (ISIR) * * This program is free software: you can redistribute it and/or modify