ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

facing problems with launch file

asked 2018-03-25 07:18:32 -0500

Prof. xavier gravatar image

updated 2018-03-25 11:44:23 -0500

jayess gravatar image

I am a beginner, I am trying to launch a URDF file in rviz with the following code :

launch file code :

<launch>

<arg name="model" />


<param name="robot_description" textfile="$(find robot_description)/urdf/final_arm.urdf" />

<param name="use_gui" value="true"/>

<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 $(find robot_description)/urdf.rviz" required="true" />

</launch>

urdf file code (final_arm.urdf) :

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

<link name="base_link">
      <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
          <mesh filename="package://robot_description/meshes/base_link.dae"/>
        </geometry>
      </visual>

      <inertial>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
      </inertial>
</link>


     <joint name="base_joint" type="revolute">
       <parent link="base_link"/>
       <child link="shoulder_link"/>
       <origin xyz="0 0 0"/>
       <axis xyz="0 0 1" />
       <limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
       <dynamics damping="50" friction="1"/>
     </joint>

<link name="shoulder_link">
      <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
          <mesh filename="package://robot_description/meshes/shoulder_link.dae"/>
        </geometry>
      </visual>
      <inertial>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0"izz="1.0"/>
      </inertial>
</link>


<joint name="shoulder_joint" type="revolute">
       <parent link="shoulder_link"/>
       <child link="elbo_link"/>
       <origin xyz="-0.385379 0.00451305 0.398126"/>
       <axis xyz="0 1 0" />
       <limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
       <dynamics damping="50" friction="1"/>
     </joint>


<link name="elbo_link">
      <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
          <mesh filename="package://robot_description/meshes/elbo_link.dae"/>
        </geometry>
      </visual>
      <inertial>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0"izz="1.0"/>
      </inertial>
</link>


<joint name="elbo_joint" type="revolute">
       <parent link="elbo_link"/>
       <child link="wrist_link"/>
       <origin xyz="-0.692963 0.022576 0.569845"/>
       <axis xyz="0 1 0" />
       <limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
       <dynamics damping="50" friction="1"/>
     </joint>



<link name="wrist_link">
      <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
          <mesh filename="package://robot_description/meshes/wrist_link.dae"/>
        </geometry>
      </visual>
      <inertial>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0"izz="1.0"/>
      </inertial>
</link>

<joint name="wrist_joint" type="revolute">
       <parent link="wrist_link"/>
       <child link="wrist2_link"/>
       <origin xyz="-0.580553 -0.720985 0.109695"/>
       <axis xyz="0 1 0" />
       <limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
       <dynamics damping="50" friction="1"/>
  </joint>


<link name="wrist2_link">
      <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
          <mesh filename="package://robot_description/meshes/wrist2_link.dae"/>
        </geometry>
      </visual>
      <inertial>
      <mass value="1"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0"izz="1.0"/>
      </inertial>
</link>

<joint name="wrist2_joint" type="revolute">
       <parent link="wrist2_link"/>
       <child link="wrist3_link"/>
       <origin xyz="0 ...
(more)
edit retag flag offensive close merge delete

Comments

What is the output of rospack find robot_description?

David Lu gravatar image David Lu  ( 2018-03-25 10:44:57 -0500 )edit

output : /home/profx/catkin_ws/src/robot_description_pkg

Prof. xavier gravatar image Prof. xavier  ( 2018-03-25 15:35:13 -0500 )edit

the real problem is Rviz is not able to find tf for any of the links.

Prof. xavier gravatar image Prof. xavier  ( 2018-03-25 15:40:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-25 18:49:35 -0500

David Lu gravatar image

You need to be specific with the name of your package. The launch file, urdf and command all specify robot_description, but it looks like your package's folder is called robot_description_pkg. You need to use one or the other, but not both.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-03-25 07:18:32 -0500

Seen: 137 times

Last updated: Mar 25 '18