[ros-users] FW: Gazebo and Laser simulation

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ lasermodify.png (image/png)
Delete this message
%0A>%20%20%0A>%20%0A>%20%20%20%0A>%20%20%20%20<param%20name=%22robot_description%22%20command=%22%24(find%20xacro)/xacro.py%20'%24(find%20erratic_gazebo)/robots/erratic.urdf.xacro'%22%20/>%20%0A>%20%0A>%20%20%20%0A>%20%20%20%20<node%20name=%22spawn_erratic%22%20pkg=%22gazebo_tools%22%20type=%22gazebo_model%22%20args=%22-z%200.051%20-p%20robot_description%20spawn%20robot_description%22%20respawn=%22false%22%20output=%22screen%22%20/>%20%0A>%20%0A>%20%20%20%0A>%20%20%20<include%20file=%22%24(find%20pr2_controller_manager)/controller_manager.launch%22%20/>%20%0A>%20%0A>%20%20%20%0A>%20%20%20%20<node%20pkg=%22rostopic%22%20type=%22rostopic%22%20name=%22fake_joint_calibration%22%20args=%22pub%20/calibrated%20std_msgs/Bool%20true%22%20/>%20%0A>%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22diffdrive%22%20pkg=%22gazebo_plugins%22%20type=%22gazebo_ros_diffdrive%22%20respawn=%22true%22%20output=%22log%22/>%20%0A>%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22run_scene%22%20pkg=%22han_Scene%22%20type=%22run_scene%22%20args=%22%24(arg%20scenario)%22%20respawn=%22false%22%20output=%22screen%22/>%0A>%20%20%20%20%0A>%20%20%20%0A>%20%20%20%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22rviz%22%20pkg=%22rviz%22%20type=%22rviz%22%20respawn=%22false%22%20output=%22screen%22%20if=%22%24(arg%20launch_rviz)%22/>%0A>%20%0A>%20</launch>%0A>%20%0A>%20%0A>%20AND%0A>%20%0A>%20<launch>%0A>%20%0A>%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22gazebo%22%20pkg=%22gazebo%22%20type=%22gazebo%22%20args=%22-r%20%24(find%20han_Scene)/worlds/empty.world%22%20respawn=%22false%22%20output=%22screen%22%20if=%22%24(arg%20no_window)%22/>%0A>%20%20%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22gazebo%22%20pkg=%22gazebo%22%20type=%22gazebo%22%20args=%22%24(find%20han_Scene)/worlds/empty.world%22%20respawn=%22false%22%20output=%22screen%22%20unless=%22%24(arg%20no_window)%22/>%0A>%20%20%20%0A>%20%20%20%0A>%20%20%20<param%20name=%22walls%22%20textfile=%22%24(find%20han_Scene)/scenarios/%24(arg%20scenario)/walls.model%22%20/>%0A>%20%20%0A>%20%20%20<node%20name=%22xml2factor_walls%22%20pkg=%22gazebo%22%20type=%22spawn_model%22%20args=%22-gazebo%20-param%20walls%20-model%20walls%22%20respawn=%22false%22%20output=%22screen%22%20/>%0A>%20%0A>%20%20%20%0A>%20%20%0A>%20%0A>%20%20</launch>%0A>%20%0A>%20WHERE%20THE%20WALL%20MODEL%20IS%20LIKE:%0A>%20%0A>%20<?xml%20version=%221.0%22%20?>%0A>%20<model:physical%20name=%22walls_model%22%0A>%20%20%20xmlns:model=%22http://playerstage.sourceforge.net/gazebo/xmlschema/#model%22%20%0A>%20%20%20xmlns:body=%22http://playerstage.sourceforge.net/gazebo/xmlschema/#body%22%20%0A>%20%20%20xmlns:geom=%22http://playerstage.sourceforge.net/gazebo/xmlschema/#geom%22%20>%0A>%20%0A>%20%0A>%20%0A>%20That%20all,%20I%20dont%20know%20where%20i%20can%20start%20to%20solve%20this!!!!%0A>%20%0A>%20Thanks%0A>%20%0A>%20Nicolas%0A>%20From:%20johnhsu@willowgarage.com%0A>%20Date:%20Wed,%2015%20Dec%202010%2012:05:37%20-0800%0A>%20Subject:%20Re:%20%5Bros-users%5D%20Gazebo%20and%20Laser%20simulation%0A>%20To:%20nicolasapicco@hotmail.com%0A>%20%0A>%20Hi%20Nicolas,%0A>%20It%20would%20help%20if%20you%20can%20post%20the%20commands%20you%20are%20using%20to%20run%20your%20simulation.%20%20Also,%20if%20you're%20trying%20to%20attach%20an%20image%20that%20is%20too%20large%20(>150KB)%20for%20the%20mailing%20list,%20you%20can%20convert%20it%20to%20a%20compressed%20format%20such%20as%20jpg%20or%20alternatively%20use%20one%20of%20the%20free%20online%20gallery%20hosting%20services.%0A>%20%0A>%20%0A>%20John%0A>%20%0A>%202010/12/15%20Nicol%C3%A1s%20Alvarez%20Picco%20<nicolasapicco@hotmail.com>%0A>%20%0A>%20%0A>%20%0A>%20%0A>%20%0A>%20%0A>%20%0A>%20Hi!!%0A>%20I%20am%20simulating%20a%20robot%20with%20a%20laser%20in%20Gazebo%20and%20it%20works%20quite%20well,%20but%20there%20are%20times%20when%20there%20is%20a%20desalinate%20between%20the%20orientation%20of%20the%20robot%20and%20the%20map,%20I%20mean%20the%20border%20of%20the%20map%20doesn't%20match%20with%20the%20laser%20points.%20As%20actually%20I%20dont%20know%20to%20much%20of%20gazebo%20and%20I%20didnt%20find%20anywhere%20this%20error,%20now%20I%20am%20asking%20to%20the%20list.%20It%20must%20be%20a%20problem%20with%20the%20tf,%20but%20the%20weird%20thing%20is%20that%20I%20do%20not%20have%20always%20this%20problems,%20just%20some%20times,%20but%20when%20it%20appears%20it%20continue%20like%20this%20until%20I%20finish%20the%20program.%0A>%20%0A>%20%0A>%20I%20would%20like%20to%20add%20an%20image%20for%20u%20to%20see,%20but%20each%20time%20I%20try%20to%20add%20image%20my%20msg%20is%20rejected.%0A>%20%0A>%20Thanks%20in%20advanced%0A>%20%0A>%20Nicolas%0A>%20%0A>%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A>%20%0A>%20_______________________________________________%0A>%20%0A>%20ros-users%20mailing%20list%0A>%20%0A>%20ros-users@code.ros.org%0A>%20%0A>%20https://code.ros.org/mailman/listinfo/ros-users%0A>%20%0A>%20%0A>%20%0A>%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20">Reply to this message
Author: User discussions
Date:  
To: ros-users, johnhsu
Subject: [ros-users] FW: Gazebo and Laser simulation

Hi!! Another thing is that when I run my program I have this warnings:


[ WARN] [1292518318.364947187, 0.448000000]: No transmissions were specified in the robot description.
[ WARN] [1292518318.365067348, 0.448000000]: None of the joints in the robot desription matches up to a motor. The robot is uncontrollable.
[ INFO] [1292518318.384784947, 0.448000000]: Server up
[ INFO] [1292518318.386512868, 0.448000000]: Spinning now
[ WARN] [1292518318.457107141, 0.448000000]: No transmissions were specified in the robot description.
[ WARN] [1292518318.457245309, 0.448000000]: None of the joints in the robot desription matches up to a motor. The robot is uncontrollable.
[ INFO] [1292518318.467271487, 0.448000000]: Callback thread id=0x3b1f9e0
[ WARN] [1292518318.585805210, 0.549000000]: Message from [/gazebo] has a non-fully-qualified frame_id [base_laser_link]. Resolved locally to [/base_laser_link]. This is will likely not work in multi-robot systems. This message will only print once.
[ WARN] [1292518318.585980041, 0.549000000]: Message from [/gazebo] has a non-fully-qualified frame_id [base_laser_link]. Resolved locally to [/base_laser_link]. This is will likely not work in multi-robot systems. This message will only print once.

Maybe has something to do with the model of my robot:


<?xml version="1.0"?>
<robot name="erratic"
       xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
       xmlns:xacro="http://ros.org/wiki/fixme"
       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
  <property name="M_PI" value="3.14159"/>


<property name="base_size_x" value="0.41" />
<property name="base_size_y" value="0.385" />
<property name="base_size_z" value="0.18" />


<property name="wheel_radius" value="0.075" />
<property name="wheel_length" value="0.02" />
<property name="caster_wheel_offset_y" value="0.17" />

  <link name="base_link">
    <inertial>
      <mass value="10" />
      <origin xyz="-0.1 0 ${base_size_z/2}" />
      <inertia ixx="1.0" ixy="0.0" ixz="0.0"
               iyy="1.0" iyz="0.0"
               izz="1.0" />
    </inertial>


    <visual>
      <origin xyz="-0.075 0 0.115" rpy="0 0 0" />
      <geometry>
        <box size="0.22 0.29 0.14" />
      </geometry>
    </visual>


    <collision>
      <origin xyz="-0.075 0 0.115" rpy="0 0 0" />
      <geometry>
        <box size="0.22 0.29 0.14" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_link">
    <material>Gazebo/Grey</material>
  </gazebo>


  <joint name="base_top_joint" type="fixed" >
    <origin xyz="0 0 0.051" rpy="0 0 0" />
    <parent link="base_link" />
    <child link="base_top_link"/>
  </joint>


  <link name="base_top_link">
    <inertial>
      <mass value="1.0"/>
      <origin xyz="0 0 ${base_size_z/2}" />
      <inertia ixx="0.0652232699207" ixy="0.0" ixz="0.0"
               iyy="0.0669473158652" iyz="0.0"
               izz="0.0683196351726" />
    </inertial>


    <visual>
      <origin xyz="-0.08 0 0.13" rpy="0 0 0" />
      <geometry>
        <box size="${base_size_x} ${base_size_y} 0.01" />
      </geometry>
    </visual>



    <collision>
      <origin xyz="-0.08 0 0.13" rpy="0 0 0" />
      <geometry>
        <box size="${base_size_x} ${base_size_y} 0.01" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_top_link">
    <material>Gazebo/BumpyMetal</material>
  </gazebo>


  <xacro:macro name="erratic_wheel" params="suffix parent reflect">
    <joint name="${parent}_${suffix}_wheel_joint" type="continuous">
      <origin xyz="0 ${reflect*caster_wheel_offset_y} ${wheel_radius}" rpy="0 0 0" />
      <axis xyz="0 1 0" />
      <anchor xyz="0 0 0" />
      <limit effort="100" velocity="100" />
      <joint_properties damping="0.0" friction="0.0" />
      <parent link="${parent}" />
      <child link="${parent}_${suffix}_wheel_link" />
    </joint>


    <link name="${parent}_${suffix}_wheel_link">
      <inertial>
        <mass value="0.1" /> <!-- check jmh 20081205 -->
        <origin xyz=" 0 0 0 " />
        <inertia  ixx="0.012411765597" ixy="0.0" ixz="0.0"
                  iyy="0.015218160428" iyz="0.0"
                  izz="0.011763977943" />
      </inertial>
      <visual>
        <origin xyz="0 0 0" rpy="${M_PI/2} 0 0" />
        <geometry>
          <cylinder radius="${wheel_radius}" length="${wheel_length}" />
        </geometry>
      </visual>
      <collision>
        <origin xyz="0 0 0" rpy="${M_PI/2} 0 0" />
        <geometry>
          <cylinder radius="${wheel_radius}" length="${wheel_length}" />
        </geometry>
      </collision>
    </link>


    <gazebo reference="${parent}_${suffix}_wheel_link" >
      <mu1>50.0</mu1>
      <mu2>50.0</mu2>
      <kp>100000000.0</kp>
      <kd>1.0</kd>
      <material>Gazebo/Fish</material>
    </gazebo>
  </xacro:macro>



<xacro:erratic_wheel suffix="left" parent="base_link" reflect="1"/>
<xacro:erratic_wheel suffix="right" parent="base_link" reflect="-1"/>

  <joint name="base_caster_box_joint" type="fixed">
    <origin xyz="0 0 0.051" rpy="0 0 0" />
    <parent link="base_link" />
    <child link="base_caster_box_link"/>
  </joint>


  <link name="base_caster_box_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz="0 0 ${base_size_z/2}" />
      <inertia ixx="0.01" ixy="0.0" ixz="0.0"
               iyy="0.01" iyz="0.0"
               izz="0.01" />
    </inertial>


    <visual>
      <origin xyz="-0.23 0 0.08" rpy="0 0 0" />
      <geometry>
        <box size="0.09 0.02 0.10" />
      </geometry>
    </visual>


    <collision>
      <origin xyz="-0.23 0 0.08" rpy="0 0 0" />
      <geometry>
        <box size="0.09 0.02 0.10" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_caster_box_link">
    <material>Gazebo/Grey</material>
  </gazebo>


  <joint name="base_caster_support_joint" type="continuous">
    <axis xyz="0 0 1" />
    <anchor xyz="0.01 0 0" />
    <limit effort="100" velocity="100" k_velocity="0" />
    <joint_properties damping="0.0" friction="0.0" />
    <parent link="base_caster_box_link" />
    <origin xyz="-0.265 0 0.0" rpy="0 0 0" />
    <child link="base_caster_support_link"/>
  </joint>
  <link name="base_caster_support_link">
    <inertial>
      <mass value="0.1"/>
      <origin xyz="0 0 0" />
      <inertia ixx="0.01" ixy="0.0" ixz="0.0"
               iyy="0.01" iyz="0.0"
               izz="0.01" />
    </inertial>


    <visual>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
      <geometry>
        <box size="0.03 0.02 0.06" />
      </geometry>
    </visual>


    <collision>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
      <geometry>
        <box size="0.03 0.02 0.06" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="base_caster_support_link">
    <material>Gazebo/Yellow</material>
  </gazebo>


  <joint name="caster_wheel_joint" type="continuous">
    <origin xyz="-0.02 0 -0.02" rpy="0 0 0" />
    <axis xyz="0 1 0" />
    <anchor xyz="0 0 0" />
    <limit effort="100" velocity="100" k_velocity="0" />
    <joint_properties damping="0.0" friction="0.0" />
    <parent link="base_caster_support_link" />
    <child link="caster_wheel_link" />
  </joint>


  <link name="caster_wheel_link">
    <inertial>
      <mass value="0.1" /> 
      <origin xyz=" 0 0 0 " />
      <inertia  ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983"
                iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="${M_PI/2} 0 0" />
      <geometry>
        <cylinder radius="0.03" length="0.01" />
      </geometry>


    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="${M_PI/2} 0 0" />
      <geometry>
        <cylinder radius="0.03" length="0.01" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="caster_wheel_link">
    <mu1>50.0</mu1>
    <mu2>50.0</mu2>
    <kp>100000000.0</kp>
    <kd>1.0</kd>
    <material>Gazebo/Blue</material>
  </gazebo>


  <joint name="base_laser_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0.0 0 0.205"/>
    <parent link="base_link"/>
    <child link="base_laser_link"/>
  </joint>


  <link name="base_laser_link" type="laser">
    <inertial>
      <mass value="0.1"/>
      <origin xyz="0 0 0.0"/>
      <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
    </inertial>


    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.0"/>
      <geometry>
        <cylinder radius=".05" length=".05"/>
      </geometry>
    </visual>


    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.0"/>
      <geometry>
        <cylinder radius=".05" length=".05"/>
      </geometry>
    </collision>


</link>

  <gazebo reference="base_laser_link">
    <sensor:ray name="base_laser_link">
      <resRange>0.1</resRange>
      <rayCount>640</rayCount>
      <rangeCount>640</rangeCount>
      <laserCount>1</laserCount>
      <origin>0.0 0.0 0.0</origin>
      <displayRays>true</displayRays>


      <minAngle>-100</minAngle> <!-- scans own arms if -135~+135 -->
      <maxAngle>100</maxAngle>


      <minRange>0.07</minRange>
      <maxRange>10.0</maxRange>
      <updateRate>20.0</updateRate>
      <controller:gazebo_ros_laser name="gazebo_ros_base_laser_link_controller" plugin="libgazebo_ros_laser.so">
        <gaussianNoise>0.005</gaussianNoise>
        <alwaysOn>true</alwaysOn>
        <updateRate>20.0</updateRate>
        <topicName>base_scan</topicName>
        <frameName>base_laser_link</frameName>
        <interface:laser name="gazebo_ros_base_laser_link_iface"/>
      </controller:gazebo_ros_laser>
    </sensor:ray>
    <material>Gazebo/Red</material>
  </gazebo>
  <gazebo>
    <controller:differential_position2d name="controller1">
      <update>100</update>
      <leftJoint>base_link_right_wheel_joint</leftJoint>
      <rightJoint>base_link_left_wheel_joint</rightJoint>
      <wheelSeparation>${caster_wheel_offset_y*2}</wheelSeparation>
      <wheelDiameter>${wheel_radius*2}</wheelDiameter>
      <torque>5</torque>
      <interface:position name="position_iface_0"/>
    </controller:differential_position2d>


    <controller:gazebo_ros_p3d name="p3d_base_controller" plugin="libgazebo_ros_p3d.so">
      <alwaysOn>true</alwaysOn>
      <updateRate>100.0</updateRate>
      <bodyName>base_link</bodyName>
      <topicName>base_pose_ground_truth</topicName>
      <gaussianNoise>0.01</gaussianNoise>
      <frameName>map</frameName>
      <xyzOffsets>25.7 25.7 0</xyzOffsets> <!-- initialize odometry for fake localization-->
      <rpyOffsets>0 0 0</rpyOffsets>
      <interface:position name="p3d_base_position"/>
    </controller:gazebo_ros_p3d>


    <!-- this publishes empty joint_states due to no transmission, but
         triggering robot_state_puublisher to publish tf between fixed joints in erratic,
         (e.g. base_laser_link for the base_scan frame) -->
    <controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="libgazebo_ros_controller_manager.so">
      <alwaysOn>true</alwaysOn>
      <updateRate>1000.0</updateRate>
      <interface:audio name="gazebo_ros_controller_manager_dummy_iface" />
    </controller:gazebo_ros_controller_manager>
  </gazebo>


</robot>


Any clue??, I am lost here, jajaj.

Nicolas
From:
To:
Subject: RE: [ros-users] Gazebo and Laser simulation
Date: Thu, 16 Dec 2010 07:37:37 -0300








John,
I will try to attach all the info that I can, first of all the image shows you the problem with the orientation of the laser taking as a reference the map.
Here goes the code:

THIS IS MY EMPTY WORLD

<?xml version="1.0"?>

<gazebo:world
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window"
xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#param"
xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
xmlns:geo="http://willowgarage.com/xmlschema/#geo"
xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:ui="http://playerstage.sourceforge.net/gazebo/xmlschema/#ui"
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" >

<thread>4</thread>
<verbosity>5</verbosity>

  <!-- cfm is 1e-5 for single precision -->
  <!-- erp is typically .1-.8 -->
  <!-- here's the global contact cfm/erp -->
  <physics:ode>
    <stepTime>0.001</stepTime>
    <gravity>0 0 -9.8</gravity>
    <cfm>0.0000000001</cfm>
    <erp>0.2</erp>
    <quickStep>true</quickStep>
    <quickStepIters>10</quickStepIters>
    <quickStepW>1.3</quickStepW>
    <contactMaxCorrectingVel>100.0</contactMaxCorrectingVel>
    <contactSurfaceLayer>0.001</contactSurfaceLayer>
    <updateRate>1000</updateRate> <!-- Para probar simulacion y tiempo real hecho por nico-->
  </physics:ode>


  <geo:origin>
    <lat>37.4270909558</lat><lon>-122.077919338</lon>
  </geo:origin>


  <rendering:gui>
    <type>fltk</type>
    <size>480 320</size>
    <pos>0 0</pos>
    <frames>
      <row height="100%">
        <camera width="100%">
          <xyz>0.3 0 3</xyz>
          <rpy>0 90 90</rpy>
        </camera>
      </row>
    </frames>
  </rendering:gui>



  <rendering:ogre>
    <ambient>0.5 0.5 0.5 0.5</ambient>
    <sky>
      <material>Gazebo/CloudySky</material>
    </sky>
    <grid>false</grid>
    <maxUpdateRate>10.</maxUpdateRate>
    <shadowTechnique>none</shadowTechnique>
    <shadows>false</shadows>
  </rendering:ogre>


  <!-- clock -->
  <model:physical name="clock">
    <xyz>0 0 0</xyz>
    <rpy>0 0 0</rpy>
    <static>true</static>
    <body:box name="clock_body">
      <geom:box name="clock_geom">
        <mesh>default</mesh>
        <size>0 0 0</size>
        <visual>
          <size>0 0 0</size>
          <material>Gazebo/White</material>
          <mesh>unit_box</mesh>
        </visual>
      </geom:box>
    </body:box>
    <!-- offer ROS services to spawn and delete models -->
    <controller:gazebo_ros_factory name="gazebo_ros_factory" plugin="libgazebo_ros_factory.so">
      <alwaysOn>true</alwaysOn>
      <updateRate>1.0</updateRate>
    </controller:gazebo_ros_factory>
  </model:physical>


  <!-- ground plane -->
  <model:physical name="gplane">
    <xyz>0 0 0</xyz>    
    <rpy>0 0 0</rpy>
    <static>true</static>


    <body:plane name="plane">
      <geom:plane name="plane">
        <laserRetro>2000.0</laserRetro>
        <mu1>50.0</mu1>
        <mu2>50.0</mu2>
        <kp>1000000000.0</kp>
        <kd>1.0</kd>
        <normal>0 0 1</normal>
        <size>51.3 51.3</size>
        <segments>10 10</segments>
        <uvTile>100 100</uvTile>
        <material>Gazebo/GrayGrid</material>
      </geom:plane>
    </body:plane>
  </model:physical>


<!--
  <model:physical name="walls">
    <include embedded="false">
      <xi:include href="tests/willow-walls.model" />
    </include>
  </model:physical>
-->
<!--
  <model:physical name="willow_map">
   <xyz>-25.65 25.65 1.0</xyz>    
   <rpy>180 0 0</rpy>
   <static>true</static>
   <body:map name="willow_map_body">
     <geom:map name="willow_map_geom">
       <image>willowMap.png</image>
       <threshold>200</threshold>
       <granularity>1</granularity>
       <negative>false</negative>
       <scale>0.1</scale>
       <offset>0 0 0</offset>
       <material>Gazebo/Rocky</material>
     </geom:map>
   </body:map>
  </model:physical>
-->




  <!-- White Point light -->
  <model:renderable name="point_white">
    <xyz>0.0 0.0 8</xyz>
    <enableGravity>false</enableGravity>
    <light>
      <type>point</type>
      <diffuseColor>0.5 0.5 0.5</diffuseColor>
      <specularColor>.1 .1 .1</specularColor>
      <attenuation>0.2 0.1 0</attenuation>
      <range>10</range>
    </light>
  </model:renderable>


</gazebo:world>


THIS ARE THE LAUNCH FILE THAT i AM USING:

<launch>

<arg name="scenario"/>
<arg name="launch_rviz" default="false"/>
<arg name="no_window" default="false" />

  <!-- start up scenario world -->
  <include file="$(find han_Scene)/launch/world.launch">
   <arg name="scenario" value="$(arg scenario)"/>
    <arg name="no_window" value="$(arg no_window)"/>
  </include>


<!-- Static transforms -->
<include file="$(find han_Scene)/launch/static_transforms.launch"/>

<!-- Start the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find han_Scene)/scenarios/$(arg scenario)/map_config.yaml" />
<!-- =$(find wheelchair)/fete_nico_mapa.map.yaml"OJO HAY Q PONER LO Q ESTABA SOLO SIRVE PARA BAR UNICAMANTE -->


<!-- send robot description to param server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find erratic_gazebo)/robots/erratic.urdf.xacro'" />

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_erratic" pkg="gazebo_tools" type="gazebo_model" args="-z 0.051 -p robot_description spawn robot_description" respawn="false" output="screen" />

<!-- Controller Manager -->
<include file="$(find pr2_controller_manager)/controller_manager.launch" />

<!-- Fake Calibration -->
<node pkg="rostopic" type="rostopic" name="fake_joint_calibration" args="pub /calibrated std_msgs/Bool true" />

<!-- load controllers -->
<node name="diffdrive" pkg="gazebo_plugins" type="gazebo_ros_diffdrive" respawn="true" output="log"/>

<!-- Scene runner -->
<node name="run_scene" pkg="han_Scene" type="run_scene" args="$(arg scenario)" respawn="false" output="screen"/>

<!--Lase filter of type scan_to_cloud_filter_chain -->

<!-- <node pkg="laser_filters" type="scan_to_cloud_filter_chain" name="tilt_shadow_filter">

    <rosparam command="load" file="$(find han_Planner)/conf/laser_config.yaml" />
    <rosparam command="load" file="$(find han_Planner)/conf/cloud_config.yaml" />


    <param name="high_fidelity" value="true" />
    <param name="target_frame" type="string" value="base_link" />
    <remap from="base_scan" to="tilt_scan" />
    <remap from="cloud_filtered" to="tilt_scan_cloud_filtered" />
  </node> -->



  <node pkg="point_cloud_converter" type="point_cloud_converter" name="point_cloud_converter">
    <remap from="points_in" to="cloud_laser" />
    <remap from="points2_out" to="cloud2_laser" />
  </node>


<!-- RVIZ -->
<node name="rviz" pkg="rviz" type="rviz" respawn="false" output="screen" if="$(arg launch_rviz)"/>

</launch>


AND

<launch>

  <arg name="scenario"/> 
    <arg name="no_window"/>
  <!-- start gazebo with an empty plane -->
  <param name="/use_sim_time" value="true" />


<!-- if no window is set then start with -r (no window displayed) -->
<node name="gazebo" pkg="gazebo" type="gazebo" args="-r $(find han_Scene)/worlds/empty.world" respawn="false" output="screen" if="$(arg no_window)"/>

<!-- Otherwise start normally -->
<node name="gazebo" pkg="gazebo" type="gazebo" args="$(find han_Scene)/worlds/empty.world" respawn="false" output="screen" unless="$(arg no_window)"/>

<!-- walls-->
<param name="walls" textfile="$(find han_Scene)/scenarios/$(arg scenario)/walls.model" />

<node name="xml2factor_walls" pkg="gazebo" type="spawn_model" args="-gazebo -param walls -model walls" respawn="false" output="screen" />

<!-- <node name="xml2factor_walls" pkg="gazebo" type="spawn_model" args="-gazebo -param walls -x -16 -y -16 -model walls" respawn="false" output="screen" /> -->


</launch>

WHERE THE WALL MODEL IS LIKE:

<?xml version="1.0" ?>
<model:physical name="walls_model"
xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom" >

  <static>true</static>
  <body:map name="walls_body">
  <xyz>-16 -16 0 </xyz>
    <geom:map name="walls_geom">
       <image>bar_map_no_obstacles.png</image> <!-- for now this is in the gazebo model dir, change later-->
      <!--<image>bar_map_with_obstacles.png</image> --> 
      <height>2</height>
      <threshold>200</threshold>
      <granularity>1</granularity>
      <negative>false</negative>
      <scale>0.08</scale>
      <offset>0 0 0</offset>
      <material>Gazebo/White</material>
    </geom:map>
  </body:map>
</model:physical>



That all, I dont know where i can start to solve this!!!!

Thanks

Nicolas
From:
Date: Wed, 15 Dec 2010 12:05:37 -0800
Subject: Re: [ros-users] Gazebo and Laser simulation
To:

Hi Nicolas,
It would help if you can post the commands you are using to run your simulation. Also, if you're trying to attach an image that is too large (>150KB) for the mailing list, you can convert it to a compressed format such as jpg or alternatively use one of the free online gallery hosting services.


John

2010/12/15 Nicolás Alvarez Picco <>







Hi!!
I am simulating a robot with a laser in Gazebo and it works quite well, but there are times when there is a desalinate between the orientation of the robot and the map, I mean the border of the map doesn't match with the laser points. As actually I dont know to much of gazebo and I didnt find anywhere this error, now I am asking to the list. It must be a problem with the tf, but the weird thing is that I do not have always this problems, just some times, but when it appears it continue like this until I finish the program.


I would like to add an image for u to see, but each time I try to add image my msg is rejected.

Thanks in advanced

Nicolas

                      

_______________________________________________

ros-users mailing list



https://code.ros.org/mailman/listinfo/ros-users