ROS2: Path visualization in RViz and Gazebo


As we create the path for robot to use, and as the robot moves more or less along this path, we need to do something about visualizetion. The situation is rather odd: RViz can listen to our messages and show certain markers, but they are rather primitive. Gazebo, as opposed to RViz, can show almost anything, but its ability to listen is very poor.

In this section I am going to show few approaches to displaying path in both RViz and Gazebo. I will focus on path visualization, but you can do much more, for example, imagine that you model a tractor that does some agricultural operations in the virtual world. Same approach you use for drawing the path, can be used to "paint" the strip of the field that was already plied or harvested. Something like that.

A word of wisdom. In programming, there is usually more than one way of designing the class hierarchy of your project. I chose the fastest approach, but ideally, some of my classes should (probably) be broken to even more classes... Consider this an exercise.

(C), all rights reserved

Please read the disclaimer