Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I can't use the robot in URDF but I can in Gazebo

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:

<launch>
  <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" />

</launch>

But I see that on it:
image description

I use this launch file with Gazebo:

<launch>
    <!-- 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/odom_bot.world"/>
        <arg name="gui" value="true"/>
        <arg name="verbose" value="true"/>
    </include>
</launch>

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 like Gazebo?

I can't use the robot in URDF but I can in Gazebo

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:

<launch>
  <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" />

</launch>

But I see that on it:
image description

I use this launch file with Gazebo:

<launch>
    <!-- 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/odom_bot.world"/>
        <arg name="gui" value="true"/>
        <arg name="verbose" value="true"/>
    </include>
</launch>

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 like Gazebo?

I can't use the robot in URDF It doesn't display 3D model in RVIZ but I can it does in Gazebo

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:

<launch>
  <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" />

</launch>

But I see that on it:
image description

I use this launch file with Gazebo:

<launch>
    <!-- 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/odom_bot.world"/>
        <arg name="gui" value="true"/>
        <arg name="verbose" value="true"/>
    </include>
</launch>

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?