getting_started:ros_example
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| getting_started:ros_example [2024/11/15 10:43] – [Working with ROS2] ursgraf | getting_started:ros_example [2026/01/27 10:23] (current) – [Building] ursgraf | ||
|---|---|---|---|
| Line 26: | Line 26: | ||
| Your test program might look like | Your test program might look like | ||
| <code cpp> | <code cpp> | ||
| - | #include < | + | #include < |
| - | #include < | + | |
| #include < | #include < | ||
| | | ||
| Line 37: | Line 36: | ||
| ... | ... | ||
| ControlSystem cs(node, dt); | ControlSystem cs(node, dt); | ||
| + | ... | ||
| + | signal(SIGINT, | ||
| ... | ... | ||
| </ | </ | ||
| When defining a control system which uses ROS subscriber or publisher blocks, you have to pass this node to them. | When defining a control system which uses ROS subscriber or publisher blocks, you have to pass this node to them. | ||
| - | + | All ROS tools such as '' | |
| - | All ROS tools such as '' | + | |
| If you want to register a signal handler, e.g. for shutting down a system (see [[getting_started: | If you want to register a signal handler, e.g. for shutting down a system (see [[getting_started: | ||
| The ROS node will properly shut down as soon as the last node handler is destroyed when going out of scope. | The ROS node will properly shut down as soon as the last node handler is destroyed when going out of scope. | ||
| + | |||
| + | ==== Building and Running ==== | ||
| + | Before building you need to run the '' | ||
| + | < | ||
| + | source / | ||
| + | source / | ||
| + | </ | ||
| + | |||
| + | Make sure to run these scripts also before running the application. | ||
| + | |||
getting_started/ros_example.1731663814.txt.gz · Last modified: 2024/11/15 10:43 by ursgraf