2 @mainpage Eurobot Software Documentation
4 This document contains programmer documentation of some parts of
5 software developed by Eurobot team at Department of Control
6 Engineering, FEE, Czech Technical University. .
8 Currently, these modules are documented:
21 To regenerate this documentation, run @c doxygen in @c src
22 directory. The result can be found in @c src/doc/html/index.html.
24 \defgroup leds Meanings of LEDs on various boards
26 \defgroup canmsg CAN bus messages
29 Common files for all supported targets (CAN message IDs etc.).
32 Demo application to test compilation and demonstrate OMK usage.
35 Matlab/Simulink tests for localization and trajectory generation.
38 Main robot-control application(s) and support files.
40 \page compilation How to compile it
42 \section Prerequisites
44 To compile the software, you need the following programs and libraries.
54 On a Debian-based system, it is sufficient to run
56 apt-get install build-essential python pkg-config libidl-dev libpopt-dev libcv-dev libhighgui-dev libfftw3-dev qt4-dev-tools libusb-dev
61 Before first compilation, you should execute
62 <tt>build/prepare_infrastructure script</tt>.
65 ./prepare_infrastructure
67 It downloads repository
68 for @c h8s processors and configures sources. Then, it should be
69 sufficient to go to the <tt>build/<em><target></em></tt> directory and
76 \section cflags Custom compilation flags
78 To compile the project with debugging flags, put them to config.omk
79 file in <tt>build/*</tt> directory. Don't modify config.target,
80 because this will influence all other developers.
83 cat <<EOF >> config.omk
84 CFLAGS = -O0 -g -Wall -fno-strict-aliasing
85 CXXFLAGS = -O0 -g -Wall -fno-strict-aliasing
92 \section config Using multiple software configurations
94 OMK build system allows to configure compilation process so that we
95 can have multiple configurations of software (e.g.: with odometry
96 feedback or without). On the OMK side, the configuration is done by
97 setting make variables, from which headers files can be automatically
98 generated. In sources <tt>##ifdef</tt> can be used to compile
99 differently under different configuration.
106 produces list of all possible configuration variables in
107 <tt>config.omk-default</tt> (note, that this is also run by
108 <tt>prepare_infrastructure</tt>).
110 To use different value than the default one, put the variable
111 assignment to <tt>config.omk</tt> or (preferably) to
112 <tt>config.omk.local</tt>.
115 echo CONFIG_OPEN_LOOP = y >> config.omk.local
119 If you want to compile other configuration only temporarily you can
123 touch config.omk # make OMK notice a change
124 make CONFIG_OPEN_LOOP=y
127 or a more permanent way:
131 export CONFIG_OPEN_LOOP=y
132 make -e # the -e option is important!
135 \page logging Logging
137 We use uLUt library for logging. printf() should never be used for
138 printing some information - error message, debug data etc. Instead
139 ul_logXXX(), which is declared in ul_log.h, should be used.
141 \section loghowto Howto
143 In every file, where you want to log something you must initialize
144 ul_log.h library by using UL_LOG_CUST macro and defining the name of
147 UL_LOG_CUST(ulogd_robot); // Log domain name = "ulogd_" + the name of the source file
150 Then, you can use one of the functions (macros) bellow. Each macro
151 logs a message with different severity. The severity should be chosen
152 according to the following rules:
154 - ul_logfatal() - fatal error which causes the program to terminate.
155 These error should only be reported at program startup, not while
156 the program is running for a while.
158 - ul_logerr() - error i.e. something that should not happen during
159 normal operation. The application should be able to continue,
160 possibly with its functionality limited.
162 - ul_logmsg() - important information that should always be seen by
163 the operator. These messages with this log level are printed by
166 - ul_loginf() - not so important information, which is normally
167 suppressed and is displayed only on request.
169 - ul_logdeb() - debuging information. This information is only useful
170 to someone who knows the details of the source code.
172 - ul_logtrash() - lowlevel debugging information.