Skip to content

Commit 3e8de96

Browse files
authored
feat(rviz): add topic text overlay plugin (#37)
* feat(rviz): add topic text overlay plugin Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(rviz): reuse shared overlay utility Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * style(rviz): use snake case in topic text overlay Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * fix(topic_text_overlay): hide topic types in overlay Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * fix(topic_text_overlay): remove tier4 debug message support Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * chore: add maintainer Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * docs(topic_text_overlay): add README Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent 584fd1b commit 3e8de96

6 files changed

Lines changed: 1140 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(autoware_topic_text_overlay_rviz_plugin)
3+
4+
find_package(autoware_cmake REQUIRED)
5+
autoware_package()
6+
7+
find_package(Qt5 REQUIRED Core Widgets)
8+
set(QT_LIBRARIES Qt5::Widgets)
9+
set(CMAKE_AUTOMOC ON)
10+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
11+
add_definitions(-DQT_NO_KEYWORDS)
12+
13+
ament_auto_add_library(${PROJECT_NAME} SHARED
14+
DIRECTORY src
15+
)
16+
17+
target_link_libraries(${PROJECT_NAME}
18+
${QT_LIBRARIES}
19+
)
20+
21+
pluginlib_export_plugin_description_file(rviz_common plugins/plugins_description.xml)
22+
23+
ament_auto_package(
24+
INSTALL_TO_SHARE
25+
plugins
26+
)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# autoware_topic_text_overlay_rviz_plugin
2+
3+
RViz panel plugin for overlaying text from selected ROS topics on top of the 3D view.
4+
5+
## Purpose
6+
7+
This plugin provides an RViz panel that lists supported text-like topics and overlays the selected
8+
topic contents in the RViz render window. Multiple topics can be selected at the same time, and each
9+
overlay block is labeled by its topic name.
10+
11+
## Supported Topics
12+
13+
The panel supports the following topic types:
14+
15+
- `autoware_internal_debug_msgs/msg/StringStamped`
16+
- `autoware_internal_debug_msgs/msg/BoolStamped`
17+
- `autoware_internal_debug_msgs/msg/Float32Stamped`
18+
- `autoware_internal_debug_msgs/msg/Float64Stamped`
19+
- `autoware_internal_debug_msgs/msg/Int32Stamped`
20+
- `autoware_internal_debug_msgs/msg/Int64Stamped`
21+
- `autoware_internal_debug_msgs/msg/Float32MultiArrayStamped`
22+
- `autoware_internal_debug_msgs/msg/Float64MultiArrayStamped`
23+
- `autoware_internal_debug_msgs/msg/Int32MultiArrayStamped`
24+
- `autoware_internal_debug_msgs/msg/Int64MultiArrayStamped`
25+
- `visualization_msgs/msg/Marker`
26+
- `visualization_msgs/msg/MarkerArray`
27+
28+
For `Marker` and `MarkerArray`, only markers with `TEXT_VIEW_FACING` type are displayed. For
29+
`MarkerArray`, detected marker namespaces can be selected independently in the panel.
30+
31+
## Usage
32+
33+
1. Open RViz.
34+
2. Add the `TopicTextOverlayPanel` panel.
35+
3. Click `Refresh topics` or wait for the topic list to update.
36+
4. Check the topics to overlay.
37+
5. For `MarkerArray` topics, check the namespaces to display.
38+
39+
The overlay position, font size, maximum displayed text length, selected topics, and selected marker
40+
namespaces are stored in the RViz config.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>autoware_topic_text_overlay_rviz_plugin</name>
5+
<version>0.1.0</version>
6+
<description>RViz panel plugin for overlaying selected text topics in the 3D view.</description>
7+
8+
<maintainer email="satoshi.ota@tier4.jp">Satoshi Ota</maintainer>
9+
<maintainer email="takumi.odashima@tier4.jp">Takumi Odashima</maintainer>
10+
11+
<license>Apache License 2.0</license>
12+
13+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
14+
<buildtool_depend>autoware_cmake</buildtool_depend>
15+
16+
<depend>autoware_internal_debug_msgs</depend>
17+
<depend>pluginlib</depend>
18+
<depend>rclcpp</depend>
19+
<depend>rviz_2d_overlay_msgs</depend>
20+
<depend>rviz_2d_overlay_plugins</depend>
21+
<depend>rviz_common</depend>
22+
<depend>rviz_ogre_vendor</depend>
23+
<depend>rviz_rendering</depend>
24+
<depend>visualization_msgs</depend>
25+
26+
<test_depend>ament_lint_auto</test_depend>
27+
<test_depend>autoware_lint_common</test_depend>
28+
29+
<export>
30+
<build_type>ament_cmake</build_type>
31+
</export>
32+
</package>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<library path="autoware_topic_text_overlay_rviz_plugin">
2+
<class name="autoware_topic_text_overlay_rviz_plugin/TopicTextOverlayPanel"
3+
type="autoware::topic_text_overlay_rviz_plugin::TopicTextOverlayPanel"
4+
base_class_type="rviz_common::Panel">
5+
<description>Panel for overlaying selected StringStamped, Marker, and MarkerArray text topics.</description>
6+
</class>
7+
</library>

0 commit comments

Comments
 (0)