|
| 1 | +# Overview |
| 2 | + |
| 3 | +The main porpuse for this repo is to organize all packages for the [Micro-ROS Poject]() funcionalities demostrations. |
| 4 | + |
| 5 | + |
| 6 | +# Package clusters |
| 7 | + |
| 8 | +The repository contains the belows packages clusters: |
| 9 | + |
| 10 | + |
| 11 | +## Simple message demostration |
| 12 | + |
| 13 | +### Packages |
| 14 | + |
| 15 | +#### Int32_publisher |
| 16 | + |
| 17 | +The porpuse of the package is to publicate a one of the simplest ROS2 message and demostrate how Micro-ROS down layers (rcl, typesupport and rmw) handle it. |
| 18 | +For each publication, the message value will be increased in one unit order to see in the subcriber side the menssage variations. |
| 19 | + |
| 20 | + |
| 21 | +#### Int32_subscriber |
| 22 | + |
| 23 | +The porpuse of the package is to subcribe to one of the simplest ROS2 message and demostrate how Micro-ROS down layers (rcl, typesupport and rmw) handle it. |
| 24 | + |
| 25 | + |
| 26 | +### Run demostration |
| 27 | + |
| 28 | +To run the demostration you have first to build all required packages in a Micro-ROS workspace. |
| 29 | +To read farther about how to build the Micro-ROS workspace click [here](). |
| 30 | + |
| 31 | +```bash |
| 32 | +cd ~/ros2_ws |
| 33 | +colcon build --cmake-args -DBUILD_SHARED_LIBS=ON --packages-up-to int32_publisher int32_subscriber uros_agent |
| 34 | +``` |
| 35 | + |
| 36 | + |
| 37 | +Configure enviroment |
| 38 | + |
| 39 | +```bash |
| 40 | +. ~/ros2_ws/install/local_setup.bash |
| 41 | +``` |
| 42 | + |
| 43 | + |
| 44 | +Run the Micro-xrce agent |
| 45 | + |
| 46 | +```bash |
| 47 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 48 | +./MicroRTPSAgent udp 8888 |
| 49 | +``` |
| 50 | + |
| 51 | +You may prefert to run the Agent in background and discatr all output in order still using the terminal for the next step. |
| 52 | + |
| 53 | +```bash |
| 54 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 55 | +./MicroRTPSAgent udp 8888 > /dev/null & |
| 56 | +``` |
| 57 | + |
| 58 | + |
| 59 | +Run the publisher. |
| 60 | + |
| 61 | +```bash |
| 62 | + ~/ros2_ws/install/int32_publisher/lib/int32_publisher/./int32_publisher |
| 63 | +``` |
| 64 | + |
| 65 | +You may prefert to run the publisher in background and discatr all output in order still using the terminal for the next step. |
| 66 | + |
| 67 | +```bash |
| 68 | + ~/ros2_ws/install/int32_publisher/lib/int32_publisher/./int32_publisher > /dev/null & |
| 69 | +``` |
| 70 | + |
| 71 | +Run the subcriber. |
| 72 | + |
| 73 | +```bash |
| 74 | +~/ros2_ws/install/int32_subscriber/lib/int32_subscriber/./int32_subscriber |
| 75 | +``` |
| 76 | + |
| 77 | +## String message demostration |
| 78 | + |
| 79 | +### Packages |
| 80 | + |
| 81 | +#### string_publisher |
| 82 | + |
| 83 | +The porpuse of the package is to publicate a simple string ROS2 message and demostrate how Micro-ROS down layers (rcl, typesupport and rmw) handle it. |
| 84 | +For each publication, the message string number will be increased in one unit order to see in the subcriber side the menssage variations. |
| 85 | + |
| 86 | + |
| 87 | +#### String_subscriber |
| 88 | + |
| 89 | +The porpuse of the package is to subcribe to a simple string ROS2 message and demostrate how Micro-ROS down layers (rcl, typesupport and rmw) handle it. |
| 90 | + |
| 91 | + |
| 92 | +### Run demostration |
| 93 | + |
| 94 | +To run the demostration you have first to build all required packages in a Micro-ROS workspace. |
| 95 | +To read farther about how to build the Micro-ROS workspace click [here](). |
| 96 | + |
| 97 | +```bash |
| 98 | +cd ~/ros2_ws |
| 99 | +colcon build --cmake-args -DBUILD_SHARED_LIBS=ON --packages-up-to string_publisher string_subscriber uros_agent |
| 100 | +``` |
| 101 | + |
| 102 | +Configure enviroment |
| 103 | + |
| 104 | +```bash |
| 105 | +. ~/ros2_ws/install/local_setup.bash |
| 106 | +``` |
| 107 | + |
| 108 | + |
| 109 | +Run the Micro-xrce agent |
| 110 | + |
| 111 | +```bash |
| 112 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 113 | +./MicroRTPSAgent udp 8888 |
| 114 | +``` |
| 115 | + |
| 116 | +You may prefert to run the Agent in background and discatr all output in order still using the terminal for the next step. |
| 117 | + |
| 118 | +```bash |
| 119 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 120 | +./MicroRTPSAgent udp 8888 > /dev/null & |
| 121 | +``` |
| 122 | + |
| 123 | + |
| 124 | +Run the publisher. |
| 125 | + |
| 126 | +```bash |
| 127 | + ~/ros2_ws/install/string_publisher/lib/string_publisher/./string_publisher |
| 128 | +``` |
| 129 | + |
| 130 | +You may prefert to run the publisher in background and discatr all output in order still using the terminal for the next step. |
| 131 | + |
| 132 | +```bash |
| 133 | + ~/ros2_ws/install/string_publisher/lib/string_publisher/./string_publisher > /dev/null & |
| 134 | +``` |
| 135 | + |
| 136 | +Run the subcriber. |
| 137 | + |
| 138 | +```bash |
| 139 | +~/ros2_ws/install/string_subscriber/lib/string_subscriber/./string_subscriber |
| 140 | +``` |
| 141 | + |
| 142 | + |
| 143 | +## Complex message demostration |
| 144 | + |
| 145 | +### Packages |
| 146 | + |
| 147 | +#### complex_msg |
| 148 | + |
| 149 | +One of the porpuses of the package is to demostrate how typesupport code is generated for a complex message. |
| 150 | +Also, the generation of a complex ROS2 structure message will be used to demostrate how down layers (rcl, typesupport and rmw) handle it. |
| 151 | +The message structure content the following types: |
| 152 | +- All primitive data types. |
| 153 | +- Nesting menssage data. |
| 154 | +- Unbonded string data. |
| 155 | + |
| 156 | + |
| 157 | +#### Complex_msg_publisher |
| 158 | + |
| 159 | +The porpuse of the package is to publicate a complex ROS2 message and demostrate how Micro-ROS down layers (rcl, typesupport and rmw) handle it. |
| 160 | +For each publication, the message values will be increased in one unit order to see in the subcriber side the menssage variations. |
| 161 | + |
| 162 | + |
| 163 | +#### Complex_msg_subscriber |
| 164 | + |
| 165 | +The porpuse of the package is to subcribe a complex ROS2 message and demostrate how Micro-ROS down layers (rcl, typesupport and rmw) handle it. |
| 166 | + |
| 167 | + |
| 168 | +### Run demostration |
| 169 | + |
| 170 | +To run the demostration you have first to build all required packages in a Micro-ROS workspace. |
| 171 | +To read farther about how to build the Micro-ROS workspace click [here](). |
| 172 | + |
| 173 | +```bash |
| 174 | +cd ~/ros2_ws |
| 175 | +colcon build --cmake-args -DBUILD_SHARED_LIBS=ON --packages-up-to complex_msgs complex_msg_publisher complex_msg_subscriber uros_agent |
| 176 | +``` |
| 177 | + |
| 178 | +Configure enviroment |
| 179 | + |
| 180 | +```bash |
| 181 | +. ~/ros2_ws/install/local_setup.bash |
| 182 | +``` |
| 183 | + |
| 184 | + |
| 185 | +Run the Micro-xrce agent |
| 186 | + |
| 187 | +```bash |
| 188 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 189 | +./MicroRTPSAgent udp 8888 |
| 190 | +``` |
| 191 | + |
| 192 | +You may prefert to run the Agent in background and discatr all output in order still using the terminal for the next step. |
| 193 | + |
| 194 | +```bash |
| 195 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 196 | +./MicroRTPSAgent udp 8888 > /dev/null & |
| 197 | +``` |
| 198 | + |
| 199 | + |
| 200 | +Run the publisher. |
| 201 | + |
| 202 | +```bash |
| 203 | + ~/ros2_ws/install/complex_msg_publisher/lib/complex_msg_publisher/./complex_msg_publisher |
| 204 | +``` |
| 205 | + |
| 206 | +You may prefert to run the publisher in background and discatr all output in order still using the terminal for the next step. |
| 207 | + |
| 208 | +```bash |
| 209 | + ~/ros2_ws/install/complex_msg_publisher/lib/complex_msg_publisher/./complex_msg_publisher > /dev/null & |
| 210 | +``` |
| 211 | + |
| 212 | +Run the subcriber. |
| 213 | + |
| 214 | +```bash |
| 215 | +~/ros2_ws/install/complex_msg_subscriber/lib/complex_msg_subscriber/./complex_msg_subscriber |
| 216 | +``` |
| 217 | + |
| 218 | + |
| 219 | +## Real aplication demostration |
| 220 | + |
| 221 | +This purpuse of the packages is to demostrate Micro-Ros stack can be used in a real aplication scenario. |
| 222 | +In this demostration an altitude control system will be simulated. |
| 223 | +The main purpuse of this is to see how Micro-Ros comunicates with Ros2 nodes. |
| 224 | + |
| 225 | +For farther information about this demostration click [here]() |
| 226 | + |
| 227 | + |
| 228 | +### Packages |
| 229 | + |
| 230 | +#### RAD0_actuator |
| 231 | + |
| 232 | +The mission of this node is to simulate a dummy altitude engine power actuator. |
| 233 | +It will receive power increments and publicate the total power amount as a DDS topic. |
| 234 | + |
| 235 | +The node will be built using the Micro-Ros middleware packages (rmw_micro_xrcedds and rosidl_typesupport_microxrcedds). |
| 236 | + |
| 237 | +It is meant to be running in on a microcontroller processor but for this demostration, the node will run on the host PC. |
| 238 | +The node will be conected to the DDS world throw a micro-xrce-agent. |
| 239 | + |
| 240 | + |
| 241 | +#### RAD0_altitude_sensor |
| 242 | + |
| 243 | +The mission of this node is to simulate a dummy altitude sensor. |
| 244 | +It will publicate the altitude variations as a DDS topic. |
| 245 | + |
| 246 | +The node will be built using the Micro-Ros middleware packages (rmw_micro_xrcedds and rosidl_typesupport_microxrcedds). |
| 247 | + |
| 248 | +It is meant to be running in on a microcontroller processor but for this demostration, the node will run on the host PC. |
| 249 | +The node will be conected to the DDS world throw a micro-xrce-agent. |
| 250 | + |
| 251 | + |
| 252 | +#### RAD0_control |
| 253 | + |
| 254 | +The mission of this node is to read altitude values and send to the actuator engine variations. |
| 255 | +It also will publicate the status (OK, WARNING or FAILURE) as a DDS topic. |
| 256 | +The status will depend on the altitude value. |
| 257 | + |
| 258 | +The node will be built using the ROS2 middleware packages (rmw_fastrtps and rosidl_typesupport_fastrtps). |
| 259 | + |
| 260 | +It is meant to be running in on a microcontroler processor and will be directly conected to de dds wold. |
| 261 | + |
| 262 | +#### RAD0_display |
| 263 | + |
| 264 | +The mission of this node is to simulate one LCD screen that will print the important parameters. |
| 265 | +It will subcribe to the altitude, power and status messages availables as a DDS topic. |
| 266 | + |
| 267 | +The node will be built using the Micro-Ros middleware packages (rmw_micro_xrcedds and rosidl_typesupport_microxrcedds). |
| 268 | + |
| 269 | +It is meant to be running in on a microcontroller processor but for this demostration, the node will run on the host PC. |
| 270 | +The node will be conected to the DDS world throw a micro-xrce-agent. |
| 271 | + |
| 272 | + |
| 273 | +### Run demostration |
| 274 | + |
| 275 | +Note: For this demostraton you need at least two open termninals, one for the Micro-ROS workspace and the other for the ROS2 workspace. |
| 276 | + |
| 277 | +#### Micro-ROS nodes |
| 278 | + |
| 279 | +To run the demostration you have first to build all required packages in a Micro-ROS workspace. |
| 280 | +To read farther about how to build the Micro-ROS workspace click [here](). |
| 281 | + |
| 282 | + |
| 283 | +```bash |
| 284 | +cd ~/ros2_ws |
| 285 | +colcon build --cmake-args -DBUILD_SHARED_LIBS=ON --packages-up-to rad0_actuator rad0_display rad0_altitude_sensor uros_agent |
| 286 | +``` |
| 287 | + |
| 288 | +Configure enviroment |
| 289 | + |
| 290 | +```bash |
| 291 | +. ~/ros2_ws/install/local_setup.bash |
| 292 | +``` |
| 293 | + |
| 294 | + |
| 295 | +Run the Micro-xrce agent |
| 296 | + |
| 297 | +```bash |
| 298 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 299 | +./MicroRTPSAgent udp 8888 |
| 300 | +``` |
| 301 | + |
| 302 | +You may prefert to run the Agent in background and discatr all output in order still using the terminal for the next step. |
| 303 | + |
| 304 | +```bash |
| 305 | +cd ~/ros2_ws/install/micrortps_agent/bin |
| 306 | +./MicroRTPSAgent udp 8888 > /dev/null & |
| 307 | +``` |
| 308 | + |
| 309 | +Run the altitude_sensor node. |
| 310 | + |
| 311 | +```bash |
| 312 | + ~/ros2_ws/install/rad0_altitude_sensor/lib/rad0_altitude_sensor/./rad0_altitude_sensor |
| 313 | +``` |
| 314 | + |
| 315 | +You may prefert to run the publisher in background and discatr all output in order still using the terminal for the next step. |
| 316 | + |
| 317 | +```bash |
| 318 | + ~/ros2_ws/install/rad0_altitude_sensor/lib/rad0_altitude_sensor/./rad0_altitude_sensor > /dev/null & |
| 319 | +``` |
| 320 | + |
| 321 | +Run the actitude node. |
| 322 | + |
| 323 | +```bash |
| 324 | + ~/ros2_ws/install/rad0_actuator/lib/rad0_actuator/./rad0_actuator |
| 325 | +``` |
| 326 | + |
| 327 | +You may prefert to run the publisher in background and discatr all output in order still using the terminal for the next step. |
| 328 | + |
| 329 | +```bash |
| 330 | + ~/ros2_ws/install/rad0_actuator/lib/rad0_actuator/./rad0_actuator > /dev/null & |
| 331 | +``` |
| 332 | + |
| 333 | +Run the display node. |
| 334 | + |
| 335 | +```bash |
| 336 | +~/ros2_ws/install/rad0_display/lib/rad0_display/./rad0_display |
| 337 | +``` |
| 338 | + |
| 339 | +#### ROS2 nodes |
| 340 | + |
| 341 | +To run the demostration you have first to build all required packages in a ROS2 workspace. |
| 342 | +To read farther about how to build the ROS2 workspace click [here](). |
| 343 | + |
| 344 | + |
| 345 | +```bash |
| 346 | +cd ~/ros2_ws |
| 347 | +colcon build --packages-up-to rad0_control |
| 348 | +``` |
| 349 | + |
| 350 | +Configure enviroment |
| 351 | + |
| 352 | +```bash |
| 353 | +. ~/ros2_ws/install/local_setup.bash |
| 354 | +``` |
| 355 | + |
| 356 | +Run the display node. |
| 357 | + |
| 358 | +```bash |
| 359 | +ros2 run control control & |
| 360 | +``` |
0 commit comments