Gazebo | Ignition | Community
Ask Your Question

Martin Günther's profile - activity

2018-08-23 11:57:25 -0600 received badge  Good Answer (source)
2018-03-05 11:16:36 -0600 received badge  Nice Answer (source)
2018-03-05 04:01:10 -0600 edited answer Mobile arm simulation behaves strangely when adding ros_control plugin

It's this really annoying regression in Gazebo: https://github.com/ros-simulation/gazebo_ros_pkgs/issues/612 . Basically

2018-03-05 03:32:30 -0600 answered a question Mobile arm simulation behaves strangely when adding ros_control plugin

It's this really annoying regression in Gazebo: https://github.com/ros-simulation/gazebo_ros_pkgs/issues/612 . Basically

2014-04-09 21:17:31 -0600 received badge  Great Answer (source)
2013-10-09 17:55:40 -0600 received badge  Nice Answer (source)
2013-09-26 04:49:12 -0600 answered a question Why does the wiki claim that ROS packages using gazebo must be catkin packages?

@leblanc_kevin, I believe you are right. The statement that

you will first need to "catkinize" your packages to begin migration

is probably not true. A more correct way to phrase it would probably be that while both rosbuild and catkin work at the moment, rosbuild is slowly being deprecated in favor of catkin, and the rest of the tutorial assumes that you're using catkin.

Disclaimer: I haven't actually tried using Gazebo 1.9 on Hydro myself yet, neither with rosbuild nor with catkin, but I assume that it doesn't behave differently than other catkin packages, which work fine with rosbuild.

2013-09-18 14:07:58 -0600 received badge  Enlightened (source)
2013-09-18 12:37:53 -0600 received badge  Good Answer (source)
2013-09-18 04:40:30 -0600 received badge  Nice Answer (source)
2013-09-18 04:15:06 -0600 answered a question Tracked vehicles simulation

There has been a discussion about this two years ago here, but I don't know what became of it.

2013-09-18 04:08:50 -0600 commented answer The inertia matrix explained

I've updated the tutorial.

2013-09-18 03:38:29 -0600 answered a question The inertia matrix explained

I agree 100% with Adolfo's answer, especially that the identity matrix is a particularly bad choice. That tutorial really should be fixed. Some things to add:

You must give links an inertia matrix in the URDF, otherwise they (and their child links) won't be simulated.

It's important to give links an inertia matrix that is at least close to the correct order of magnitude. Otherwise, the simulation will be highly unrealistic. Imagine you used the identity matrix for the "head" link of your robot. This tells the simulation that the head has about the inertia of a large arm chair. So if you drive around in simulation and suddenly stop, your robot will (naturally) topple over.

If you use geometric primitives (box, cylinder, sphere) to model a link, and you assume equal distribution of mass, you can use wikipedia's list of moment of inertia tensors to compute the correct matrix. I've created a couple of xacro macros that do this automatically: common.xacro.

If you use CAD models to model a link, you can use Meshlab to compute the inertia tensor (again, assuming equal distribution of mass):

  • View -> Show Layer Dialog
  • Filters -> Quality Measures and Computations -> Compute Geometric Measures

Unfortunately, this usually gives a matrix that is rounded to all zeroes, so you might have to scale up your model, compute the inertia tensor, and divide the result by an appropriate factor.

2013-04-16 06:28:50 -0600 received badge  Supporter (source)
2013-02-18 20:35:49 -0600 received badge  Famous Question (source)
2013-02-18 20:35:49 -0600 received badge  Notable Question (source)
2013-02-18 20:35:49 -0600 received badge  Popular Question (source)
2012-12-09 04:11:15 -0600 commented answer Collision links appear at absolute positions

I can't accept my own question as correct, because it requires a minimum of 50 points. So we will have to wait for a moderator to do that.

2012-12-02 12:34:34 -0600 received badge  Student (source)
2012-12-01 21:10:47 -0600 received badge  Teacher (source)
2012-12-01 21:10:47 -0600 received badge  Self-Learner (source)
2012-11-27 05:22:22 -0600 answered a question Collision links appear at absolute positions

I solved the problem myself. The problem was that the links were missing <origin> tags (only the collision and visual tags had origin tags, but not the links themselves). Here's the fixed model file (I also added joints and inertials for all links, but the problem addressed in my question was solved by adding the origin tags):

<gazebo version="1.0">
  <model name="race_table2" static="true">
  <link name="surface">
    <inertial mass="15.0">
      <inertia ixx="0.2134666666666667" ixy="0" ixz="0" iyy="0.2666666666666667" iyz="0" izz="0.053466666666666676"/>
    </inertial>
    <origin pose="0 0 0.69 0 0 0"/>

    <collision name="collision">
      <geometry>
        <box size="1.6 0.8 0.04"/>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <box size="1.6 0.8 0.04"/>
      </geometry>
      <material script="Gazebo/Wood"/>
    </visual>
  </link>

  <joint name="front_left_leg_joint" type="revolute">
    <parent link="surface"/>
    <child link="front_left_leg"/>
    <axis xyz="0 0 1">
      <limit lower="0.0000" upper="0.0000"/>
    </axis>
  </joint>

  <link name="front_left_leg">
    <inertial mass="1.0">
      <inertia ixx="0.038633333" ixy="0" ixz="0" iyy="0.038633333" iyz="0" izz="0.0002"/>
    </inertial>
    <origin pose="0.78 0.38 0.34 0 0 0"/>
    <collision name="collision">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>

  <joint name="front_right_leg_joint" type="revolute">
    <parent link="surface"/>
    <child link="front_right_leg"/>
    <axis xyz="0 0 1">
      <limit lower="0.0000" upper="0.0000"/>
    </axis>
  </joint>

  <link name="front_right_leg">
    <inertial mass="1.0">
      <inertia ixx="0.038633333" ixy="0" ixz="0" iyy="0.038633333" iyz="0" izz="0.0002"/>
    </inertial>
    <origin pose="0.78 -0.38 0.34 0 0 0"/>
    <collision name="collision">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>

  <joint name="back_right_leg_joint" type="revolute">
    <parent link="surface"/>
    <child link="back_right_leg"/>
    <axis xyz="0 0 1">
      <limit lower="0.0000" upper="0.0000"/>
    </axis>
  </joint>

  <link name="back_right_leg">
    <inertial mass="1.0">
      <inertia ixx="0.038633333" ixy="0" ixz="0" iyy="0.038633333" iyz="0" izz="0.0002"/>
    </inertial>
    <origin pose="-0.78 -0.38 0.34 0 0 0"/>
    <collision name="collision">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>

  <joint name="back_left_leg_joint" type="revolute">
    <parent link="surface"/>
    <child link="back_left_leg"/>
    <axis xyz="0 0 1">
      <limit lower="0.0000" upper="0.0000"/>
    </axis>
  </joint>

  <link name="back_left_leg">
    <inertial mass="1.0">
      <inertia ixx="0.038633333" ixy="0" ixz="0" iyy="0.038633333" iyz="0" izz="0.0002"/>
    </inertial>
    <origin pose="-0.78 0.38 0.34 0 0 0"/>
    <collision name="collision">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>
</model>
</gazebo>
2012-11-27 03:25:18 -0600 received badge  Editor (source)
2012-11-26 10:36:34 -0600 asked a question Collision links appear at absolute positions

Hi all,

When I spawn a custom table model somewhere in Gazebo, the table legs still appear around the absolute 0 position in a simulated laser scan (/base_laser). Why?

Running ROS Fuerte.

Gazebo gui, showing the relative position of the table:

Gazebo GUI screenshot

RViz Screenshot (notice the two table legs visible in laser scan; the other two are behind the robot) RViz screenshot

launch file:

<launch>
  <include file="$(find pr2_bringup_gazebo_demo)/launch/pr2_uncalibrated_empty_world.launch" />

  <param name="table_description"
     textfile="$(find race_gazebo_worlds)/models/race_table2.model" />
  <node name="spawn_table0" pkg="gazebo" type="spawn_model" args="-gazebo
     -param table_description -x -5.15 -y 3.56 -z 0.001 -Y 0.00
     -model race_table0" respawn="false" output="screen" />
</launch>

model file (race_gazebo_worlds/models/race_table2.model):

<gazebo version="1.0">
<model name="race_table2" static="true">
  <link name="surface">
    <inertial mass="15.0">
      <inertia ixx="0.2134666666666667" ixy="0" ixz="0"
               iyy="0.2666666666666667" iyz="0"
               izz="0.053466666666666676"/>
    </inertial>

    <collision name="collision">
      <origin pose="0 0 0.69 0 0 0"/>
      <geometry>
        <box size="1.6 0.8 0.04"/>
      </geometry>
    </collision>
    <visual name="visual">
      <origin pose="0 0 0.69 0 0 0"/>
      <geometry>
        <box size="1.6 0.8 0.04"/>
      </geometry>
      <material script="Gazebo/Wood"/>
    </visual>
  </link>

  <link name="front_left_leg">
    <collision name="collision">
      <origin pose="0.78 0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <origin pose="0.78 0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>

  <link name="front_right_leg">
    <collision name="collision">
      <origin pose="0.78 -0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <origin pose="0.78 -0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>

  <link name="back_right_leg">
    <collision name="collision">
      <origin pose="-0.78 -0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <origin pose="-0.78 -0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>

  <link name="back_left_leg">
    <collision name="collision">
      <origin pose="-0.78 0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
    </collision>
    <visual name="visual">
      <origin pose="-0.78 0.38 0.34 0 0 0"/>
      <geometry>
        <cylinder radius="0.02" length="0.68"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>
</model>
</gazebo>
2012-09-25 04:10:48 -0600 received badge  Autobiographer