eeros_architecture:hal:config_ros
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
eeros_architecture:hal:config_ros [2017/12/14 17:59] – graf | eeros_architecture:hal:config_ros [2017/12/14 18:34] – [How to Use the] graf | ||
---|---|---|---|
Line 47: | Line 47: | ||
| ::: | ::: | range_min | | | ::: | ::: | range_min | | ||
| ::: | ::: | range_max | | | ::: | ::: | range_max | | ||
+ | | DigIn | std_msgs:: | ||
+ | | DigOut | std_msgs:: | ||
+ | You can find a complete example, including a *.json file, in the [[getting_started: | ||
- | DigIn & sensor\_msgs:: | + | ===== How to Use the ===== |
- | + | ||
- | DigOut | + | |
- | + | ||
- | You can find a complete example, including a *.json file, in the eeros framework (/ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | \subsection{How to use} | + | |
- | + | ||
- | Refere to the documentation of the EEROS HAL\footnote{http:// | + | |
- | + | ||
- | + | ||
- | + | ||
- | First initialize the HAL in your main function: | + | |
- | + | ||
- | \lstset{language=c} | + | |
- | + | ||
- | \begin{lstlisting} | + | |
- | + | ||
- | ... | + | |
- | + | ||
- | int main(int argc, char **argv) { | + | |
- | + | ||
- | ... | + | |
- | + | ||
- | // HAL | + | |
- | + | ||
- | // //////////////////////////////////////////////////////////////////////// | + | |
- | + | ||
- | HAL& hal = HAL:: | + | |
- | + | ||
- | hal.readConfigFromFile(& | + | |
- | + | ||
- | ... | + | |
- | + | ||
- | \end{lstlisting} | + | |
- | + | ||
- | + | ||
- | + | ||
- | Add the header file to your control system: | + | |
- | + | ||
- | \lstset{language=c} | + | |
- | + | ||
- | \begin{lstlisting} | + | |
- | + | ||
- | #include < | + | |
- | + | ||
- | \end{lstlisting} | + | |
You can now declare \textit{PeripheralInputs} and \textit{PeripheralOutputs}: | You can now declare \textit{PeripheralInputs} and \textit{PeripheralOutputs}: | ||
- | \lstset{language=c} | + | <code cpp> |
- | + | ||
- | \begin{lstlisting} | + | |
PeripheralInput< | PeripheralInput< | ||
Line 116: | Line 65: | ||
PeripheralOutput< | PeripheralOutput< | ||
- | + | </ | |
- | \end{lstlisting} | + | |
Line 123: | Line 71: | ||
Call the constructor of the peripheral IOs with the \textit{signalID} used in the *.json file | Call the constructor of the peripheral IOs with the \textit{signalID} used in the *.json file | ||
- | \begin{lstlisting} | + | <code cpp> |
class MyControlSystem { | class MyControlSystem { | ||
Line 146: | Line 94: | ||
} | } | ||
+ | </ |
eeros_architecture/hal/config_ros.txt · Last modified: 2023/02/27 14:44 by ursgraf