Ask Your Question

rviz does not display the urdf model after running the launch file

asked 2020-05-23 11:12:30 -0500

nilutpolk gravatar image

updated 2020-05-23 13:03:07 -0500

My System Specifications ##

  1. Oracle VirtualBox
  2. Ubuntu 18.04
  3. ROS Melodic 1.14.3
  4. Host Computer- Windows 10 with Intel i7 and Nvidia 1660 graphics

I have been following the tutorials in the book "Mastering ROS for Robotics Programming" by Lentin Joseph. In chapter 2, for URDF tutorial, I did exactly follow the steps mentioned.


  1. I created my pan & tilt model package inside the 'src' folder in my catkin workspace.
    ~/catkin_ws/src $ catkin_create_pkg pan_tilt_model roscpp rospy tf geometry_msgs urdf rviz xacro
  2. Inside the pan_tilt_model package, I created three new folders, namely 'launch', 'meshes' and 'urdf'.
    ~/catkin_ws/src/pan_tilt_model $ mkdir meshes launch urdf
  3. Inside the 'urdf' folder, I created my URDF file named 'pan_tilt.urdf'
    ~/catkin_ws/src/pan_tilt_model/urdf $ gedit pan_tilt.urdf
  4. Inside the 'launch' folder, I create my launch file named 'pan_tilt.launch'
    ~/catkin_ws/src/pan_tilt_model/launch $ gedit pan_tilt.launch
  5. I tried to run the 'roslaunch' command to run the launch file for the pan & tilt model
    ~/catkin_ws $ roslaunch pan_tilt_model pan_tilt.launch

Expected Outcome

Rviz should display my pan & tilt model in its display area along with a joint_state_publisher GUI.

Outcome I got

Rviz didn't display my model in its canvas. It just displayed a blank grid. Also, rviz was showing errors as

  • Global Status: Error
  • Fixed Frame- Fixed Frame [map] does not exist.

I have attached the screenshot the rviz window I am getting in the below link. rviz_window

Launch File 'pan_tilt.urdf'

<arg name="model" />
<!-- Parsing xacro and setting robot_description parameter -->
<param name="robot_description" textfile="$(find pan_tilt_model)/urdf/pan_tilt.urdf" />

<!-- Setting gui parameter to true for display joint slider -->

<!-- Starting Joint state publisher node which will publish the joint values -->

<!-- Starting robot state publish which will publish tf -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<!-- Launch visualization in rviz -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find pan_tilt_model)/urdf.rviz" required="true" />
    <node name="jsp_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" />

URDF File 'pan_tilt.urdf'

<?xml version="1.0"?>
<robot name="pan_tilt">

  <link name="dummy">

  <joint name="dummy_joint" type="fixed">
     <parent link="dummy"/>
     <child link="base_link"/>

  <link name="base_link">

    <cylinder length="0.01" radius="0.2"/>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <material name="yellow">
        <color rgba="1 1 0 1"/>

    <cylinder length="0.03" radius="0.2"/>
      <origin rpy="0 0 0" xyz="0 0 0"/>
    <mass value="1"/>
    <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>

  <joint name="pan_joint" type="revolute">
    <parent link="base_link"/>
    <child link="pan_link"/>
    <origin xyz="0 0 0.1"/>
    <axis xyz="0 0 1" />
    <limit effort="300" velocity="0.1" lower="-3 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-05-24 11:06:59 -0500

Dragonslayer gravatar image

Please read: 7. Coordinate Frames and watch the video there.

edit flag offensive delete link more


Thanks a lot. It solved my problem.

nilutpolk gravatar image nilutpolk  ( 2020-05-24 13:08:21 -0500 )edit

You are welcome. Please mark the answer as correct to keep answers.ros organized. thanks.

Dragonslayer gravatar image Dragonslayer  ( 2020-05-28 09:03:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-05-23 11:12:30 -0500

Seen: 22 times

Last updated: May 24