ROS 2 Humble RViz2 plugin that adds a free-orbit orthographic view controller.
This package keeps the normal RViz Orbit mouse controls, but renders the camera with an orthographic projection. The default Ortho Scale is 8.5.
The package name is free_orbit_ortho_view_plugin.
The RViz plugin class is registered as:
free_orbit_ortho_view_plugin/FreeOrbitOrtho
This package is intended for ROS 2 Humble.
Create a ROS 2 workspace and clone this package into its src directory.
If you already have a ROS 2 workspace, use that workspace's src directory instead of /path/to/ortho_ws/src.
mkdir -p /path/to/ortho_ws/src
cd /path/to/ortho_ws/src
git clone https://github.com/aries-robot/free-orbit-ortho-view-plugin.gitThe package source should be located here after cloning:
/path/to/ortho_ws/src/free-orbit-ortho-view-plugin
Install or source ROS 2 Humble first.
source /opt/ros/humble/setup.bash
cd /path/to/ortho_ws
colcon build --symlink-install --packages-select free_orbit_ortho_view_pluginSource the built workspace.
source /path/to/ortho_ws/install/setup.bashStart RViz from a terminal where the plugin workspace has been sourced.
source /opt/ros/humble/setup.bash
source /path/to/ortho_ws/install/setup.bash
rviz2In RViz:
- Open the
Viewspanel. If it is hidden, enable it fromPanels>Views. - In
Current View, open theTypedropdown. - Select
free_orbit_ortho_view_plugin/FreeOrbitOrtho. - Adjust
Ortho Scalein theViewspanel if a different orthographic zoom level is needed.
- Left drag: orbit around the focal point.
- Middle drag: move the focal point.
- Mouse wheel: change
Ortho Scale. - Right vertical drag: change
Ortho Scale.
Install the packaging tools.
sudo apt update
sudo apt install python3-bloom python3-rosdep fakeroot debhelper dh-python dpkg-devInstall package dependencies.
source /opt/ros/humble/setup.bash
cd /path/to/ortho_ws
rosdep install --from-paths src --ignore-src -r -y --rosdistro humbleBuild a local Debian package.
cd /path/to/ortho_ws/src/free-orbit-ortho-view-plugin
bloom-generate rosdebian --ros-distro humble
fakeroot debian/rules binaryThe generated .deb file is created in the parent directory of the package source, which is src/ in this workspace.
Install the generated package.
cd /path/to/ortho_ws/src
sudo apt install ./ros-humble-free-orbit-ortho-view-plugin_*.debAfter installing the Debian package, only the ROS 2 Humble environment needs to be sourced before starting RViz.
source /opt/ros/humble/setup.bash
rviz2