getting_started:tutorials:systemros1
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| getting_started:tutorials:systemros1 [2024/10/09 11:53] – [Subscribing] ursgraf | getting_started:tutorials:systemros1 [2026/04/12 16:01] (current) – [Using ROS2] ursgraf | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| Open another shell in the build directory of your EEROS library and run | Open another shell in the build directory of your EEROS library and run | ||
| < | < | ||
| - | $ sudo -E ./ | + | $ sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH |
| </ | </ | ||
| IMPORTANT You have to run a program using real time threads with root privileges. | IMPORTANT You have to run a program using real time threads with root privileges. | ||
| ==== Publishing ==== | ==== Publishing ==== | ||
| - | This example runs your EEROS application as a ROS node under the name /// | + | This example runs your EEROS application as a ROS node under the name /// |
| - | * /test/vector | + | * /test/analogSignal |
| - | * /test/val (of type double) | + | * /test/analogSignalVector |
| - | * / | + | * / |
| + | * / | ||
| + | * / | ||
| + | * / | ||
| With | With | ||
| Line 33: | Line 36: | ||
| $ rostopic list | $ rostopic list | ||
| </ | </ | ||
| - | will list the three topics which are published be our node, /// | + | will list all the topics which are published be our node. |
| Open another shell to show the messages sent by EEROS, e.g. | Open another shell to show the messages sent by EEROS, e.g. | ||
| < | < | ||
| - | $ rostopic echo /test/vector | + | $ rostopic echo /test/analogSignalVector |
| </ | </ | ||
| With | With | ||
| < | < | ||
| - | $ rostopic hz /test/val | + | $ rostopic hz /test/analogSignalVector |
| </ | </ | ||
| you can easily check how often data is sent from out ROS node. Try to plot the data with | you can easily check how often data is sent from out ROS node. Try to plot the data with | ||
| < | < | ||
| - | $ rqt_plot /test/val /test1/vector/data[0] /test/vector/data[1] / | + | $ rqt_plot /test/analogSignal |
| </ | </ | ||
| Line 68: | Line 71: | ||
| Open a shell in the build directory of your EEROS library. This examples with ROS2 will only be present in your build directory if ROS2 was installed before building EEROS with '' | Open a shell in the build directory of your EEROS library. This examples with ROS2 will only be present in your build directory if ROS2 was installed before building EEROS with '' | ||
| + | Next, you have to run your ROS setup script together with the setup script for your EEROS messages. | ||
| + | < | ||
| + | $ source / | ||
| + | $ source < | ||
| + | </ | ||
| If you work on a target make sure to setup the environment as given in [[getting_started: | If you work on a target make sure to setup the environment as given in [[getting_started: | ||
| Open a shell in the build directory of your EEROS library and run | Open a shell in the build directory of your EEROS library and run | ||
| < | < | ||
| - | $ sudo -E ./ | + | $ ./ |
| </ | </ | ||
| - | IMPORTANT You have to run a program using real time threads with root privileges. | + | |
| ==== Publishing ==== | ==== Publishing ==== | ||
| This example runs your EEROS application as a ROS node under the name /// | This example runs your EEROS application as a ROS node under the name /// | ||
| - | * /test/vector | + | * /test/analogSignal |
| - | * /test/val (of type double) | + | * /test/analogSignalVector |
| - | * / | + | * / |
| + | * / | ||
| + | * / | ||
| + | * / | ||
| + | * / | ||
| With | With | ||
| Line 89: | Line 101: | ||
| $ ros2 topic list | $ ros2 topic list | ||
| </ | </ | ||
| - | will list the three topics which are published be our node, /// | + | will list all the topics which are published be our node. |
| Open another shell to show the messages sent by EEROS, e.g. | Open another shell to show the messages sent by EEROS, e.g. | ||
| < | < | ||
| - | $ ros2 topic echo /test/vector | + | $ ros2 topic echo /test/analogSignalVector |
| </ | </ | ||
| With | With | ||
| < | < | ||
| - | $ ros2 topic hz /test/val | + | $ ros2 topic hz /test/analogSignal |
| </ | </ | ||
| you can easily check how often data is sent from out ROS node. | you can easily check how often data is sent from out ROS node. | ||
| ==== Subscribing ==== | ==== Subscribing ==== | ||
| + | The topic ''/ | ||
| + | |||
| Open another shell in the build directory of your EEROS library and run '' | Open another shell in the build directory of your EEROS library and run '' | ||
| - | * / | + | * / |
| - | * / | + | * / |
| - | and logs its transported message values into the console. Alternatively you could publish | + | * / |
| + | * / | ||
| + | * / | ||
| + | |||
| + | and logs its transported message values into the console. Alternatively you could publish | ||
| < | < | ||
| - | $ ros2 topic pub / | + | $ ros2 topic pub / |
| - | $ ros2 topic pub / | + | $ ros2 topic pub / |
| </ | </ | ||
getting_started/tutorials/systemros1.1728467582.txt.gz · Last modified: by ursgraf
