It doesn't display 3D model in RVIZ but it does in Gazebo [closed]

asked 2019-02-17 00:09:00 -0600

Elric gravatar image

updated 2019-02-17 00:23:47 -0600

I'm just started to learn ROS and Gazebo using ROS Melodic and Gazebo 9.6.0.

I use this launch file to open RVIZ:

  <arg name="model" default="$(find nav_odom_description)/urdf/mybot.xacro" />
  <arg name="gui" default="true" />
  <arg name="rvizconfig" default="$(find nav_odom_description)/rviz/urdf.rviz" />

  <param name="robot_description" command="$(find xacro)/xacro $(arg model)" />
  <param name="use_gui" value="$(arg gui)"/>

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />


But I see that on it:
image description

I use this launch file with Gazebo:

    <!-- urdf xml robot description loaded on the Parameter Server,
             converting the xacro into a proper urdf file-->
    <param name="robot_description"
        command="$(find xacro)/xacro '$(find nav_odom_description)/urdf/mybot.xacro'" />

    <!-- push robot_description to factory and spawn robot in gazebo -->
    <node name="mybot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
     args="-urdf -param robot_description -model mybot" />

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find nav_odom_gazebo)/worlds/"/>
        <arg name="gui" value="true"/>
        <arg name="verbose" value="true"/>

And I see this:
image description

You can find the model here (I'm not using the camera yet).

Is it correct to see that in RVIZ? Why I can't see it like in Gazebo?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by gvdhoorn
close date 2019-02-17 10:21:06.481437


Can you check whether you're running into #q302787?

gvdhoorn gravatar image gvdhoorn  ( 2019-02-17 04:35:17 -0600 )edit

Thanks, that was the problem. Now I can see the 3D model on RVIZ.

Elric gravatar image Elric  ( 2019-02-17 09:29:15 -0600 )edit