Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make transformation framework pluggable #346

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
c6fafad
Extract frame transformer from interface
Martin-Idel-SI Jul 18, 2018
a4eb84e
Delete tf2 dependency from frame_manager
Martin-Idel-SI Jul 19, 2018
cd60589
Improve interface
Martin-Idel-SI Jul 19, 2018
bcae120
Fix uncrustify
botteroa-si Jul 19, 2018
047ce24
Add tests for interface in frame_manager
Martin-Idel-SI Jul 19, 2018
10b3e7e
Add frame_transform_tf test
botteroa-si Jul 19, 2018
4aca341
Use weak_ptr instead of shared_ptr for internal object
Martin-Idel-SI Jul 19, 2018
34f8e0c
Add visibility control
Martin-Idel-SI Jul 19, 2018
0e7b56c
Fix linters
botteroa-si Jul 19, 2018
25addf1
Delete superfluous code
Martin-Idel-SI Jul 19, 2018
62c765d
Add missing include to fix build
botteroa-si Jul 23, 2018
a5c1d01
Change name of FrameTransformer member of FrmeManager
botteroa-si Jul 23, 2018
b38626c
Refactor frame_transformer_tf_test
botteroa-si Jul 23, 2018
9117995
Add methods to TFWrapper and make buffer_ private
botteroa-si Jul 23, 2018
7549ed8
Fix rviz_default_plugins after changes in TFWrapper
botteroa-si Jul 23, 2018
65f09b6
Change name of wrapper_ to tf_wrapper_
botteroa-si Jul 23, 2018
273e836
Minor refactoring
botteroa-si Jul 23, 2018
d8b6265
Create TransformationManager class
botteroa-si Jul 23, 2018
4c7b2cb
Add getTypeId() method to FrameTransformer
botteroa-si Jul 23, 2018
336a5a3
Use TransformationManager class
botteroa-si Jul 23, 2018
af691ab
Add structs and helpers for Time, PoseStamped and TransformationStamped
botteroa-si Jul 23, 2018
27382ed
Remove ROS dependencies from frame_manager.hpp
botteroa-si Jul 23, 2018
83fd0df
Fix tests and mocks
botteroa-si Jul 23, 2018
fb3adde
Update and fix rviz_default_plugins mocks
botteroa-si Jul 24, 2018
2b0c53f
Add visibility control to structs.hpp
botteroa-si Jul 24, 2018
c9f757e
Add visibility control to helper methods
botteroa-si Jul 24, 2018
2414d6f
Add unit tests for helper methods
botteroa-si Jul 24, 2018
17c6683
Fix Windows warnings
botteroa-si Jul 24, 2018
1598a82
Move FrameTransformer and TransformationManager to namespace transfor…
botteroa-si Jul 24, 2018
1c7edc4
Fix build
botteroa-si Jul 24, 2018
c14682e
Make FrameTransformer::transform() return a PoseStamped and rename Fr…
botteroa-si Jul 24, 2018
fb4667d
Refactor frame_transformer.hpp
botteroa-si Jul 24, 2018
6851143
Refactor tf_wrapper and frame_transformer_tf
botteroa-si Jul 24, 2018
1872a3f
Add struct.cpp and make also structs ros-independent
botteroa-si Jul 24, 2018
1750ebb
Fix Windows build
botteroa-si Jul 24, 2018
7a0ad04
Add tests for new conversion methods and refactor structs and tests
botteroa-si Jul 25, 2018
bb9ddfc
Fix uncrustify
botteroa-si Jul 25, 2018
38d1064
Use rclcpp::Time instead of rviz_common::tranformation::time in Frame…
botteroa-si Jul 25, 2018
f7df47a
Fix Windows warnings
botteroa-si Jul 25, 2018
5eab067
Add documentation to frame_transformer.hpp
botteroa-si Jul 25, 2018
e387c8f
Cleanup: typos
anhosi Jul 25, 2018
51409aa
Add TransformationPanel to change transformation plugin at runtime
greimela-si Jul 23, 2018
b893e13
Better naming for init method
greimela-si Jul 23, 2018
76b4df7
Remove unused imports
greimela-si Jul 23, 2018
1db5bde
Use the TransformationManager in the TransformationPanel
greimela-si Jul 24, 2018
9c0a194
Replace the button group by a PropertyTreeWidget with radio buttons
greimela-si Jul 25, 2018
d503f55
Fix linters
greimela-si Jul 26, 2018
0797224
Move FrameTransformerTF to rviz_default_plugins
greimela-si Jul 24, 2018
e9b3f59
Move TFWrapper and FrameTransformerTFTest to rviz_default_plugins
greimela-si Jul 24, 2018
aa3e244
Extend TransformationManager to take ROS node in constructor
greimela-si Jul 24, 2018
ada5757
Correct namespaces and includes
greimela-si Jul 24, 2018
2e517bb
Load FrameTransformerTF using pluginlib
greimela-si Jul 24, 2018
774010b
Fix linters
greimela-si Jul 24, 2018
0a1efdf
Rename FrameTransformerTF to TFFrameTransformer
greimela-si Jul 24, 2018
cf2ef06
Add DummyTransformer
botteroa-si Jul 25, 2018
f1a6c42
Fix connection between TransformationManager and FrameManager
greimela-si Jul 26, 2018
780a7a2
Move transformation_manager.hpp to include folder (to be used in rviz…
botteroa-si Jul 26, 2018
dad745a
Minor refactoring
botteroa-si Jul 27, 2018
a59f47f
Add virtual destructor to FrameTransformer to avoid crash when changi…
botteroa-si Jul 26, 2018
b2dc7cc
Use shared_ptr instead of unique_ptr to be consistent with signal def…
botteroa-si Jul 26, 2018
2d9c601
Draw checkbox instead of radio button in RadioButtonProperty
greimela-si Jul 26, 2018
06bfd79
Rename RadioButtonProperty into GroupedCheckboxProperty
greimela-si Jul 26, 2018
b15f2ae
Add tests for DummyTransformer
botteroa-si Jul 26, 2018
1aa0862
Minor style fixes in TransformationManager
greimela-si Jul 26, 2018
f94b91d
Store pointer to TransformationManager in TransformationPanel
greimela-si Jul 26, 2018
4cb91d8
Add PluginInformation struct to rviz_common::Factory
greimela-si Jul 26, 2018
21b1eb6
Improve interface of TransformationManager and its usage in Transform…
greimela-si Jul 26, 2018
ecfebe7
Rename DummyTransformer into IdentityFrameTransformer
greimela-si Jul 26, 2018
ff2bc06
Omit "FrameManager" from TFFrameManager plugin name
greimela-si Jul 26, 2018
f6025cb
Add convenience base class for displays that only work with TFTransfo…
botteroa-si Jul 27, 2018
814419f
Allow LaserScan display to handle changes of the FrameTransformer type
botteroa-si Jul 27, 2018
ded62bf
Add tests for LaserScanDisplay new functionality
botteroa-si Jul 27, 2018
7a72298
Minor cleanup in Transformer user interface
greimela-si Jul 27, 2018
5f81e9f
Refactor factories to work with PluginInfo
greimela-si Jul 27, 2018
734dd1a
Change design: from a base common class (OnlyTfCompatibleBaseDisplay)…
botteroa-si Jul 27, 2018
4ed214e
Handle user triggered enable/disable events when using wrong transfor…
botteroa-si Jul 30, 2018
f3d0eb1
Expose a method to check if the current transformer is the correct on…
botteroa-si Jul 30, 2018
0560e64
Rename TransformerHandlerDelegate to TransformerGuard
botteroa-si Jul 30, 2018
e785cd5
Add tests for TransformerGuard
botteroa-si Jul 30, 2018
c16fa40
Remove no longer actual laser_scan_display_test.cpp and fix linters
botteroa-si Jul 30, 2018
477da3c
Move TransformerGuard to namespace transformation
botteroa-si Jul 30, 2018
ccf580a
Use TransformerGuard in TFDisplay to make it handle changes of the Fr…
botteroa-si Jul 30, 2018
c45de8f
Add config loading and saving to TransformationManager
greimela-si Jul 30, 2018
6208933
Use TransformGuard in RobotModelDisplay
botteroa-si Jul 30, 2018
775af65
Make TransformerGuard check the transformer when display is added
botteroa-si Jul 30, 2018
f32c02a
Harmonize comment style in frame_transformer.hpp and add TODO for com…
botteroa-si Jul 30, 2018
c89dc6b
Add visibility control to the IdentityTransformer
greimela-si Jul 30, 2018
708e4e3
Add a TransformerGuard test and fix broken one
botteroa-si Jul 30, 2018
b3a6843
Rename structs members without the final underscore
botteroa-si Jul 30, 2018
47286bc
Use namespace ::testing in ros_conversion_helpers_test.cpp
botteroa-si Jul 30, 2018
93ac8ba
Add new FrameManager tests and refactor old ones
botteroa-si Jul 30, 2018
a43a12c
Fix typo
botteroa-si Jul 30, 2018
949b465
Add visibility control to TFFrameTransformer and to TransformerGuard
botteroa-si Jul 30, 2018
f981147
Fix typo in filename
greimela-si Jul 30, 2018
d8cd337
Fix pluginlib icon loading crash on missing plugin
greimela-si Jul 31, 2018
0c34bdd
Refactor transformer_guard.hpp and relative tests
botteroa-si Jul 31, 2018
d0ac8f8
Improve TransformerGuard tests
botteroa-si Jul 31, 2018
9836abc
Cleanup naming in transformer_guard.hpp
greimela-si Jul 31, 2018
750be43
Use relative path to import identity_transformer.hpp
greimela-si Jul 31, 2018
acc241d
Always use TF transformer in visual tests
greimela-si Jul 31, 2018
01f6a69
Reorder and fix includes in pluginlib_factory.hpp
greimela-si Jul 31, 2018
11d7fd3
Small refactorings in dialogs and display_factory
greimela-si Jul 31, 2018
0ac4d2d
Change name of class InternalFrameTransformer to TransformationLibrar…
botteroa-si Jul 31, 2018
042c6ac
Rename dummy_transformer_test to identity_transformer_test
greimela-si Jul 31, 2018
8c6e880
Add description to grouped checkbox property and group
greimela-si Jul 31, 2018
a4e14fc
Minor fixes
greimela-si Jul 31, 2018
24fa5e1
Refactor structs.cpp
botteroa-si Jul 31, 2018
cff13da
Fix typos in ros_conversion_helper_test.cpp
greimela-si Jul 31, 2018
7050022
Fix points marker behavior on missing transform
greimela-si Jul 31, 2018
cf4e183
Set focus policy in TransformationPanel to hide selection boxes
greimela-si Jul 31, 2018
59e3dee
Refactor TransformerGuard so that it checks the type of the transform…
botteroa-si Jul 31, 2018
154add4
Add comment regarding transformer_name in TransformerGuard
botteroa-si Jul 31, 2018
f36e9fa
Update README
botteroa-si Jul 31, 2018
b2d167a
Update plugins development guide
botteroa-si Jul 31, 2018
82cd6bc
Fix uncrustify and cpplint
botteroa-si Jul 31, 2018
8c3009d
Condense documentation, remove trailing whitespaces
greimela-si Aug 1, 2018
c9012c4
Fix Copyrights
Martin-Idel-SI Aug 7, 2018
5ae8f13
Fix transformer guard test
Martin-Idel-SI Aug 7, 2018
2873d35
Update comment in transformer_guard.hpp and insert TF as default tran…
botteroa-si Aug 9, 2018
b27d8f6
Pass clock to tf2::Buffer contructor
botteroa-si Aug 9, 2018
9dfd0a8
Fix tests and uncrustify
botteroa-si Aug 9, 2018
5f7cdf3
Minor cleanups
anhosi Sep 6, 2018
356f60b
Remove reset button from transformer panel
Martin-Idel-SI Sep 6, 2018
c389501
style and whitespace fixes
wjwwood Sep 6, 2018
fe7db36
use ++ suffix in loop iterators (cppcheck)
wjwwood Sep 6, 2018
17ba6b4
suppress Ogre warnings when interpreting single header (autocomplete)
wjwwood Sep 6, 2018
a04e711
initialize member variable in constructor
wjwwood Sep 6, 2018
c986fcc
Implement workaround for missing Qt clicked event
Martin-Idel-SI Sep 7, 2018
7d644ff
doc style cleanup
wjwwood Sep 7, 2018
8898a67
fixup
wjwwood Sep 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,24 @@ In case you wished to see those features in RViz for ROS 2, feel free to add a p
Make sure to read the developer guide below and the migration guide.

### New features
#### Pluggable transformation library

None, yet.
In RViz for ROS 1 the frames transformation library used is tf2 (detailed information about it can be found [here](http://wiki.ros.org/tf2)).
In RViz for ROS 2 the frames transformation library is now pluggable, meaning that different transformation library plugins can be loaded and changed dynamically in the gui.
Developers can create and use their own plugins to provide custom transformation behavior.

Two plugins are bundled with RViz:
- a plugin for tf2 (`TFFrameTransformer`, in `rviz_default_plugins`), which provides the standard tf2 functionality and which is used as a default
- a trivial plugin (`IdentityFrameTransformer`, in `rviz_common`), which always performs identity transforms.
This plugin is used by default if the tf2 plugin is not available and no other valid plugin is specified.

As anticipated, in order for the user to choose the plugin to use, RViz provides a dedicated panel: the `Transformation` panel.

Note: Not all transformation plugins are necessarily compatible with all RViz displays (e.g. some of the default displays, like the TF display, can only work with tf2).
In order to take this possibility into account, the `TransformerGuard` class is provided.
Adding it to a display ensures that the display will be disabled and won't function in case the wrong transformer is used.

More detailed information on how to write a transformation plugin and on how to handle transformation specific displays can be found in the [plugin development guide](docs/plugin_development.md).

## Developer Guide

Expand All @@ -72,7 +88,7 @@ https://github.com/ros2/ros2/wiki/Installation

#### Building RViz in a separate workspace

When developing for RViz, it can be beneficial to build it in a separate workspace.
When developing for RViz, it can be beneficial to build it in a separate workspace.

**Note:** When building the current ros2 branch from source, the latest ROS 2 release for all dependencies might not be sufficient: it could be necessary to build the ROS 2 master branch.
Make sure to have a source build of ROS 2 available (see installation procedure above).
Expand Down Expand Up @@ -122,6 +138,7 @@ Plugins can extend RViz at different extension points:
- Displays
- Panels
- Tools
- Frames transformation library
- View Controllers

More information on writing plugins can be found in the [plugin development guide](docs/plugin_development.md).
62 changes: 44 additions & 18 deletions docs/plugin_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ This is intended as a guide for people wishing to develop custom plugins.

Plugins can extend RViz at different extension points:

| plugin type | base type |
| --------------- | ----------------------------- |
| Display | `rviz_common::Display` |
| Panel | `rviz_common::Panel` |
| Tool | `rviz_common::Tool` |
| View Controller | `rviz_common::ViewController` |
| plugin type | base type |
| ----------------------------- | ----------------------------------------------- |
| Display | `rviz_common::Display` |
| Panel | `rviz_common::Panel` |
| Tool | `rviz_common::Tool` |
| Frames transformation library | `rviz_common::transformation::FrameTransformer` |
| View Controller | `rviz_common::ViewController` |

Every plugin must be of the corresponding base type in order to be recognized by RViz.
Refer to the documentation of the relevant base class for a detailed API description.

### Plugin Basics

* In order to write your own plugin, set up a regular ROS 2 workspace (see the [official documentation]("https://github.com/ros2/ros2/wiki/Colcon-Tutorial") for further help).
* You will need to link your program against `rviz_common` and probably also against `rviz_rendering` and `rviz_default_plugins`.
* To let the plugin loader find your plugin, you will need to invoke the `PLUGINLIB_EXPORT_CLASS` macro.
* You will need to link your program against `rviz_common` and probably also against `rviz_rendering` and `rviz_default_plugins`.
* To let the plugin loader find your plugin, you will need to invoke the `PLUGINLIB_EXPORT_CLASS` macro.
For instance, if your plugin is called "myplugin::Plugin" with base class `rviz_common::Dispay`, you will need to include the following into your `.cpp` file:
```
#include <pluginlib/class_list_macros.hpp>
Expand All @@ -36,7 +37,7 @@ target_compile_definitions(rviz_default_plugins PUBLIC "PLUGINLIB__DISABLE_BOOST
# Causes the visibility macros to use dllexport rather than dllimport (for Windows, when your plugin should be used as library)
target_compile_definitions(rviz_default_plugins PRIVATE "RVIZ_DEFAULT_PLUGINS_BUILDING_LIBRARY")
```
* You need to write a `plugin_description.xml` file which contains the information necessary for the pluginlib to load your plugin at runtime.
* You need to write a `plugin_description.xml` file which contains the information necessary for the pluginlib to load your plugin at runtime.
See `rviz_default_plugins/plugins_description.xml` for an example (the syntax is the same as for the old RViz)
* Export the plugin description file via
```
Expand All @@ -50,15 +51,15 @@ This should make sure that your plugins are found at runtime

#### Writing a display without ros subscription

When writing a display without subscription to ros, derive from `rviz_common::Display`.
When writing a display without subscription to ros, derive from `rviz_common::Display`.

* The Display class provides an `Ogre::SceneNode`, which can be used to add visual objects.
* It provides convenience methods to set and delete Status messages
* When you need any Ogre or SceneNode setup, override the `onInitilize()` method.

#### Writing a display with subscription

When writing a display for a topic type, derive from `rviz_common::RosTopicDisplay<MessageType>`.
When writing a display for a topic type, derive from `rviz_common::RosTopicDisplay<MessageType>`.
The RosTopicDisplay is templated on the message type of this display:

* RosTopicDisplay derives from Display and thereby contains all of the functionality described in the previous section
Expand All @@ -68,14 +69,35 @@ The RosTopicDisplay is templated on the message type of this display:

#### Providing Ogre media files

It is possible to add your own meshes, scripts, etc. to RViz.
It is possible to add your own meshes, scripts, etc. to RViz.
To make them available at runtime, use the cmake macro `register_rviz_ogre_media_exports` defined in `rviz_rendering`
For instance, if you want to register a folder `test_folder/scripts` which resides in your project's source folder, write
```
register_rviz_ogre_media_exports(DIRECTORIES "test_folder/scripts")
```
*Note:* If you want to export folder hierarchies, each folder needs to be exported separately. Folders within exported folders are not automatically available.

#### Writing a display which can only work with one transformation plugin

Some of the default displays (e.g. TF display or LaserScan display) can only work with tf2 as transformation framework.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can the LaserScan display only work with tf2?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The laser_geometry package used internally needs a tf2_buffer. Since it is not very easy to get around this (one would need to heavily rewrite some parts in laser_geometry), we decided that it's probably better to leave it out for now.

Similarly, as a developer, you may have written your own transformation plugin which cannot work with every display, or your own display which cannot work with every transformation plugin.
The class `rviz_default_plugins::transformation::TransformerGuard` helps you to handle these possibilities.

As explained below, every transformation plugin implements the base class `rviz_common::transformation::FrameTransformer`.
The `TransformerGuard` class is templated on the type of this implementation and will make sure that the display by which it is owned will be disabled if the transformer currently in use is of a different type.

When writing a display that is supposed to be working only with a specific transformation plugin, you can add a templated instance of `TransformerGuard` as a display member.
The constructor of this class takes two argument: a raw pointer to the display that owns it, and the name of the transformer it is supposed to work with (needed to correctly set the error status).
Ideally the `TransformerGuard` object is initialized in the constructor of the display.

In order to make the `TransformerGuard` object work correctly, you need to call the method `TransformerGuard::initialize(rviz_common::DisplayContext * context)` inside the display `onInitialize()` method, passing as parameter the `context_` member of the display.
Doing this will make sure that every time the current transformer plugin is of the wrong type, the display will be disabled and an appropriate error message will be shown in the display status.

In addition to this, the `TransformerGuard` class also provides the `checkTransformer()` method, which returns `true` if the currently usd transformer is of the allowed type, and `false` otherwise.
This method can be used by the display every time you want it to behave differently according to what kind of transformation plugin is used at the moment.

For a concrete example of how all this is done, you can have a look, for example, at the TF or the LaserScan display, in `rviz_default_plugins` which, as said, only work with tf2.

### Writing a panel plugin

To write a custom panel, derive from `rviz_common::Panel`.
Expand All @@ -89,10 +111,14 @@ To write a custom panel, derive from `rviz_common::Panel`.

### Writing a view controller plugin

* In order to write a custom view controller which should be independent of tf frames, derive from `rviz_common::ViewController`
* In order to write a custom view controller which should be independent of tf frames, derive from `rviz_common::ViewController`
* If your view controller should be able to track tf frames in a scene, derive from `rviz_common::FramePositionTrackingViewController`, which already contains convenience functionality for tracking target frames
* If your custom view controller orbits a focal point, it might also be beneficial to derive from `rviz_default_plugins::OrbitViewController`

### Writing a transformation library plugin

- To write a transformer plugin, you must implement the `rviz_common::transformation::FrameTransformer` class (refer to the API documentation contained in the header file).
- If for your plugin you also need extra functionality, or you want to offer direct access to some parts of the library itself, you can also implement a subclass of `rviz_common::transformation::TransformerLibraryConnector` (see, for example, `rviz_default_plugins::transformation::TFWrapper`).

## Overview of RViz API

Expand All @@ -101,7 +127,7 @@ To write a custom panel, derive from `rviz_common::Panel`.
The `rviz_rendering` package is supposed to contain all functionality referring to rendering:

* Visuals and objects to be added to the scene graph such as arrows, shapes or text objects in the subfolder `objects` (many of those objects were ported from the folder `ogre_helpers`)
* The render window, including functions exposing some of its internals (RenderWindowOgreAdapter).
* The render window, including functions exposing some of its internals (RenderWindowOgreAdapter).
If possible, refrain from using the RenderWindowOgreAdapter, as it might be deprecated and deleted in the future
* Convenience functions to work with materials (`material_manager.hpp`) or other ogre related functionality (e.g. ray tracing in `viewport_projection_finder.hpp`)
* Convenience classes for testing, allowing to set up a working ogre environment and helpers for scene graph introspection
Expand All @@ -114,20 +140,20 @@ The `rviz_common` package contains the bulk of RViz useful for doing plugin deve
* Main entry points for plugin development - base classes for panels, view controllers, displays and tools
* Convenience classes to work with properties in the various views (such as the display panel) located in `rviz_common/properties`
* Main classes for selectable types, the SelectionHandlers (located in `rviz_common/interaction`)
* Access points to ROS 2.
Currently, RViz uses only one node, which can be accessed via `ros_integration`.
* Access points to ROS 2.
Currently, RViz uses only one node, which can be accessed via `ros_integration`.
In the future, further changes may be necessary to fully abstract ROS 2 access into `ros_integration`

### rviz_default_plugins

The `rviz_default_plugins` contains all plugins (view controllers, tools, displays and in the future, panels) shipped with RViz (most of them ported from the `default_plugins` folder of RViz).
The `rviz_default_plugins` contains all plugins (view controllers, tools, displays and in the future, panels) shipped with RViz (most of them ported from the `default_plugins` folder of RViz).

* When developing simple plugins it is not necessary to use anything in this package.
* When developing more complex plugins similar to existing plugins it might be beneficial to use or even derive from classes contained in this package to simplify your development.

### rviz_visual_testing_framework

The `rviz_visual_testing_framework` contains the backbone to writing visual tests for plugins.
The `rviz_visual_testing_framework` contains the backbone to writing visual tests for plugins.
It will only ever be necessary to use this package as a test dependency if you want to write automated screenshot tests.
Please see the documentation in the package for further help.

Expand Down
4 changes: 2 additions & 2 deletions rviz2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<url type="bugtracker">https://github.com/ros2/rviz/issues</url>

<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>qtbase5-dev</build_depend>

<!-- this ensures some basic plugins are available when installing just rviz2 -->
<exec_depend>rviz_default_plugins</exec_depend>

<depend>rviz_common</depend>
<depend>rviz_ogre_vendor</depend>

Expand Down
68 changes: 55 additions & 13 deletions rviz_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ set(rviz_common_headers_to_moc
src/rviz_common/displays_panel.hpp
src/rviz_common/failed_panel.hpp
src/rviz_common/frame_manager.hpp
include/rviz_common/transformation/frame_transformer.hpp
include/rviz_common/frame_manager_iface.hpp
src/rviz_common/loading_dialog.hpp
src/rviz_common/new_object_dialog.hpp
Expand All @@ -104,6 +105,8 @@ set(rviz_common_headers_to_moc
include/rviz_common/properties/editable_enum_property.hpp
include/rviz_common/properties/float_edit.hpp
include/rviz_common/properties/float_property.hpp
include/rviz_common/properties/grouped_checkbox_property.hpp
include/rviz_common/properties/grouped_checkbox_property_group.hpp
include/rviz_common/properties/int_property.hpp
include/rviz_common/properties/line_edit_with_button.hpp
include/rviz_common/properties/property.hpp
Expand All @@ -125,9 +128,13 @@ set(rviz_common_headers_to_moc
include/rviz_common/interaction/selection_renderer.hpp
src/rviz_common/splash_screen.hpp
# src/rviz_common/time_panel.hpp
src/rviz_common/transformation/identity_frame_transformer.hpp
include/rviz_common/transformation/structs.hpp
include/rviz_common/tool.hpp
src/rviz_common/tool_manager.hpp
src/rviz_common/tool_properties_panel.hpp
include/rviz_common/transformation/transformation_manager.hpp
src/rviz_common/transformation_panel.hpp
include/rviz_common/view_controller.hpp
include/rviz_common/view_manager.hpp
src/rviz_common/views_panel.hpp
Expand Down Expand Up @@ -176,6 +183,8 @@ set(rviz_common_source_files
src/rviz_common/properties/file_picker_property.cpp
src/rviz_common/properties/float_edit.cpp
src/rviz_common/properties/float_property.cpp
src/rviz_common/properties/grouped_checkbox_property.cpp
src/rviz_common/properties/grouped_checkbox_property_group.cpp
src/rviz_common/properties/int_property.cpp
src/rviz_common/properties/line_edit_with_button.cpp
src/rviz_common/properties/parse_color.cpp
Expand Down Expand Up @@ -206,9 +215,14 @@ set(rviz_common_source_files
src/rviz_common/interaction/view_picker.cpp
src/rviz_common/splash_screen.cpp
# src/rviz_common/time_panel.cpp
src/rviz_common/transformation/identity_frame_transformer.cpp
src/rviz_common/transformation/structs.cpp
src/rviz_common/transformation/ros_helpers/ros_conversion_helpers.cpp
src/rviz_common/tool_manager.cpp
src/rviz_common/tool_properties_panel.cpp
src/rviz_common/tool.cpp
src/rviz_common/transformation_panel.cpp
src/rviz_common/transformation/transformation_manager.cpp
src/rviz_common/uniform_string_stream.cpp
src/rviz_common/view_controller.cpp
src/rviz_common/view_manager.cpp
Expand Down Expand Up @@ -326,8 +340,21 @@ if(BUILD_TESTING)
ament_lint_cmake()
ament_uncrustify()

ament_add_gmock(frame_manager_test
test/frame_manager_test.cpp
src/rviz_common/frame_manager.cpp
)
if(TARGET frame_manager_test)
target_link_libraries(frame_manager_test
rviz_common
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay
)
endif()

ament_add_gtest(rviz_common_config_test
test/config_test.cpp)
test/config_test.cpp
)
if(TARGET rviz_common_config_test)
target_link_libraries(rviz_common_config_test
rviz_common
Expand All @@ -337,7 +364,8 @@ if(BUILD_TESTING)
endif()

ament_add_gtest(rviz_common_uniform_string_stream_test
test/uniform_string_stream_test.cpp)
test/uniform_string_stream_test.cpp
)
if(TARGET rviz_common_uniform_string_stream_test)
target_link_libraries(rviz_common_uniform_string_stream_test
rviz_common
Expand All @@ -348,23 +376,38 @@ if(BUILD_TESTING)

ament_add_gtest(rviz_common_property_test
test/property_test.cpp
test/mock_property_change_receiver.cpp)
test/mock_property_change_receiver.cpp
)
if(TARGET rviz_common_property_test)
target_link_libraries(rviz_common_property_test rviz_common)
endif()

ament_add_gmock(rviz_common_visualizer_app_test
test/visualizer_app_test.cpp)
ament_add_gmock(rviz_common_visualizer_app_test test/visualizer_app_test.cpp)
if(TARGET rviz_common_visualizer_app_test)
target_link_libraries(rviz_common_visualizer_app_test rviz_common)
endif()

ament_add_gmock(rviz_common_ros_node_abstraction_test
test/ros_node_abstraction_test.cpp)
test/ros_node_abstraction_test.cpp
)
if(TARGET rviz_common_ros_node_abstraction_test)
target_link_libraries(rviz_common_ros_node_abstraction_test rviz_common)
endif()

ament_add_gmock(identity_transformer_test
test/transformation/identity_frame_transformer_test.cpp
)
if(TARGET identity_transformer_test)
target_link_libraries(identity_transformer_test rviz_common)
endif()

ament_add_gmock(ros_conversion_helpers_test
test/transformation/ros_conversion_helpers_test.cpp
)
if(TARGET ros_conversion_helpers_test)
target_link_libraries(ros_conversion_helpers_test rviz_common)
endif()

ament_add_gmock(selection_manager_test
test/interaction/selection_manager_test.cpp
test/interaction/mock_selection_renderer.hpp
Expand All @@ -375,7 +418,8 @@ if(BUILD_TESTING)
target_link_libraries(selection_manager_test
rviz_common
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay)
rviz_ogre_vendor::OgreOverlay
)
endif()

ament_add_gmock(selection_handler_test
Expand All @@ -387,7 +431,8 @@ if(BUILD_TESTING)
target_link_libraries(selection_handler_test
rviz_common
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay)
rviz_ogre_vendor::OgreOverlay
)
endif()

ament_add_gtest(rviz_common_display_test
Expand All @@ -396,11 +441,8 @@ if(BUILD_TESTING)
test/mock_display_group.cpp
${SKIP_DISPLAY_TESTS})
if(TARGET rviz_common_display_test)
target_link_libraries(rviz_common_display_test
rviz_common
Qt5::Widgets)
ament_target_dependencies(rviz_common_display_test
rviz_yaml_cpp_vendor)
target_link_libraries(rviz_common_display_test rviz_common Qt5::Widgets)
ament_target_dependencies(rviz_common_display_test rviz_yaml_cpp_vendor)
endif()
endif()

Expand Down
Binary file added rviz_common/icons/classes/Transformation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading