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

Banana rotates by itself in Gazebo, I don't know why.

asked 2019-01-27 07:12:29 -0600

TouchDeeper gravatar image

updated 2019-01-27 11:18:12 -0600

ahendrix gravatar image

I'm using gazebo7 in ubuntu16.04.

I launch a bannana model in gazebo,everything is ok but the bannana will rotate slowly by itself.

urdf below:

<?xml version="1.0" ?>
<robot name="Bannana">
  <material name="yellow">
        <color rgba="1 0.4 0 1"/>
  </material>
  <link name="Bannana">
    <inertial>
      <origin
        xyz="0.0014177 4.15280000000162E-06 0.026526"
        rpy="0.0 0.0 0.0" />
      <mass
        value="0.11082" />
      <inertia
        ixx="2.48347659000621E-05"
        ixy="1.68484882757417E-06"
        ixz="-1.05360215654521E-06"
        iyy="0.000186690109925898"
        iyz="1.13501975389491E-08"
        izz="0.000175609996584435" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="1.5707963267949 0 0" />
      <geometry>
        <mesh
          filename="package://object_description/meshes/Bannana.STL" />
      </geometry>
      <material name="yellow" />
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="1.5707963267949 0 0" />
      <geometry>
        <mesh
          filename="package://object_description/meshes/Bannana.STL" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="Bannana">
            <material>Gazebo/Yellow</material>
  </gazebo>

</robot>

launch file below:

<launch>

  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="paused" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>
  <arg name="headless" default="false"/>
  <arg name="debug" default="false"/>
  <arg name="world_name" default="$(find object_gazebo)/world/table.world"/>

  <!-- We resume the logic in empty_world.launch -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="$(arg debug)" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="paused" value="$(arg paused)"/>
    <arg name="use_sim_time" value="$(arg use_sim_time)"/>
    <arg name="headless" value="$(arg headless)"/>
    <arg name="world_name" value="$(arg world_name)" />
  </include>

  <!-- Load the URDF into the ROS Parameter Server -->
  <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find object_description)/urdf/Bannana.urdf'" /> 
  <!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
    args="-urdf
        -model Bannana 
        -param robot_description
        -x 0
        -y 0
        -z 1 "/> 
</launch>

Here is the workspace link,and there is a bannana.gif in the home directory to describe the question.

Can you give me some advice? Thanks a lot!

edit retag flag offensive close merge delete

Comments

1

The problem maybe in the inertial. I would advise checking them. For symmetrical it be represented by 6 values (like you did), but if is is not symmetrical you need all 9 values. Here is more info: http://wiki.ros.org/urdf/Tutorials/Ad...

Kluun gravatar image Kluun  ( 2019-01-28 05:37:24 -0600 )edit

Hi,@Kluun I'm sorry for took so long time to reply.A few days ago is the Spring Festival in China. I was preparing to happy new years in the past few days, so i can't reply in time. Back to the question,is the inertial matrix not symmetrical?

TouchDeeper gravatar image TouchDeeper  ( 2019-02-13 06:32:41 -0600 )edit
1

Cross-post to Gazebo Answers: Banana rotates by itself in Gazebo, I don't know why (with answer by @chapulina).

gvdhoorn gravatar image gvdhoorn  ( 2019-02-28 04:33:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-03-28 01:15:51 -0600

TouchDeeper gravatar image

I enlarge the mass by 10 times, and enlarge the inertial by 100 times, the rotate disappear. It is just a solution. I don't know the reason.

edit flag offensive delete link more

Comments

That's a great workaround. It worked here with PAL Robotics' TIAGO.

felipeduque gravatar image felipeduque  ( 2020-06-10 09:18:31 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-01-27 07:12:29 -0600

Seen: 836 times

Last updated: Mar 28 '19