Librviz Tutorial ================ **The RViz plugin API and library API are preliminary in Fuerte.** We welcome feedback about how to make them more powerful and easier to program with. We expect the APIs to change (possibly significantly) between Fuerte and Groovy. Overview -------- RViz is not just a visualizer application, it is also a library! Much of RViz's functionality can be accessed within your own application by linking against librviz.so (or whatever your OS likes to call it). This tutorial shows a very simple example of creating a 3D visualizer widget (rviz::RenderPanel), programmatically creating a new Grid display within it, then using Qt slider controls to adjust a couple of the grid's properties. The app is called "myviz". The source code for this tutorial is in the librviz_tutorial package. You can check out the source directly or (if you use Ubuntu) you can just apt-get install the pre-compiled Debian package like so:: sudo apt-get install ros-fuerte-visualization-tutorials The running application looks like this: .. image:: myviz.png The Code -------- The code for myviz is in these files: :svndir:`src/main.cpp`, :svndir:`src/myviz.h`, and :svndir:`src/myviz.cpp`. main.cpp ^^^^^^^^ The full text of main.cpp is here: :svndir:`src/main.cpp` .. tutorial-formatter:: ../main.cpp myviz.h ^^^^^^^ The full text of myviz.h is here: :svndir:`src/myviz.h` .. tutorial-formatter:: ../myviz.h myviz.cpp ^^^^^^^^^ The full text of myviz.cpp is here: :svndir:`src/myviz.cpp` .. tutorial-formatter:: ../myviz.cpp Building -------- The full text of CMakeLists.txt is here: :svndir:`CMakeLists.txt` .. tutorial-formatter:: ../../CMakeLists.txt Running ------- Just type:: rosrun librviz_tutorial myviz I want to reiterate here the warning at the top of this page, which is that the APIs will change between Fuerte and Groovy. I would love for people to try out these APIs and submit bugs describing problems with them, so the next version can be much better.