Skip to content

Commit

Permalink
Merge pull request #12 from teamspatzenhirn/doxygen
Browse files Browse the repository at this point in the history
Add package documentation using doxygen
  • Loading branch information
ottojo authored Sep 28, 2022
2 parents 9ad0080 + 8c93eb3 commit dc51306
Show file tree
Hide file tree
Showing 7 changed files with 2,714 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ RViz2 3D scene.
Based on the [jsk_visualization](https://github.com/jsk-ros-pkg/jsk_visualization)
package, which is currently only released for ROS1, under the 3-Clause BSD license.

![Screenshot showing the robot velocity as an overlay above the RViz 3D Scene, as well as the expanded properties of the plugin](doc/screenshot_vel_overlay.png)
See the [hosted doxygen documentation](https://docs.ros.org/en/rolling/p/rviz_2d_overlay_plugins/generated/doxygen) for
both usage information and source code documentation.

![Screenshot showing the robot velocity as an overlay above the RViz 3D Scene, as well as the expanded properties of the plugin](rviz_2d_overlay_plugins/doc/screenshot_vel_overlay.png)

![Screenshot showing the PieChartDisplay, a circular gauge](rviz_2d_overlay_plugins/doc/screenshot_PieChartDisplay.png)
2,658 changes: 2,658 additions & 0 deletions rviz_2d_overlay_plugins/Doxyfile

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions rviz_2d_overlay_plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# rviz_2d_overlay_plugins

Plugin for displaying 2D overlays over the RViz2 3D scene.

Based on the [jsk_visualization](https://github.com/jsk-ros-pkg/jsk_visualization)
package, which is currently only released for ROS1, under the 3-Clause BSD license.

## Text Overlay

![Screenshot showing the robot velocity as an overlay above the RViz 3D Scene, as well as the expanded properties of the plugin](doc/screenshot_vel_overlay.png)

Both the text itself and formatting options for the text overlay are specified in
the [OverlayText.msg message type](https://github.com/teamspatzenhirn/rviz_2d_overlay_plugins/blob/main/rviz_2d_overlay_msgs/msg/OverlayText.msg)
.

### Alignment and Positioning

To allow easy positioning of the overlay along the edges of the rviz window, and to support multiple/dynamic window
sizes, the position is given by offsets from the respective border.
Depending on whether the `horizontal_alignment` is `LEFT`, `RIGHT` or `CENTER`,
the `horizontal_distance` field sets the distance to the left or right border, or the offset from center.

For `LEFT` and `RIGHT` alignment, a distance of zero means that the text is aligned to the border without any gap,
a positive distance moves the overlay towards the center.

For `CENTER` alignment, a distance of zero means completely centered, positive values move the overlay towards the
bottom right of the window.

`TOP` and `BOTTOM` for the vertical alignment work just like `LEFT` and `RIGHT` in the horizontal case.

## Circular Gauge Overlay

![Screenshot showing the PieChartDisplay, a circular gauge](doc/screenshot_PieChartDisplay.png)

The `PieChartDisplay` is a rather boring pie chart, as it only displays a single value.
`PieChartDisplay` and "Circular Gauge" are used synonymously in this package.
The gauge allows displaying a
[std_msgs/Float32](https://github.com/ros2/common_interfaces/blob/rolling/std_msgs/msg/Float32.msg).
Formatting and positioning, as well as setting the maximum value is only possible in the display options inside rviz.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
1 change: 1 addition & 0 deletions rviz_2d_overlay_plugins/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@

<export>
<build_type>ament_cmake</build_type>
<rosdoc2>rosdoc2.yaml</rosdoc2>
</export>
</package>
10 changes: 10 additions & 0 deletions rviz_2d_overlay_plugins/rosdoc2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: 'rosdoc2 config'
version: 1
---
settings:
output_dir: ""
builders:
- doxygen: {
name: doxygen,
output_dir: 'generated/doxygen'
}

0 comments on commit dc51306

Please sign in to comment.