-
Notifications
You must be signed in to change notification settings - Fork 1
Creating and Saving a Custom RViz Configuration
Written by: Trudie Cheung
This allows us to customize and save an RViz configuration such that it is loaded automatically upon launch (removing the need to manually add desired topics every time).
The method shown is just one way to approach this--besides using the RViz GUI, this can be done through code as well.
Start by launching RViz with the following commands:
$ roslaunch caffeine caffeine_gazebo.launch
$ roslaunch caffeine caffeine_rviz.launch
# For Gmapping navigation use:
$ roslaunch gmap gmapping_navigation.launch robot_model:=caffeine
# For RTAB Map navigation use:
$ roslaunch nav_rtab rtabmap_navigation.launch robot_model:=caffeine
Within the RViz GUI, make the configuration changes that you would like save. Once you are ready to save, go to the drop-down menu near the top of the window and click on File --> Save Config As. Save the configuration with the desired name with the .rviz extension (e.g. rviz_custom.rviz), and save it within the caffeine
package, in the rviz
folder.
If you have saved a configuration file with new name, you must also modify caffeine_rviz.launch
to reflect this change. Modify the following line in the launch file, replacing [new_name] with the name of your file:
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find caffeine)/rviz/[new_name].rviz" output="screen"/>
Now you can see if you have done everything correctly by running $ roslaunch caffeine caffeine_rviz.launch
!
Further notes: When using RViz, you may be asked whether or not you want to the save the configuration before exiting/closing. If you would like to keep the changes you have made, clicking save will override the exiting rviz configuration saved within the caffeine/rviz
folder with the current configuration. If you do not wish to keep the changes, choose close without saving.
General ROS and Technical Help
- Creating a rospy package
- Model the Robot
- Odometry - General Information
- Odometry - Configuring with ROS
Creating and Using Our Packages