Visualizing the model using RViz
Prerequisites
Installation
To visualize the model, you will need 2 additional packages:
- leo_description - contains the URDF model of Leo Rover with all the required mesh files.
- leo_viz - contains visualization launch files and RViz configurations for Leo Rover.
You can build them using the instructions from this chapter. You can also download the prebuilt packages from the ROS repository by executing:
sudo apt install ros-${ROS_DISTRO}-leo-viz
Launch
Now, to visualize the model in RViz, just type:
roslaunch leo_viz rviz.launch
Alternatively, you can open a fresh instance of RViz by typing:
rviz
In the Fixed Frame option choose base_link.
In Displays panel, click Add and choose RobotModel plugin.
Change the Background Color to make the model more visible.
You should see the wheels rotating when the Rover is being steered.
Running the visualization offline
You can run the visualization without being connected to the Rover. For this, you will need to change environment variables to point to your loopback device:
export ROS_IP=127.0.0.1
export ROS_MASTER_URI=http://127.0.0.1:11311
Then, use the launch file located in the leo_viz
package:
roslaunch leo_viz view_model.launch
An RViz instance with RobotModel
plugin should start, as well as GUI for
joint_state_publisher that let's
you specify simulated wheel positions.