Difference between revisions of "Software Users Guide"

From David Vernon's Wiki
Jump to: navigation, search
(Setting up your machine: Running YARP)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
This guide explains how to use YARP and YARP tools to manage and run DREAM robot applications comprising a collection of components.
+
This guide explains how to use YARP and YARP tools to manage and run CINDY applications comprising a collection of components.
  
 
== Setting up your machine: Running YARP ==
 
== Setting up your machine: Running YARP ==
  
Once you have installed the DREAM software development environment you are (almost) ready to run the DREAM applications.
+
Once you have installed the CINDY software development environment you are (almost) ready to run the CINDY applications.
  
 
Before you do, you have to launch a YARP server and a YARP run server.
 
Before you do, you have to launch a YARP server and a YARP run server.
  
From the Windows 7 toolbar, launch a ''Command Prompt'' terminal and do the following.
+
From the Windows 10 toolbar, launch a ''Command Prompt'' terminal and do the following.
  
 
  yarp server
 
  yarp server
 +
 +
This launches the YARP name server.
  
 
Now, launch another ''Command Prompt'' terminal and do this.
 
Now, launch another ''Command Prompt'' terminal and do this.
  
  yarp run --server /dream1
+
  yarp run --server /cindy1
  
This creates a run server named <code>/dream1</code> and is used by YARP to find out where to execute the components in the application.
+
This creates a run server named <code>/cindy1</code> and is used by YARP to find out where to execute the components in the application.
  
== Using ''gyarpmanger'' to manage DREAM applications ==
 
  
DREAM software is just as set of interconnected components and DREAM software applications are defined by identifying the components to be used, the computers (nodes) on which they are to be run, and the connections between the various components.  All this is done with a <code>.xml</code> application file, normally stored in the <code>app</code> directory.
+
If the YARP name server complains about an invalid IP address, then do
 +
 
 +
yarp server --write
 +
 
 +
and again in another terminal
 +
 
 +
yarp run --server /cindy1
 +
 
 +
This allows YARP to overwrite the  YARP configuration file with the IP address of the computer.  In some instances, e.g. when setting up your own network of YARP servers, you may want to define your own static IP addresses for every computer on the network which you want to use as a YARP run server.  Instructions on how to do this will be provided in due course.
 +
 
 +
== Using ''gyarpmanger'' to manage CINDY applications ==
 +
 
 +
CINDY software is just as set of interconnected components and CINDY software applications are defined by identifying the components to be used, the computers (nodes) on which they are to be run, and the connections between the various components.  All this is done with a <code>.xml</code> application file, normally stored in the <code>app</code> directory.
  
  
Line 25: Line 38:
  
  
There is a default <code>ymanager.ini</code> file in the root of the DREAM directory and it simply tells ''gyarpmanager'' to look for all application <code>.xml</code> files under the <code>release</code> directory.
+
There is a default <code>ymanager.ini</code> file in the root of the CINDY directory and it simply tells ''gyarpmanager'' to look for all application <code>.xml</code> files under the <code>release</code> directory.
  
So, to finally get started, launch another (i.e. a third)  ''Command Prompt'' terminal, change directory to the DREAM root directory and enter ''gyarpmanager''
+
So, to finally get started, launch another (i.e. a third)  ''Command Prompt'' terminal, change directory to the CINDY root directory and enter ''gyarpmanager''
  
  C:/DREAM>gyarpmanager
+
  C:/CINDY>gyarpmanager
  
Once this tool has been launched, you need to open the applications you want to run.  Do this by opening on the Applications folder on the left-hand side and double-clicking on the application you are interested in.  You will see one with the original release of the DREAM repository <code>Demo_of_protoComponent'</code>.
+
Once this tool has been launched, you need to open the applications you want to run.  Do this by opening on the Applications folder on the left-hand side and double-clicking on the application you are interested in.  Find the one labelled <code>protoComponent_test</code> (included with the original release of the CINDY repository) and double-click on it.
 +
 
 +
 
 +
Now, click the ''Run'' the on the ''protoComponent_test'' interface panel.  It will launch four components. The first one - <code>imageSource</code> - streams images from a file to a port (simulating a camera). The second one - <code>protoComponent</code> - takes these images and does some simple image processing (binary thresholding). The other two components are Yarpview components to display the image data.
  
Now, click the ''Run'' the on the ''Demo_of_protoComponent'' interface panel.  It will launch two components. The first one - <code>imageSource</code> - streams images from a file to a port (simulating a camera). The second one - <code>protoComponent</code> - takes these images and does some simple image processing (binary thresholding).
 
  
 
Next, click the ''Connect'' button to see the result.
 
Next, click the ''Connect'' button to see the result.
 +
  
 
Click ''Stop'' to stop the application, i.e. the two components.
 
Click ''Stop'' to stop the application, i.e. the two components.
 +
 +
 +
Now try running the <code>protoComponentGUI_test</code> application.  It will launch three components, replacing the two Yarpview components  with a dedicated  <code>protoComponentGUI</code> component to display the images and set the threshold interactively.
 +
 +
 +
----
 +
Return to [[The CINDY Cognitive Architecture]] main page.

Latest revision as of 12:58, 4 June 2019

This guide explains how to use YARP and YARP tools to manage and run CINDY applications comprising a collection of components.

Setting up your machine: Running YARP

Once you have installed the CINDY software development environment you are (almost) ready to run the CINDY applications.

Before you do, you have to launch a YARP server and a YARP run server.

From the Windows 10 toolbar, launch a Command Prompt terminal and do the following.

yarp server

This launches the YARP name server.

Now, launch another Command Prompt terminal and do this.

yarp run --server /cindy1

This creates a run server named /cindy1 and is used by YARP to find out where to execute the components in the application.


If the YARP name server complains about an invalid IP address, then do

yarp server --write

and again in another terminal

yarp run --server /cindy1

This allows YARP to overwrite the YARP configuration file with the IP address of the computer. In some instances, e.g. when setting up your own network of YARP servers, you may want to define your own static IP addresses for every computer on the network which you want to use as a YARP run server. Instructions on how to do this will be provided in due course.

Using gyarpmanger to manage CINDY applications

CINDY software is just as set of interconnected components and CINDY software applications are defined by identifying the components to be used, the computers (nodes) on which they are to be run, and the connections between the various components. All this is done with a .xml application file, normally stored in the app directory.


YARP provides a GUI tool to help you run these application. This is called gyarpmanager. It is a powerful tool and you can read more about it here. For the present, just note that gyarpmanager can read a .ini configuration file to find out where the applications are (among other things).


There is a default ymanager.ini file in the root of the CINDY directory and it simply tells gyarpmanager to look for all application .xml files under the release directory.

So, to finally get started, launch another (i.e. a third) Command Prompt terminal, change directory to the CINDY root directory and enter gyarpmanager

C:/CINDY>gyarpmanager

Once this tool has been launched, you need to open the applications you want to run. Do this by opening on the Applications folder on the left-hand side and double-clicking on the application you are interested in. Find the one labelled protoComponent_test (included with the original release of the CINDY repository) and double-click on it.


Now, click the Run the on the protoComponent_test interface panel. It will launch four components. The first one - imageSource - streams images from a file to a port (simulating a camera). The second one - protoComponent - takes these images and does some simple image processing (binary thresholding). The other two components are Yarpview components to display the image data.


Next, click the Connect button to see the result.


Click Stop to stop the application, i.e. the two components.


Now try running the protoComponentGUI_test application. It will launch three components, replacing the two Yarpview components with a dedicated protoComponentGUI component to display the images and set the threshold interactively.



Return to The CINDY Cognitive Architecture main page.