Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Service call failed when defining erratic robot for gazebo 1.9

Hi all,

I changed the urdf of erratic robot to make it compatible with gazebo 1.9. But now when i try to spawn the robot inside empty world it gave me following error (last lines of gazebo terminal).

[ INFO] [1376596917.648008574, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1376596917.767362832, 0.135000000]: Physics dynamic reconfigure ready.
Warning [parser.cc:353] No <sdf> element in file[data-string]
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
  what():  bad lexical cast: source type value could not be interpreted as target
Aborted (core dumped)

Any ideas on it? (p.s I am using ROS groovy with standalone gazebo 1.9 on ubuntu 12.04).

Thanks in advance.

Service call failed when defining erratic robot for gazebo 1.9

Hi all,

I changed the urdf of erratic robot to make it compatible with gazebo 1.9. But now when i try to spawn the robot inside empty world it gave me following error (last lines of gazebo terminal).

[ INFO] [1376596917.648008574, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1376596917.767362832, 0.135000000]: Physics dynamic reconfigure ready.
Warning [parser.cc:353] No <sdf> element in file[data-string]
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
  what():  bad lexical cast: source type value could not be interpreted as target
Aborted (core dumped)

Any ideas on it? (p.s I am using ROS groovy with standalone gazebo 1.9 on ubuntu 12.04).

Thanks in advance.advance. Edit 1: Here is how my urdf looks like it is generated from xacro using xacro.py

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from /opt/ros/groovy/stacks/erratic_robot/erratic_description/urdf/erratic.urdf.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="erratic" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <!-- Included URDF Files -->
  <material name="Black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="Blue">
    <color rgba="0.0 0.0 0.8 1.0"/>
  </material>
  <material name="Green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="Grey">
    <color rgba="0.7 0.7 0.7 1.0"/>
  </material>
  <material name="Grey2">
    <color rgba="0.9 0.9 0.9 1.0"/>
  </material>
  <material name="Red">
    <color rgba="0.8 0.0 0.0 1.0"/>
  </material>
  <material name="White">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>
  <link name="base_footprint">
    <inertial>
      <mass value="0.0001"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.001 0.001 0.001"/>
      </geometry>
      <material name="Green"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.128"/>
      <geometry>
        <box size="0.001 0.001 0.001"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_footprint_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0.063 0 0.128"/>
    <parent link="base_footprint"/>
    <child link="base_link"/>
  </joint>
  <link name="base_link">
    <inertial>
      <mass value="20"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_base_link.dae"/>
      </geometry>
      <material name="Blue"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_base_link.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_caster_support_joint" type="continuous">
    <origin rpy="0 0 0" xyz="-0.188 0 -0.043"/>
    <parent link="base_link"/>
    <child link="base_caster_support_link"/>
    <axis xyz="0 0 1"/>
    <anchor xyz="0.01 0 0"/>
    <!-- doubts in it may be need to remove later-->
    <!-- changing these lines accordingly-->
    <!--limit effort="100" velocity="100" k_velocity="0" / -->
    <limit effort="100" velocity="100"/>
    <!-- changing these lines accordingly-->
    <safety_controller k_velocity="0"/>
    <dynamics damping="0.0" friction="0.0"/>
  </joint>
  <transmission name="base_caster_support_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_caster_support_motor"/>
    <joint name="base_caster_support_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <link name="base_caster_support_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_support_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_support_link.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="caster_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="-0.025 0 -0.0469"/>
    <parent link="base_caster_support_link"/>
    <child link="caster_wheel_link"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- doubts in it may be need to remove later-->
    <!-- changing these lines accordingly-->
    <!--limit effort="100" velocity="100" k_velocity="0" / -->
    <limit effort="100" velocity="100"/>
    <!-- changing these lines accordingly-->
    <safety_controller k_velocity="0"/>
    <dynamics damping="0.0" friction="0.0"/>
  </joint>
  <transmission name="caster_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="caster_wheel_motor"/>
    <joint name="caster_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <link name="caster_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="caster_wheel_link">
    <mu1>100.0</mu1>
    <mu2>100.0 </mu2>
    <kp>1000000.0&quot; </kp>
    <kd>1.0 </kd>
  </gazebo>
  <joint name="computer_mount_joint" type="fixed">
    <origin rpy="0 0 0" xyz="-0.0925 0 0.0795"/>
    <parent link="base_link"/>
    <child link="computer_link"/>
  </joint>
  <link name="computer_link">
    <inertial>
      <mass value="2"/>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <geometry>
        <box size="0.17 0.175 0.056"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <geometry>
        <box size="0.17 0.175 0.056"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="computer_link">
    <material>Erratic/Red</material>
  </gazebo>
  <joint name="base_link_left_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0.075 0.16525 -0.053"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- not sure about it -->
    <limit effort="100" velocity="100"/>
    <dynamics damping="0.0" friction="0.0"/>
    <parent link="base_link"/>
    <child link="base_link_left_wheel_link"/>
  </joint>
  <link name="base_link_left_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz=" 0 0 0 "/>
      <inertia ixx="0.012411765597" ixy="0.0" ixz="0.0" iyy="0.015218160428" iyz="0.0" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link_left_wheel_link">
    <mu1>100.0 </mu1>
    <mu2>100.0&quot; </mu2>
    <kp>1000000.0 </kp>
    <kd> 1.0 </kd>
    <material>Erratic/Grey</material>
  </gazebo>
  <gazebo reference="base_link_left_motor_link">
    <material>Erratic/White</material>
  </gazebo>
  <transmission name="base_link_left_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_link_left_wheel_motor"/>
    <joint name="base_link_left_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <joint name="base_link_right_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0.075 -0.16525 -0.053"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- not sure about it -->
    <limit effort="100" velocity="100"/>
    <dynamics damping="0.0" friction="0.0"/>
    <parent link="base_link"/>
    <child link="base_link_right_wheel_link"/>
  </joint>
  <link name="base_link_right_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz=" 0 0 0 "/>
      <inertia ixx="0.012411765597" ixy="0.0" ixz="0.0" iyy="0.015218160428" iyz="0.0" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link_right_wheel_link">
    <mu1>100.0 </mu1>
    <mu2>100.0&quot; </mu2>
    <kp>1000000.0 </kp>
    <kd> 1.0 </kd>
    <material>Erratic/Grey</material>
  </gazebo>
  <gazebo reference="base_link_right_motor_link">
    <material>Erratic/White</material>
  </gazebo>
  <transmission name="base_link_right_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_link_right_wheel_motor"/>
    <joint name="base_link_right_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
    <alwaysOn>true</alwaysOn>
    <update>100</update>
    <updateRate>100.0</updateRate>
    <leftJoint>base_link_right_wheel_joint</leftJoint>
    <rightJoint>base_link_left_wheel_joint</rightJoint>
    <wheelSeparation>0.3305</wheelSeparation>
    <wheelDiameter>0.15</wheelDiameter>
    <torque>5</torque>
    <topicName>cmd_vel</topicName>
  </plugin>
  <plugin filename="libgazebo_ros_p3d.so" name="p3d_base_controller">
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate>
    <bodyName>base_link</bodyName>
    <topicName>base_pose_ground_truth</topicName>
    <gaussianNoise>0.01</gaussianNoise>
    <frameName>map</frameName>
    <xyzOffsets>0 0 0</xyzOffsets>
    <rpyOffsets>0 0 0</rpyOffsets>
  </plugin>
  <canonicalBody>base_footprint</canonicalBody>
  <gazebo reference="base_link">
    <material>Erratic/Grey2</material>
  </gazebo>
  <gazebo reference="base_top_link">
    <material>Erratic/Grey2</material>
  </gazebo>
  <gazebo reference="caster_wheel_link">
    <material>Erratic/Black</material>
  </gazebo>
  <gazebo reference="base_caster_box_link">
    <material>Erratic/Black</material>
  </gazebo>
  <gazebo reference="base_caster_support_link">
    <material>Erratic/White</material>
  </gazebo>
</robot>

Can you look into the Plugin tags and transmission tags because i am not sure what actually i am doing there. Thanks

Service call failed when defining erratic robot for gazebo 1.9

Hi all,

I changed the urdf of erratic robot to make it compatible with gazebo 1.9. But now when i try to spawn the robot inside empty world it gave me following error (last lines of gazebo terminal).

[ INFO] [1376596917.648008574, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1376596917.767362832, 0.135000000]: Physics dynamic reconfigure ready.
Warning [parser.cc:353] No <sdf> element in file[data-string]
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
  what():  bad lexical cast: source type value could not be interpreted as target
Aborted (core dumped)

Any ideas on it? (p.s I am using ROS groovy with standalone gazebo 1.9 on ubuntu 12.04).

Thanks in advance. Edit 1: Here is how my urdf looks like it is generated from xacro using xacro.py

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from /opt/ros/groovy/stacks/erratic_robot/erratic_description/urdf/erratic.urdf.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="erratic" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <!-- Included URDF Files -->
  <material name="Black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="Blue">
    <color rgba="0.0 0.0 0.8 1.0"/>
  </material>
  <material name="Green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="Grey">
    <color rgba="0.7 0.7 0.7 1.0"/>
  </material>
  <material name="Grey2">
    <color rgba="0.9 0.9 0.9 1.0"/>
  </material>
  <material name="Red">
    <color rgba="0.8 0.0 0.0 1.0"/>
  </material>
  <material name="White">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>
  <link name="base_footprint">
    <inertial>
      <mass value="0.0001"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.001 0.001 0.001"/>
      </geometry>
      <material name="Green"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.128"/>
      <geometry>
        <box size="0.001 0.001 0.001"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_footprint_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0.063 0 0.128"/>
    <parent link="base_footprint"/>
    <child link="base_link"/>
  </joint>
  <link name="base_link">
    <inertial>
      <mass value="20"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_base_link.dae"/>
      </geometry>
      <material name="Blue"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_base_link.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_caster_support_joint" type="continuous">
    <origin rpy="0 0 0" xyz="-0.188 0 -0.043"/>
    <parent link="base_link"/>
    <child link="base_caster_support_link"/>
    <axis xyz="0 0 1"/>
    <anchor xyz="0.01 0 0"/>
    <!-- doubts in it may be need to remove later-->
    <!-- changing these lines accordingly-->
    <!--limit effort="100" velocity="100" k_velocity="0" / -->
    <limit effort="100" velocity="100"/>
    <!-- changing these lines accordingly-->
    <safety_controller k_velocity="0"/>
    <dynamics damping="0.0" friction="0.0"/>
  </joint>
  <transmission name="base_caster_support_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_caster_support_motor"/>
    <joint name="base_caster_support_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <link name="base_caster_support_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_support_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_support_link.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="caster_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="-0.025 0 -0.0469"/>
    <parent link="base_caster_support_link"/>
    <child link="caster_wheel_link"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- doubts in it may be need to remove later-->
    <!-- changing these lines accordingly-->
    <!--limit effort="100" velocity="100" k_velocity="0" / -->
    <limit effort="100" velocity="100"/>
    <!-- changing these lines accordingly-->
    <safety_controller k_velocity="0"/>
    <dynamics damping="0.0" friction="0.0"/>
  </joint>
  <transmission name="caster_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="caster_wheel_motor"/>
    <joint name="caster_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <link name="caster_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="caster_wheel_link">
    <mu1>100.0</mu1>
    <mu2>100.0 </mu2>
    <kp>1000000.0&quot; </kp>
    <kd>1.0 </kd>
  </gazebo>
  <joint name="computer_mount_joint" type="fixed">
    <origin rpy="0 0 0" xyz="-0.0925 0 0.0795"/>
    <parent link="base_link"/>
    <child link="computer_link"/>
  </joint>
  <link name="computer_link">
    <inertial>
      <mass value="2"/>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <geometry>
        <box size="0.17 0.175 0.056"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <geometry>
        <box size="0.17 0.175 0.056"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="computer_link">
    <material>Erratic/Red</material>
  </gazebo>
  <joint name="base_link_left_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0.075 0.16525 -0.053"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- not sure about it -->
    <limit effort="100" velocity="100"/>
    <dynamics damping="0.0" friction="0.0"/>
    <parent link="base_link"/>
    <child link="base_link_left_wheel_link"/>
  </joint>
  <link name="base_link_left_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz=" 0 0 0 "/>
      <inertia ixx="0.012411765597" ixy="0.0" ixz="0.0" iyy="0.015218160428" iyz="0.0" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link_left_wheel_link">
    <mu1>100.0 </mu1>
    <mu2>100.0&quot; </mu2>
    <kp>1000000.0 </kp>
    <kd> 1.0 </kd>
    <material>Erratic/Grey</material>
  </gazebo>
  <gazebo reference="base_link_left_motor_link">
    <material>Erratic/White</material>
  </gazebo>
  <transmission name="base_link_left_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_link_left_wheel_motor"/>
    <joint name="base_link_left_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <joint name="base_link_right_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0.075 -0.16525 -0.053"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- not sure about it -->
    <limit effort="100" velocity="100"/>
    <dynamics damping="0.0" friction="0.0"/>
    <parent link="base_link"/>
    <child link="base_link_right_wheel_link"/>
  </joint>
  <link name="base_link_right_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz=" 0 0 0 "/>
      <inertia ixx="0.012411765597" ixy="0.0" ixz="0.0" iyy="0.015218160428" iyz="0.0" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link_right_wheel_link">
    <mu1>100.0 </mu1>
    <mu2>100.0&quot; </mu2>
    <kp>1000000.0 </kp>
    <kd> 1.0 </kd>
    <material>Erratic/Grey</material>
  </gazebo>
  <gazebo reference="base_link_right_motor_link">
    <material>Erratic/White</material>
  </gazebo>
  <transmission name="base_link_right_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_link_right_wheel_motor"/>
    <joint name="base_link_right_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
    <alwaysOn>true</alwaysOn>
    <update>100</update>
    <updateRate>100.0</updateRate>
    <leftJoint>base_link_right_wheel_joint</leftJoint>
    <rightJoint>base_link_left_wheel_joint</rightJoint>
    <wheelSeparation>0.3305</wheelSeparation>
    <wheelDiameter>0.15</wheelDiameter>
    <torque>5</torque>
    <topicName>cmd_vel</topicName>
  </plugin>
  <plugin filename="libgazebo_ros_p3d.so" name="p3d_base_controller">
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate>
    <bodyName>base_link</bodyName>
    <topicName>base_pose_ground_truth</topicName>
    <gaussianNoise>0.01</gaussianNoise>
    <frameName>map</frameName>
    <xyzOffsets>0 0 0</xyzOffsets>
    <rpyOffsets>0 0 0</rpyOffsets>
  </plugin>
  <canonicalBody>base_footprint</canonicalBody>
  <gazebo reference="base_link">
    <material>Erratic/Grey2</material>
  </gazebo>
  <gazebo reference="base_top_link">
    <material>Erratic/Grey2</material>
  </gazebo>
  <gazebo reference="caster_wheel_link">
    <material>Erratic/Black</material>
  </gazebo>
  <gazebo reference="base_caster_box_link">
    <material>Erratic/Black</material>
  </gazebo>
  <gazebo reference="base_caster_support_link">
    <material>Erratic/White</material>
  </gazebo>
</robot>

Can you look into the Plugin tags and transmission tags because i am not sure what actually i am doing there. Thanks

Edit2:

Below is the launch file for spawning it in the empty world. first the i run

roslaunch gazebo_ros emptyworld.launch

then this launch file is run.

<launch>
<!-- Convert an xacro and put on parameter server -->
<param name="robot_description" command="$(find xacro)/xacro.py $(find erratic_description)/urdf/erratic.urdf.xacro" />

<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
        args="-urdf -param robot_description -model erratic" />

 </launch>

Service call failed when defining erratic robot for gazebo 1.9

Hi all,

I changed the urdf of erratic robot to make it compatible with gazebo 1.9. But now when i try to spawn the robot inside empty world it gave me following error (last lines of gazebo terminal).

[ INFO] [1376596917.648008574, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1376596917.767362832, 0.135000000]: Physics dynamic reconfigure ready.
Warning [parser.cc:353] No <sdf> element in file[data-string]
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
  what():  bad lexical cast: source type value could not be interpreted as target
Aborted (core dumped)

Any ideas on it? (p.s I am using ROS groovy with standalone gazebo 1.9 on ubuntu 12.04).

Thanks in advance. Edit 1: Here is how my urdf looks like like. it is generated from xacro using xacro.py

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from /opt/ros/groovy/stacks/erratic_robot/erratic_description/urdf/erratic.urdf.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="erratic" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <!-- Included URDF Files -->
  <material name="Black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="Blue">
    <color rgba="0.0 0.0 0.8 1.0"/>
  </material>
  <material name="Green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="Grey">
    <color rgba="0.7 0.7 0.7 1.0"/>
  </material>
  <material name="Grey2">
    <color rgba="0.9 0.9 0.9 1.0"/>
  </material>
  <material name="Red">
    <color rgba="0.8 0.0 0.0 1.0"/>
  </material>
  <material name="White">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>
  <link name="base_footprint">
    <inertial>
      <mass value="0.0001"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.001 0.001 0.001"/>
      </geometry>
      <material name="Green"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.128"/>
      <geometry>
        <box size="0.001 0.001 0.001"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_footprint_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0.063 0 0.128"/>
    <parent link="base_footprint"/>
    <child link="base_link"/>
  </joint>
  <link name="base_link">
    <inertial>
      <mass value="20"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_base_link.dae"/>
      </geometry>
      <material name="Blue"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_base_link.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="base_caster_support_joint" type="continuous">
    <origin rpy="0 0 0" xyz="-0.188 0 -0.043"/>
    <parent link="base_link"/>
    <child link="base_caster_support_link"/>
    <axis xyz="0 0 1"/>
    <anchor xyz="0.01 0 0"/>
    <!-- doubts in it may be need to remove later-->
    <!-- changing these lines accordingly-->
    <!--limit effort="100" velocity="100" k_velocity="0" / -->
    <limit effort="100" velocity="100"/>
    <!-- changing these lines accordingly-->
    <safety_controller k_velocity="0"/>
    <dynamics damping="0.0" friction="0.0"/>
  </joint>
  <transmission name="base_caster_support_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_caster_support_motor"/>
    <joint name="base_caster_support_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <link name="base_caster_support_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_support_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_support_link.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="caster_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="-0.025 0 -0.0469"/>
    <parent link="base_caster_support_link"/>
    <child link="caster_wheel_link"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- doubts in it may be need to remove later-->
    <!-- changing these lines accordingly-->
    <!--limit effort="100" velocity="100" k_velocity="0" / -->
    <limit effort="100" velocity="100"/>
    <!-- changing these lines accordingly-->
    <safety_controller k_velocity="0"/>
    <dynamics damping="0.0" friction="0.0"/>
  </joint>
  <transmission name="caster_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="caster_wheel_motor"/>
    <joint name="caster_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <link name="caster_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_caster_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="caster_wheel_link">
    <mu1>100.0</mu1>
    <mu2>100.0 </mu2>
    <kp>1000000.0&quot; </kp>
    <kd>1.0 </kd>
  </gazebo>
  <joint name="computer_mount_joint" type="fixed">
    <origin rpy="0 0 0" xyz="-0.0925 0 0.0795"/>
    <parent link="base_link"/>
    <child link="computer_link"/>
  </joint>
  <link name="computer_link">
    <inertial>
      <mass value="2"/>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <geometry>
        <box size="0.17 0.175 0.056"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.028"/>
      <geometry>
        <box size="0.17 0.175 0.056"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="computer_link">
    <material>Erratic/Red</material>
  </gazebo>
  <joint name="base_link_left_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0.075 0.16525 -0.053"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- not sure about it -->
    <limit effort="100" velocity="100"/>
    <dynamics damping="0.0" friction="0.0"/>
    <parent link="base_link"/>
    <child link="base_link_left_wheel_link"/>
  </joint>
  <link name="base_link_left_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz=" 0 0 0 "/>
      <inertia ixx="0.012411765597" ixy="0.0" ixz="0.0" iyy="0.015218160428" iyz="0.0" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link_left_wheel_link">
    <mu1>100.0 </mu1>
    <mu2>100.0&quot; </mu2>
    <kp>1000000.0 </kp>
    <kd> 1.0 </kd>
    <material>Erratic/Grey</material>
  </gazebo>
  <gazebo reference="base_link_left_motor_link">
    <material>Erratic/White</material>
  </gazebo>
  <transmission name="base_link_left_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_link_left_wheel_motor"/>
    <joint name="base_link_left_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <joint name="base_link_right_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0.075 -0.16525 -0.053"/>
    <axis xyz="0 1 0"/>
    <anchor xyz="0 0 0"/>
    <!-- not sure about it -->
    <limit effort="100" velocity="100"/>
    <dynamics damping="0.0" friction="0.0"/>
    <parent link="base_link"/>
    <child link="base_link_right_wheel_link"/>
  </joint>
  <link name="base_link_right_wheel_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz=" 0 0 0 "/>
      <inertia ixx="0.012411765597" ixy="0.0" ixz="0.0" iyy="0.015218160428" iyz="0.0" izz="0.011763977943"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://erratic_description/meshes/collada/erratic_front_wheel_link.dae"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link_right_wheel_link">
    <mu1>100.0 </mu1>
    <mu2>100.0&quot; </mu2>
    <kp>1000000.0 </kp>
    <kd> 1.0 </kd>
    <material>Erratic/Grey</material>
  </gazebo>
  <gazebo reference="base_link_right_motor_link">
    <material>Erratic/White</material>
  </gazebo>
  <transmission name="base_link_right_wheel_trans" type="pr2_mechanism_model/SimpleTransmission">
    <actuator name="base_link_right_wheel_motor"/>
    <joint name="base_link_right_wheel_joint"/>
    <mechanicalReduction>1.0</mechanicalReduction>
  </transmission>
  <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
    <alwaysOn>true</alwaysOn>
    <update>100</update>
    <updateRate>100.0</updateRate>
    <leftJoint>base_link_right_wheel_joint</leftJoint>
    <rightJoint>base_link_left_wheel_joint</rightJoint>
    <wheelSeparation>0.3305</wheelSeparation>
    <wheelDiameter>0.15</wheelDiameter>
    <torque>5</torque>
    <topicName>cmd_vel</topicName>
  </plugin>
  <plugin filename="libgazebo_ros_p3d.so" name="p3d_base_controller">
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate>
    <bodyName>base_link</bodyName>
    <topicName>base_pose_ground_truth</topicName>
    <gaussianNoise>0.01</gaussianNoise>
    <frameName>map</frameName>
    <xyzOffsets>0 0 0</xyzOffsets>
    <rpyOffsets>0 0 0</rpyOffsets>
  </plugin>
  <canonicalBody>base_footprint</canonicalBody>
  <gazebo reference="base_link">
    <material>Erratic/Grey2</material>
  </gazebo>
  <gazebo reference="base_top_link">
    <material>Erratic/Grey2</material>
  </gazebo>
  <gazebo reference="caster_wheel_link">
    <material>Erratic/Black</material>
  </gazebo>
  <gazebo reference="base_caster_box_link">
    <material>Erratic/Black</material>
  </gazebo>
  <gazebo reference="base_caster_support_link">
    <material>Erratic/White</material>
  </gazebo>
</robot>

Can you look into the Plugin tags and transmission tags because i am not sure what actually i am doing there. Thanks

Edit2:

Below is the launch file for spawning it in the empty world. first the i run

roslaunch gazebo_ros emptyworld.launch

then this launch file is run.world.

<launch>
<!-- Convert an xacro and put on parameter server -->
<param name="robot_description" command="$(find xacro)/xacro.py $(find erratic_description)/urdf/erratic.urdf.xacro" />

<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
        args="-urdf -param robot_description -model erratic" />

 </launch>

Edit 3:

Below are the contents of spawn_urdf.log file

[rospy.client][INFO] 2013-08-16 11:14:10,581: init_node, name[/spawn_urdf], pid[15632]
[xmlrpc][INFO] 2013-08-16 11:14:10,582: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2013-08-16 11:14:10,583: Started XML-RPC server [http://zulqarnain-laptop:50095/]
[rospy.init][INFO] 2013-08-16 11:14:10,583: ROS Slave URI: [http://zulqarnain-laptop:50095/]
[rospy.impl.masterslave][INFO] 2013-08-16 11:14:10,583: _ready: http://zulqarnain-laptop:50095/
[xmlrpc][INFO] 2013-08-16 11:14:10,585: xml rpc node: starting XML-RPC server
[rospy.registration][INFO] 2013-08-16 11:14:10,586: Registering with master node http://localhost:11311
[rospy.init][INFO] 2013-08-16 11:14:10,684: registered with master
[rospy.rosout][INFO] 2013-08-16 11:14:10,684: initializing /rosout core topic
[rospy.rosout][INFO] 2013-08-16 11:14:10,690: connected to core topic /rosout
[rospy.simtime][INFO] 2013-08-16 11:14:10,693: initializing /clock core topic
[rospy.simtime][INFO] 2013-08-16 11:14:10,697: connected to core topic /clock
[rospy.internal][INFO] 2013-08-16 11:14:10,706: topic[/clock] adding connection to [http://zulqarnain-laptop:53560/], count 0
[rosout][INFO] 2013-08-16 11:14:10,705: Loading model xml from ros parameter
[rosout][INFO] 2013-08-16 11:14:10,718: Waiting for service /gazebo/spawn_urdf_model
[rosout][INFO] 2013-08-16 11:14:10,722: Calling service /gazebo/spawn_urdf_model
[rospy.internal][INFO] 2013-08-16 11:14:10,983: topic[/rosout] adding connection to [/rosout], count 0
[rospy.internal][WARNING] 2013-08-16 11:14:11,228: Unknown error initiating TCP/IP socket to zulqarnain-laptop:35908 (http://zulqarnain-laptop:53560/): Traceback (most recent call last):
  File "/opt/ros/groovy/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 534, in connect
    self.socket.connect((dest_addr, dest_port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused

[rospy.internal][INFO] 2013-08-16 11:14:11,229: topic[/clock] removing connection to http://zulqarnain-laptop:53560/
[rospy.core][INFO] 2013-08-16 11:14:11,229: signal_shutdown [atexit]
[rospy.internal][INFO] 2013-08-16 11:14:11,235: topic[/rosout] removing connection to /rosout
[rospy.impl.masterslave][INFO] 2013-08-16 11:14:11,235: atexit