Size: 4665
Comment:
|
Size: 4591
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
* [http://www.gnu.org/software/automake/ automake] version 1.8 or later | |
Line 69: | Line 68: |
=== For an existing module, just checked out of CVS === | === For an existing module, just checked out of git === |
Requirements:
LAAS/OpenRobots tools
- [:mkdep:]
- [:pocolibs:]
- [:editline:libedit] (on platform that don't provide it, ie Linux, Solaris)
- [:eltclsh:]
- [:genom:]
External tools
These tools are generally available on most systems. If not, download them from the indicated web sites.
[http://www.gnu.org/software/autoconf/ autoconf] version 2.59 or later
[http://www.gnu.org/software/make/ make] version 3.79 or later
[http://pkgconfig.freedesktop.org/ pkgconfig] version 0.15 or later (Usually part of Gnome development packages).
[http://www.gnu.org/software/groff/groff.html groff] 1.10 or later (Usually part of system packages).
[http://www.tcl.tk/ Tcl/Tk] 8.0 or later development files (for eltclsh).
User environment:
Three environment variables need to be set in order to use the OpenRobots tools, when they are installed in a specific directory (ie not directly in /usr).
For instance at LAAS we install all the softwares in /usr/local/openrobots. Is is this value, ${prefix}, which is given to the option --prefix for GNU configure script. By default, the path for the architecture-dependent files, ${exec_prefix}, is equal to ${prefix}. However, this path can also be explicitely specified using the option --exec-prefix (eg, ${prefix}/i386-linux). It can be usefull if you compile for different architectures.
PATH: add ${exec_prefix}/bin to your PATH environment variable.
PKG_CONFIG_PATH: add ${exec_prefix}/lib/pkgconfig to your PKG_CONFIG_PATH environment variable, or set it to this value if it was not already defined.
LD_LIBRARY_PATH: add ${exec_prefix}/lib:${exec_prefix}/lib/openprs to your LD_LIBRARY_PATH environment variable, or set it to this value if it was not already defined.
Quick start guide
For a new module
write module.gen, moduleConst.h, moduleStruct.h
generate empty module + tcl client with genom -i -t module.gen
if your module foo depends on another module bar:
use -Pbar on the genom command line. One -P for each dependency
or better, you can use the require directive in the .gen file.
- create a build dir and cd to it
<path_to_src_dir>/configure --prefix=/home/<me>/openrobots/installed make make install
* This prefix means simply that your executable files will be placed there prefix/bin
Adding code files
- You put your files in codels/
Edit the codels/Makefile.in ,adding at codels_src= the name of these files.
Modyfying a module
- If you just changed the codels files, call
make make install
from the build/ directory of the module.
If you just changed the <module>.gen file or the files included in the .gen file ( like <module>Struct.h file ) or codels/Makefile.in then call
make regen make make install
from the build/ directory of the module.
For an existing module, just checked out of git
- generate the module server part once using either :
genom [options] module.gen
or genom-regen if your environemnt matches the environment where the module was last generated. Check GENOMFLAGS in autoconf/genom.mk for the list of arguments.
sometimes you need to specify for which robot you compile the module, use the -D option followed by the robot name : genom [options] -DROBOTNAME module.gen
- create a build dir and cd to it
<path_to_src_dir>/configure --prefix=/home/<me>/openrobots/installed make make install
Running the module & a simple client
h2 init <module> -b <module>Test 1
Running the module & tcl client
h2 init tclserv <module> -b eltclsh -package genom connect localhost lm <module> mboxInit
Now it's ready to send requests: ::<module>::....
End:
In eltclsh:
kill <module> exit
You can also use the die command, which kills tclserv and returns from the tcl interpreter
if the module has not been killed in eltclsh: killmodule <module>
killmymodules kills all the modules of a user
if tclserv has not be died in eltclsh: pkill tclserv
h2 end