The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.

asked 2016-06-01 05:11:49 -0500

viola gravatar image

updated 2016-06-01 12:33:14 -0500

Hello! I'm using tum_simulator on ROS and Gazebo. When I do roslaunch cvg_sim_gazebo quadrotor.launch appears the

WARN: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.

The quadrotor doesn't move correctly with respect x-y axis. My URDF are:

<?xml version="1.0"?>

<robot
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:xacro="http://ros.org/wiki/xacro"
>


  <xacro:macro name="quadrotor_controller">
    <gazebo>
      <plugin name="quadrotor_simple_controller" filename="libhector_gazebo_quadrotor_simple_controller.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>0.0</updateRate>
        <bodyName>base_link</bodyName>
        <stateTopic>ground_truth/state</stateTopic>
        <imuTopic>ardrone/imu</imuTopic>
        <topicName>cmd_vel</topicName>
        <rollpitchProportionalGain>10.0</rollpitchProportionalGain>
        <rollpitchDifferentialGain>5.0</rollpitchDifferentialGain>
        <rollpitchLimit>0.5</rollpitchLimit>
        <yawProportionalGain>2.0</yawProportionalGain>
        <yawDifferentialGain>1.0</yawDifferentialGain>
        <yawLimit>1.5</yawLimit>
        <velocityXYProportionalGain>5.0</velocityXYProportionalGain>
        <velocityXYDifferentialGain>1.0</velocityXYDifferentialGain>
        <velocityXYLimit>2</velocityXYLimit>
        <velocityZProportionalGain>5.0</velocityZProportionalGain>
        <velocityZDifferentialGain>1.0</velocityZDifferentialGain>
        <velocityZLimit>0.5</velocityZLimit>
        <maxForce>30</maxForce>
        <motionSmallNoise>0.05</motionSmallNoise>
        <motionDriftNoise>0.03</motionDriftNoise>
        <motionDriftNoiseTime>5.0</motionDriftNoiseTime>
      </plugin>

      <plugin name="quadrotor_state_controller" filename="libhector_gazebo_quadrotor_state_controller.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>0.0</updateRate>
        <bodyName>base_link</bodyName>
        <stateTopic>ground_truth/state</stateTopic>
        <imuTopic>ardrone/imu</imuTopic>
        <sonarTopic>sonar_height</sonarTopic>
        <topicName>cmd_vel</topicName>
      </plugin>
    </gazebo>
  </xacro:macro>
</robot>

<?xml version="1.0"?>

<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:xacro="http://ros.org/wiki/xacro"
>

  <xacro:macro name="quadrotor_sensors">
    <gazebo>
      <plugin name="quadrotor_imu_sim" filename="libhector_gazebo_ros_imu.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>100.0</updateRate>
        <bodyName>base_link</bodyName>
        <frameId>ardrone_base_link</frameId>
        <topicName>ardrone/imu</topicName>
        <rpyOffsets>0 0 0</rpyOffsets> <!-- deprecated -->
        <gaussianNoise>0</gaussianNoise>  <!-- deprecated -->
        <accelDrift>0.5 0.5 0.5</accelDrift>
        <accelGaussianNoise>0.35 0.35 0.3</accelGaussianNoise>
        <rateDrift>0.0 0.0 0.0</rateDrift>
        <rateGaussianNoise>0.00 0.00 0.00</rateGaussianNoise>
        <headingDrift>0.0</headingDrift>
        <headingGaussianNoise>0.00</headingGaussianNoise>
      </plugin>

      <plugin name="quadrotor_baro_sim" filename="libhector_gazebo_ros_baro.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>10.0</updateRate>
        <bodyName>base_link</bodyName>
        <topicName>pressure_height</topicName>
        <altimeterTopicName>altimeter</altimeterTopicName>
        <offset>0</offset>
        <drift>0.1</drift>
        <gaussianNoise>0.5</gaussianNoise>
      </plugin>

      <plugin name="quadrotor_magnetic_sim" filename="libhector_gazebo_ros_magnetic.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>10.0</updateRate>
        <bodyName>base_link</bodyName>
        <topicName>magnetic</topicName>
        <offset>0 0 0</offset>
        <drift>0.0 0.0 0.0</drift>
        <gaussianNoise>1.3e-2 1.3e-2 1.3e-2</gaussianNoise>
      </plugin>

      <plugin name="quadrotor_gps_sim" filename="libhector_gazebo_ros_gps.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>4.0</updateRate>
        <bodyName>base_link</bodyName>
        <topicName>fix</topicName>
        <velocityTopicName>fix_velocity</velocityTopicName>
        <drift>5.0 5.0 5.0</drift>
        <gaussianNoise>0.1 0.1 0.1</gaussianNoise>
        <velocityDrift>0 0 0</velocityDrift>
        <velocityGaussianNoise>0.1 0.1 0.1</velocityGaussianNoise>
      </plugin>

      <plugin name="quadrotor_groundtruth_sim" filename="libgazebo_ros_p3d.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>100.0</updateRate>
        <bodyName>base_link</bodyName>
        <topicName>ground_truth/state</topicName>
        <gaussianNoise>0.0</gaussianNoise>
        <frameName>map</frameName>
      </plugin>

    </gazebo>
  </xacro:macro>
</robot>

Can someone help me? thanks you.

edit retag flag offensive close merge delete

Comments

Please format code using the 101010 button. It will make it much easier to read.

jarvisschultz gravatar image jarvisschultz  ( 2016-06-01 12:32:19 -0500 )edit