ICub coding basics: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
(→‎rectification: add description)
m (moved RobotCub coding basics to ICub coding basics: RobotCub -> iCub)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Refer to [[RobotCub software]] to learn how to install, compile and update RobotCub software with Subversion (SVN). Below we will link to tutorials that are useful for people starting up with iCub and YARP coding.
Refer to [[iCub software]] to learn how to install, compile and update iCub software. Below we will link to tutorials that are useful for people starting up with iCub and YARP coding.


= General guides =
= General guides =


Highly recommended:
Highly recommended:
* http://eris.liralab.it/wiki/Summary_of_iCub_Software_Development_Guidelines
* http://wiki.icub.org/wiki/Summary_of_iCub_Software_Development_Guidelines
* http://eris.liralab.it/wiki/ICub_Documentation_Guidelines
* http://wiki.icub.org/wiki/ICub_Documentation_Guidelines
* http://eris.liralab.it/wiki/ICub_File_Organization_Guidelines
* http://wiki.icub.org/wiki/ICub_File_Organization_Guidelines


= Specific tutorials =
= Specific tutorials =


* Basic image processing tutorial: http://eris.liralab.it/iCub/dox/html/icub_basic_image_processing.html
* Tutorials on motor commands and basic image processing: http://wiki.icub.org/wiki/ICub_Tutorials


== Resource Finder ==
== Resource Finder ==
* http://eris.liralab.it/wiki/Resource_finder_overview
* http://wiki.icub.org/wiki/Resource_finder_overview
* RFModule class documentation (new version of Module class): http://eris.liralab.it/yarpdoc/d9/d26/classyarp_1_1os_1_1RFModule.html
* RFModule class documentation (new version of Module class): http://eris.liralab.it/yarpdoc/d9/d26/classyarp_1_1os_1_1RFModule.html
* Using the RFModule helper class to write a program: http://eris.liralab.it/iCub/dox/html/icub_tutorial_module.html
* Using the RFModule helper class to write a program: http://wiki.icub.org/iCub/main/dox/html/icub_resource_finder_basic.html and http://wiki.icub.org/iCub/dox/main/html/icub_resource_finder_advanced.html


== YARP ports ==
== YARP ports ==
* basic: http://eris.liralab.it/yarpdoc/note_ports.html
* basic: http://wiki.icub.org/yarpdoc/df/d05/note_ports.html
* advanced: http://eris.liralab.it/yarpdoc/port_expert.html
* advanced: http://wiki.icub.org/yarpdoc/db/dfb/port_expert.html
* Bottle class, useful for exchanging data among modules: http://eris.liralab.it/yarpdoc/d3/d3e/classyarp_1_1os_1_1Bottle.html#_details
* Bottle class, useful for exchanging data among modules: http://wiki.icub.org/yarpdoc/d3/d3e/classyarp_1_1os_1_1Bottle.html#_details


= Examples of modules =
= Examples of modules =


The following are good examples of modules from the iCub repository that are generally compliant with iCub configuration guidelines (RFModule class), coding standards and documentation standards.
The following are good examples of modules from the iCub repository that are generally compliant with iCub configuration guidelines (RFModule class), coding standards (configuration, graceful shut-down, thread-based execution, run-time user interaction) and documentation standards:


== myModule ==
* [http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/main/src/examples/demoModule/ demoModule]
A simple example to illustrate a module that is compliant with iCub Software Standards, addressing:
* http://wiki.icub.org/wiki/The_myModule_Example (referred to at the bottom of the [http://wiki.icub.org/wiki/Summary_of_iCub_Software_Development_Guidelines Summary of iCub Software Development Guidelines])
* configuration
* graceful shut-down
* thread-based execution
* run-time user interaction
*  documentation and coding standards
 
Functionally, the module just converts an input image to a binary image based on a supplied threshold.
 
* http://eris.liralab.it/wiki/The_myModule_Example (referred to at the bottom of the [http://eris.liralab.it/wiki/Summary_of_iCub_Software_Development_Guidelines Summary of iCub Software Development Guidelines])
*http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/src/myModule/
 
== Auto-Associative (Episodic) Memory ==
The Auto-Associative Memory (AAM) module, also known as Episodic Memory, effects the following functionality:
* when an image is presented to the memory, it attempts to recall that image;
* if a previously-stored image matches the presented image sufficiently well, the stored image is recalled;
* if no previously-stored image matches sufficiently well, the presented image is saved.
 
For details and source, see:
* http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/src/autoAssociativeMemory/
* http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/src/demoAAM/
* http://eris.liralab.it/wiki/Auto-associative_Memory_Specification
 
== crossPowerSpectrumVergence ==
Compute histogram of disparity values and select the local maximum value which corresponds to the regions closest to the cameras to control vergence.
 
* http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/src/crossPowerSpectrumVergence/
 
== logPolarTransform ==
Perform a log-polar transform on an input image and generate a transformed output image.
The direction of the transform, from Cartesian to log-polar or vice versa, is specified by a flag in the configuration file. The default direction is Cartesian to log-polar. The parameters of the transform, i.e., the number of angles, the number of rings, and the overlap of the receptive fields are specified in the configuration file.
 
* http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/src/logPolarTransform/
 
== rectification ==
Rectify two images generated by two verging cameras to remove the epipolar distortion.
 
In addition to rectifying the images as detailed in Dankers et al. 2004, we also shift the right image with respect to the left image to compensate for differences in the positions of the principal points in the left and right images.
 
* http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/src/rectification/src/


= See also =
= See also =


* [http://eris.liralab.it/wiki/How_to_write_a_module How to write a module]
* [http://wiki.icub.org/wiki/How_to_write_a_module How to write a module]
* [http://wiki.icub.org/wiki/Software_interface:_standard_port_names_for_hardware_devices Software interface: standard port names for hardware devices]


[[Category:Vislab]]
[[Category:Vislab]]
[[Category:C++]]
[[Category:C++]]
[[Category:YARP]]
[[Category:YARP]]

Latest revision as of 10:31, 7 April 2014

Refer to iCub software to learn how to install, compile and update iCub software. Below we will link to tutorials that are useful for people starting up with iCub and YARP coding.

General guides

Highly recommended:

Specific tutorials

Resource Finder

YARP ports

Examples of modules

The following are good examples of modules from the iCub repository that are generally compliant with iCub configuration guidelines (RFModule class), coding standards (configuration, graceful shut-down, thread-based execution, run-time user interaction) and documentation standards:

See also