In this video we are going to show how you can easily save and load RViz configurations, using the Robot Ignite Academy.
Step 1. Go to the Robot Ignite Academy
Here is the link: https://goo.gl/631YF4
You can preview every course for free.
Let’s start with the Ch.4 -Path planning 1
Step 2. Visualize path planning in RViz
3 elements are essential for the visualization of the path planning.
- Map Display (Costmaps)
- Path Displays (Plans)
- 2D Tools
Let’s start with launching the move_base by typing the following command in the shell
$ roslaunch husky_navigation move_base_demo.launch
Then start RViz in another shell with
$ rosrun rviz rviz
To visualize the robot model and laser scan, click add at the left bottom corner and select robot model and laser scan. Select topic /scan in the laser scan and make sure you choose a proper size.
Then we add two map visualization by clicking add and set one to visualize the global cost map and another to visualize the local cost map.
To visualize the path plan, we add two Path visualization. Notice: choose correct topics
Now if you close the Rviz, every setting you’ve done will disappear!
Step 3. Save Rviz settings
let’s create a package named husky_nav_rviz by type the following command under ~/catkin_ws/src directory
$ catkin_create_pkg husky_nav_rviz
and create a rviz folder under it.
Then we back to rviz and select File -> save config as to save the path_planning.rviz config file under the folder we just created.
You can close RViz once you are sure the path_planning.rviz is in the folder.
Step 4. Load Rviz settings
By select the path_planning.rviz file from File -> Open Config you can get all your settings back, or you can use the following command
$ rosrun rviz rviz -d `rospack find husky_nav_rviz`/rviz/path_planning.rviz
Takeaway Today:
Always save your RViz configuration with .rviz file, so you can restore every setting you’ve done when you launch RViz next time.
// RELATED LINKS
▸ Robot Ignite Academy: https://goo.gl/631YF4
▸ ROS Navigation in 5 days online course: https://goo.gl/fkQTR7
0 Comments