Control your rviz view with a 3Dconnexion SpaceMouse.
Tested with SpaceMouse Wireless, but should work with SpaceMouse Compact and maybe SpaceMouse Pro.
# Use your ROS distro instead of noetic
$ sudo apt install ros-noetic-spacenav-node
For a quick demo, run:
$ roslaunch spacenav_rviz rviz.launch
To use it in your launch file, change:
<node name="rviz" pkg="rviz" type="rviz" args="-d your_config.rviz" />
to
<include file="$(find spacenav_rviz)/launch/rviz" >
<arg name="config" value="your_config.rviz" />
</include>
In rviz "Views" panel, set:
- "Type" to
FrameAligned
- "Target Frame" to
camera
- "Point towards" to
+x axis
You may need to click "Zero" to reset the view.
Tilt your SpaceMouse to control the camera position and orientation. Press the right button to speed up and the left button to slow down.
MIT
Naoki Mizuno (naoki.mizuno.256@gmail.com)