Home | Tutorials | Wiki | Issues
Ask Your Question
0

moving objects via the GUI [closed]

asked 2013-08-07 23:04:24 -0500

rnunziata gravatar image

I have a urdf model that when I open in Gazebo if I move it with the movement tool jumps back to its original pose. I am using Gazebo 1.9. Has anyone experienced this issue. Here is the urdf file. The model opens fine in Rviz and displays correctly in Gazebo but can not be moved.

<?xml version="1.0"?>
<!-- Revolute-Revolute Manipulator -->
<robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">

  <!-- Import all Gazebo-customization elements, including Gazebo colors -->
  <xacro:include filename="$(find rrbot_description)/urdf/rrbot.gazebo" />
  <!-- Import Rviz colors -->
  <xacro:include filename="$(find rrbot_description)/urdf/materials.xacro" />

  <!-- Used for fixing robot to Gazebo 'base_link' -->
  <link name="world"/>


  <joint name="worldhook" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
  </joint>

   <link name='base_link'>
      <collision name='collision'>
        <origin xyz="0 0 .1 " rpy="0 0 0"/>
        <geometry>
          <box  size=".4 .2 .1">
            <size>.4 .2 .1</size>
          </box>
        </geometry>
      </collision>

      <visual name='visual'>
        <origin xyz="0 0 .1 " rpy="0 0 0"/>
        <geometry>
          <box  size=".4 .2 .1">
            <size>.4 .2 .1</size>
          </box>
        </geometry>
      </visual>

      <collision name='caster_collision'>
        <origin xyz="-0.15 0 0" rpy="0 0 0"/>
        <geometry>
          <sphere radius=".05">
          <radius>.05</radius>
          </sphere>
        </geometry>

        <surface>
         <friction>
          <ode>
            <mu>0</mu>
            <mu2>0</mu2>
            <slip1>1.0</slip1>
            <slip2>1.0</slip2>
          </ode>
         </friction>
        </surface>

      </collision>

      <visual name='caster_visual'>
        <origin xyz="-0.15 0 0" rpy="0 0 0"/>
        <geometry>
          <sphere radius=".05">
            <radius>.05</radius>
          </sphere>
        </geometry>
      </visual>

     <inertial>
        <mass value="1e-5" />
        <origin xyz="0 0 .1 " rpy="0 0 0"/>
        <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
     </inertial>
  </link> 



  <link name="left_wheel">
    <collision name="collision">
      <origin xyz="0.1 0.13 0.0" rpy="0 1.5707 1.5707"/>
      <geometry>
         <cylinder length="0.1" radius="0.05">
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </collision>
    <visual name="visual">
      <origin xyz="0.1 0.13 0.0" rpy="0 1.5707 1.5707"/>
      <geometry>
        <cylinder length="0.1" radius="0.05">
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </visual>
    <inertial>
      <mass value="1e-5" />
      <origin xyz="0.1 0.13 0.0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
    </inertial>
  </link>

  <link name="right_wheel">
    <collision name="collision">
      <origin xyz="0.1 -0.13 0.0" rpy="0 1.5707 1.5707"/>
      <geometry>
         <cylinder length="0.1" radius="0.05">
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </collision>
    <visual name="visual">
      <origin xyz="0.1 -0.13 0.0" rpy="0 1.5707 1.5707"/>
      <geometry>
        <cylinder length="0.1" radius="0.05">
          <radius>.1</radius>
          <length>.05</length>
        </cylinder>
      </geometry>
    </visual>
    <inertial>
      <mass value="1e-5" />
      <origin xyz="0.1 -0.13 0.0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
    </inertial>
  </link>


  <joint type="revolute" name="joint1">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <child link="left_wheel">left_wheel</child>
    <parent link="base_link">base_link</parent>
    <axis xyz="0 4 0">
      <xyz>0 1 0 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by rnunziata
close date 2013-08-16 20:59:45.764736

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-08 05:25:12 -0500

Hi,

The Problem is in this Code-Snippet on the top of your file

<!-- Used for fixing robot to Gazebo 'base_link' -->
  <link name="world"/>


  <joint name="worldhook" type="fixed">
    <parent link="world"/>
    <child link="hector1_base_link"/>
  </joint>

The Link references to the Gazebo World and your link is in a fixed position to it. Try to remove the code from the URDF-file. if removing this creates Problems with the robot, you can just add a dummy-link as reference frame for your robot

edit flag offensive delete link more

Comments

thanks...works ; I have one more issue published under different topic but related. Thank for moving me along.

rnunziata gravatar imagernunziata ( 2013-08-08 09:22:27 -0500 )edit

Question Tools

Stats

Asked: 2013-08-07 23:04:24 -0500

Seen: 413 times

Last updated: Aug 08 '13