nav_stack not moving robot

asked 2016-01-19 21:35:58 -0600

ngoldfarb gravatar image

I am trying to use the nav_stack to move my robot. I can get it to move when i comment out

<ball name="m1" parent="base_link" x="0"  y="${leg}"  move="0"/>
 <ball name="m2" parent="base_link" x="${-leg}" y="0"  move="1"/>
 <ball name="m3" parent="base_link" x="0"  y="${-leg}" move="0"/>
 <ball name="m4" parent="base_link" x="${leg}"  y="0"  move="1"/>

However when I try to use those the lines above robot does not move. I got figure out why it would cause this problem. Here are my two URDF files

omnishot_nav.urdf.xacro

    <?xml version="1.0"?>
<robot  name="omnishot" xmlns:xacro="http://www.ros.org/wiki/xacro" 
  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">

  <!-- Included URDF/XACRO Files -->
  <xacro:include filename="$(find robot1_description)/urdf/materials.urdf.xacro" />
  <xacro:include filename="$(find robot1_description)/urdf/ball.urdf.xacro" />

  <!-- PROPERTY LIST -->
  <!--All units in m-kg-s-radians unit system -->
  <property name="M_PI" value="3.1415926535897931" />

  <!-- Main Body-base -->
  <property name="base_size" value=".84" /> 
  <property name="base_height" value="0.66" /> 
  <property name="leg" value="0.3" /> 
  <property name="base_mass" value="300" /> <!-- in kg-->
 <property name="M_SCALE" value="1" />
  <!--Inertial macros for the box and cylinder. Units are kg*m^2-->
  <macro name="box_inertia" params="m x y z">
    <inertia  ixx="${m*(y*y+z*z)/12}" ixy = "0" ixz = "0"
              iyy="${m*(x*x+z*z)/12}" iyz = "0"
              izz="${m*(x*x+z*z)/12}" /> 
  </macro>

    <xacro:macro name="default_inertial" params="mass">
               <inertial>
                       <mass value="${mass}" />
                       <inertia ixx="1.0" ixy="0.0" ixz="0.0"
                                iyy="1.0" iyz="0.0"
                                izz="1.0" />
               </inertial>
  </xacro:macro>

  <!-- BASE-FOOTPRINT -->
  <!-- base_footprint is a fictitious link(frame) that is on the ground right below base_link origin -->
  <link name="base_footprint">
      <visual>
      <geometry>
              <box size="0.001 0.001 0.001"/>
          </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      </visual>
    <box_inertia  m="${base_mass}" x="${base_size}" y="${base_size}" z="${base_height}"/> 
  </link>

  <xacro:include filename="$(find robot1_description)/urdf/robot.gazebo" />

  <gazebo reference="base_footprint">
    <turnGravityOff>false</turnGravityOff>
  </gazebo>

  <joint name="base_footprint_joint" type="fixed">
  <origin xyz="0 0 ${ball_radius - base_z_origin_to_ball_origin}" rpy="0 0 0" />
    <parent link="base_footprint"/>
    <child link="base_link" />
  </joint>

  <!-- BASE-LINK -->
  <!--Actual body/chassis of the robot-->
  <link name="base_link">

    <visual>
      <origin xyz="0 0 .38" rpy="0 0 0" />
      <geometry>
         <mesh filename="file:///home/nathaniel/Documents/Omnibot/code/catkin_ws/src/omni_shot/models/omniShotFlip.stl" scale="${M_SCALE} ${M_SCALE} ${M_SCALE}"/>
      </geometry>
      <material name="Yellow" />
    </visual>  
    <collision>
      <geometry>
              <box size="0 0 0"/>
      </geometry>
    </collision>
     <box_inertia  m="${base_mass}" x="${base_size}" y="${base_size}" z="${base_height}"/> 
  </link>


  <gazebo reference="base_link">
    <material>Gazebo/Yellow</material>
    <turnGravityOff>false</turnGravityOff>
  </gazebo>

  <!-- WHEELs -->




 <ball name="m1" parent="base_link" x="0"  y="${leg}"  move="0"/>
 <ball name="m2" parent="base_link" x="${-leg}" y="0"  move="1"/>
 <ball name="m3" parent="base_link" x="0"  y="${-leg}" move="0"/>
 <ball name="m4" parent="base_link" x="${leg}"  y="0"  move="1"/>









<!--  <gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control ...
(more)
edit retag flag offensive close merge delete