|
From: <hsu...@us...> - 2009-06-04 20:03:30
|
Revision: 16728
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=16728&view=rev
Author: hsujohnhsu
Date: 2009-06-04 20:03:19 +0000 (Thu, 04 Jun 2009)
Log Message:
-----------
dynamic map generation example in gazebo.
Added Paths:
-----------
pkg/trunk/demos/pr2_gazebo/pr2_simple_office.launch
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/simple_office.world
Added: pkg/trunk/demos/pr2_gazebo/pr2_simple_office.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2_simple_office.launch (rev 0)
+++ pkg/trunk/demos/pr2_gazebo/pr2_simple_office.launch 2009-06-04 20:03:19 UTC (rev 16728)
@@ -0,0 +1,36 @@
+<launch>
+ <!-- send urdf to param server -->
+ <param name="robotdesc/pr2" command="$(find xacro)/xacro.py '$(find pr2_defs)/robots/prototype1.xacro.xml'" />
+
+ <!-- start gazebo -->
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/simple_office.world" respawn="false" output="screen">
+ <env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find gazebo_robot_description):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2 5 5 0 0 0 0" respawn="false" output="screen" />
+
+ <!-- startup base controller -->
+ <param name="base_controller/odom_publish_rate" value="10" />
+ <node pkg="mechanism_control" type="spawner.py" args="$(find pr2_default_controllers)/base_controller.xml" output="screen"/>
+ <node pkg="mechanism_control" type="spawner.py" args="$(find pr2_default_controllers)/gazebo_head_torso_lift_controller.xml" output="screen"/>
+
+ <!-- load map -->
+ <node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/Media/materials/textures/map_blank.png 0.1" respawn="true" />
+
+ <!-- dynamic map generation -->
+ <node pkg="slam_gmapping" type="slam_gmapping" respawn="false" />
+
+ <!-- nav-stack:
+ NOTE: not working with amcl in loop, need to fix how amcl updates dynamic map
+ NOTE: for now, rosrun teleop_base teleop_base_keyboard to drive robot around
+ -->
+ <!--include file="$(find 2dnav_gazebo)/2dnav-stack-amcl.launch"/-->
+
+ <!-- for visualization -->
+ <node pkg="rviz" type="rviz" respawn="false" />
+
+</launch>
+
Added: pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/simple_office.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/simple_office.world (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/simple_office.world 2009-06-04 20:03:19 UTC (rev 16728)
@@ -0,0 +1,216 @@
+<?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" >
+
+ <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.000000000001</cfm>
+ <erp>0.2</erp>
+ <quickStep>true</quickStep>
+ <quickStepIters>10</quickStepIters>
+ <quickStepW>1.3</quickStepW>
+ </physics:ode>
+
+ <geo:origin>
+ <lat>37.4270909558</lat><lon>-122.077919338</lon>
+ </geo:origin>
+
+ <rendering:gui>
+ <type>fltk</type>
+ <size>1024 800</size>
+ <pos>0 0</pos>
+ <frames>
+ <row height="100%">
+ <camera width="100%">
+ <xyz>0 0 20</xyz>
+ <rpy>0 90 90</rpy>
+ </camera>
+ </row>
+ </frames>
+ </rendering:gui>
+
+
+ <rendering:ogre>
+ <ambient>1.0 1.0 1.0 1.0</ambient>
+ <sky>
+ <material>Gazebo/CloudySky</material>
+ </sky>
+ <gazeboPath>media</gazeboPath>
+ <grid>false</grid>
+ <maxUpdateRate>10</maxUpdateRate>
+ </rendering:ogre>
+
+
+ <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>
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <normal>0 0 1</normal>
+ <size>51.3 51.3</size>
+ <!-- map3.png -->
+ <material>PR2/White</material>
+ </geom:plane>
+ </body:plane>
+ </model:physical>
+
+ <!-- office walls -->
+ <model:physical name="wall_1_model">
+ <xyz>5 0 1</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_1_body">
+ <geom:box name="wall_1_geom">
+ <mesh>default</mesh>
+ <size>10 .2 2</size>
+ <visual>
+ <size>10 .2 2</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <model:physical name="wall_2_model">
+ <xyz>5 15 1</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_2_body">
+ <geom:box name="wall_2_geom">
+ <mesh>default</mesh>
+ <size>10 .2 2</size>
+ <visual>
+ <size>10 .2 2</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <model:physical name="wall_3_model">
+ <xyz>0 7.5 1</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_3_body">
+ <geom:box name="wall_3_geom">
+ <mesh>default</mesh>
+ <size>.2 15 2</size>
+ <visual>
+ <size>.2 15 2</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <model:physical name="wall_4_model">
+ <xyz>10 7.5 1</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_4_body">
+ <geom:box name="wall_4_geom">
+ <mesh>default</mesh>
+ <size>.2 15 2</size>
+ <visual>
+ <size>.2 15 2</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <!-- interior walls -->
+ <model:physical name="wall_5_model">
+ <xyz>3 10 1</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_5_body">
+ <geom:box name="wall_5_geom">
+ <mesh>default</mesh>
+ <size>6 .2 2</size>
+ <visual>
+ <size>6 .2 2</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <model:physical name="wall_6_model">
+ <xyz>8.5 10 1</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_6_body">
+ <geom:box name="wall_6_geom">
+ <mesh>default</mesh>
+ <size>3 .2 2</size>
+ <visual>
+ <size>3 .2 2</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+
+
+
+
+ <model:empty name="factory_model">
+ <model_thread>false</model_thread>
+ <controller:factory name="factory_controller">
+ <alwaysOn>true</alwaysOn>
+ <updateRate>1000.0</updateRate>
+ <interface:factory name="factory_iface"/>
+ </controller:factory>
+ </model:empty>
+
+ <!-- White Directional light -->
+ <model:renderable name="directional_white">
+ <light>
+ <type>directional</type>
+ <direction>0 -0.5 -0.5</direction>
+ <diffuseColor>0.4 0.4 0.4</diffuseColor>
+ <specularColor>0.0 0.0 0.0</specularColor>
+ <attenuation>1 0.0 1.0 0.4</attenuation>
+ <range>10</range>
+ </light>
+ </model:renderable>
+ <!--
+ -->
+
+
+</gazebo:world>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|