GSoC 2020: Ignition RViz

Google Summer of Code 2020: Ignition RViz

Organization: Open Source Robotics Foundation
Mentor: Alejandro Hernández Cordero
Student: Sarathkrishnan Ramesh (sarathkrishnan99@gmail.com)
Link to GSoC project: Google Summer of Code

Greetings to all the fellow roboticists!

I was elated on receiving the opportunity to work on developing ignition-rviz for ROS2 under the Google Summer of Code 2020 program with Open Source Robotics Foundation this summer. I would like to thank my mentor @ahcorde for his support and guidance throughout the course of the project and I am extremely grateful to Open Robotics for providing me this opportunity. I thoroughly enjoyed working on the project and it has been an amazing experience for me.

About the project

RViz is a 3D visualization tool for robots using ROS and it has undeniably been a key component of every ROS developer during the development of their robot. With the recent development in ROS2 and the refactor of Gazebo into modular libraries i.e. ignition libraries, it was the perfect time to give RViz the much deserved revamp.

Link to the project; GitHub - gazebosim/gz-rviz: ROS 2 visualization using Gazebo Libraries

Ignition RViz is built using the ignition libraries, mainly, ign-rendering and ign-gui. The application inherits its material design and easy to use user interface from the ign-gui library, therefore attaining the standards of a modern-day application. All the plugins are developed using the widgets framework provided by the GUI library. The Scene3D widget is used as the main viewport which is powered by the ign-rendering library. The rendering library offers a unified API for creating graphics while providing an abstraction for different rendering engines. This is a departure from the current implementation of RViz which uses its own rendering abstraction supporting only OGRE. By using ignition libraries, maintenance becomes much easier as it ensures propagation of any updates like bug fixes or features from the underlying libraries to ignition-rviz.

basic

Plugins can be loaded by either display type or by topic. In the above demo, you can see the RobotModel along with its TF. The LaserScan data was visualized by loading the plugin by topic. You can undock, move around the config panel for all the plugins as well as change their background color for better visibility. The global options plugin is used to change the fixed frame.

A detailed description of the architecture of ign-rviz and display plugin system can be found in the project wiki: Home · gazebosim/gz-rviz Wiki · GitHub

The following display plugins were developed for ign-rviz:

Display Plugins

The following display plugins were developed:

Name Description
Global Options Configure global options like changing fixed frame and scene background color.
Axes Renders an axis at the origin of the target frame
Image Displays Image received as sensor_msgs::msg::Image ROS message
LaserScan Renders data from sensor_msgs::msg::LaserScan message as points in the world, drawn as points, rays and triangles
Path Renders data from nav_msgs::msg::Path message as lines, arrows or axes
PointStamped Renders data from geometry_msgs::msg::PointStamped message as spheres
Polygon Renders data from geometry_msgs::msg::PolygonStamped message as lines
Pose Renders data from geometry_msgs::msg::PoseStamped message as arrows or axes
PoseArray Renders data from geometry_msgs::msg::PoseArray message as arrows or axes
RobotModel RobotModelDisplay plugin renders robot model in the correct pose as defined by current TF transforms
TF Displays the robot TF transform hierarchy

Demos

all


Here we can see all the visualization plugins in action, with their config panels in the right split. The data visualized is PoseArray as red arrows, PoseStamped as Axes, PointStamped as Spheres, PolygonStamped as rotating cyan ring, and Path as the green line in the back.

n2o


This is a demo with Turtlebot3 simulation and Navigation2 in waypoint mode. The camera feed can be seen in the top left. RobotModel, LaserScan, robot footprint as Polygon and the robot plan as a Path is visualized.

Conclusion and Future plans

During the course of GSoC, I was able to achieve most of my goals and have developed some commonly used display plugins but there are still a few important ones like PointCloud & Costmap that are not yet available. Apart from adding support for the default plugins, I also have plans for developing plugins like robot teleop, plotting, and raw topic data display.

ign-rviz will be available to download as a binary in the near future. Till then if you are curious, you can try it out by building it from source. I would really appreciate any feedback from the community and will address any issues or bugs that come up.

I plan to continue to be active in the community and continue developing ign-rviz whilst contributing to ignition libraries as well as other ROS packages. I would once again like to thank my mentor @ahcorde and everyone at Open Robotics for providing me with this wonderful opportunity. It has been a great learning experience and I am looking forward to continuing to work with them.

About Me

I am Sarathkrishnan Ramesh, a final year undergrad student from Manipal Institute of Technology, Manipal, India. During my undergrad years, I was part of a research team, Project MANAS which focussed on building autonomous robots. The two core projects were building a self-driving car for Indian conditions and a UGV (which won the grand prize at Intelligent Ground Vehicle Competition 2019, Michigan, USA). These two projects marked the beginning of my journey into robotics.

Thanks and Regards,
Sarathkrishnan Ramesh

8 Likes

This is really exciting! I hadn’t really seen the benefits of the new API design for Ignition (breaking everything up) but now I’m starting to get it. Gazebo and RViz are now just different compositions of reusable software components built in the same ways.

Hopefully this gets more people trying ROS2 (and more funding for you all to develop and maintain!)

2 Likes

Gazebo and RViz are now just different compositions of reusable software components built in the same ways.

Are they? I don’t know the status, but it looks like there is ros2/rviz, which I assume supports the existing plugins made for ROS1 Rviz (e.g. MoveIt’s MotionPlanning plugin). Could you explain the motivation a little more @Sarathkrishnan? Is there an advantage over using OGRE and Qt? You mentioned maintenance, but is depending on ign-rendering easier than depending on OGRE? Rendering quality or performance maybe?

edit: Just noticed there was already a short discussion here

We’re happy to add more clarification if needed.

Just jumping in quickly to provide a bit more context here. The idea with this project was to provide a proof of concept and exercise the Ignition libraries in a setting different from Ignition Gazebo.

There’s been talk over the years of reducing duplication between Gazebo’s and RViz’s codebases. Ignition RViz is a step towards that, displaying what’s possible. RViz2’s development is still completely independent of Ignition and will likely remain like this for a long time. This is just an exploration step. We’d love to hear what the ROS community thinks about Ignition RViz.

Ignition Rendering provides an abstraction layer which allows different rendering engines to be plugged in at runtime. This flexibility could be useful for users looking for different degrees of performance and photorealism, or even different features.

I believe the main maintenance improvement comes from reducing duplication between various codebases.

1 Like

I’ve spent a lot of time making visualizations for Rviz in the past, which I opened sourced as rviz_visual_tools. That package heavily depends on Rviz’s MarkerArray display type, which does not appear to be ported to this yet. Any plans there? Its my favorite display type as you can make arbitrary visualizations with it, easily.

1 Like