Revision: 6838
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6838&view=rev
Author:   jeremy_asher
Date:     2008-07-10 15:28:34 -0700 (Thu, 10 Jul 2008)

Log Message:
-----------
Model worldfile documentation

Modified Paths:
--------------
    code/stage/trunk/libstage/model.cc
    code/stage/trunk/libstage/model_load.cc

Modified: code/stage/trunk/libstage/model.cc
===================================================================
--- code/stage/trunk/libstage/model.cc  2008-07-10 21:49:23 UTC (rev 6837)
+++ code/stage/trunk/libstage/model.cc  2008-07-10 22:28:34 UTC (rev 6838)
@@ -22,6 +22,8 @@
 
   color "red"
   color_rgba [ 0.0 0.0 0.0 1.0 ]
+  bitmap ""
+  ctrl ""
 
   # determine how the model appears in various sensors
   fiducial_return 0
@@ -35,14 +37,17 @@
   # GUI properties
   gui_nose 0
   gui_grid 0
-  gui_outline 1 ( was gui_boundary? )
-  gui_movemask 0 top level or (STG_MOVE_TRANS | STG_MOVE_ROT);
+  gui_outline 1
+  gui_movemask <0 if top level or (STG_MOVE_TRANS | STG_MOVE_ROT)>;
 
+  blocks 0
+  block[0].points 0
+  block[0].point[0] [ 0.0 0.0 ]
+  block[0].z [ 0.0 1.0 ]
+  block[0].color "<color>"
+
   boundary 0
-  blocks -1
   mass 10.0
-  bitmap ""
-  ctrl ""
   map_resolution 0.1
   say ""
   alwayson 0
@@ -50,45 +55,46 @@
 @endverbatim
 
 @par Details
-- pose [x_pos:float y_pos:float heading:float]\n
-specify the pose of the model in its parent's coordinate system
-- size [x_size:float y_size:float]
-- specify the size of the model
-- origin [x_pos:float y_pos:float heading:float]
-- specify the position of the object's center, relative to its pose
-- velocity [x_speed:float y_speed:float rotation_speed:float]
-- specify the initial velocity of the model. Not that if the model hits an 
obstacle, its velocity will be set to zero.
-- color [colorname:string]
-- specify the color of the object using a color name from the X11 database 
(rgb.txt)
-- line_count [int]
-- specify the number of lines that make up the model's body- line[index] 
[x1:float y1:float x2:float y2:float]
-- creates a line from (x1,y1) to (x2,y2). A set of line_count lines defines 
the robot's body for the purposes of collision detection and rendering in the 
GUI window.
-- bitmap [filename:string}
-- alternative way to set the model's line_count and lines. The file must be a 
bitmap recognized by libgtkpixbuf (most popular formats are supported). The 
file is opened and parsed into a set of lines. Unless the bitmap_resolution 
option is used, the lines are scaled to fit inside the rectangle defined by the 
model's current size.
-- gui_nose [bool]
-- if 1, draw a nose on the model showing its heading (positive X axis)
-- gui_grid [bool]
-- if 1, draw a scaling grid over the model
-- gui_movemask [int]
-- define how the model can be moved by the mouse in the GUI window
-- gui_boundary [bool]
-- if 1, draw a bounding box around the model, indicating its size
-- obstacle_return [bool]
-- if 1, this model can collide with other models that have this property set
-- blob_return [bool]
-- if 1, this model can be detected in the blob_finder (depending on its color)
-- ranger_return [bool]
-- if 1, this model can be detected by ranger sensors
-- laser_return [int]
-- if 0, this model is not detected by laser sensors. if 1, the model shows up 
in a laser sensor with normal (0) reflectance. If 2, it shows up with high (1) 
reflectance.
-- fiducial_return [fiducial_id:int]
-- if non-zero, this model is detected by fiducialfinder sensors. The value is 
used as the fiducial ID.
-- fiducial_key [int]
-- models are only detected by fiducialfinders if the fiducial_key values of 
model and fiducialfinder match. This allows you to have several independent 
types of fiducial in the same environment, each type only showing up in 
fiducialfinders that are "tuned" for it.
-- ranger_return [bool]
-- iff 1, this model can be detected by a ranger.
-- gripper_return [bool]
-- iff 1, this model can be gripped by a gripper and can be pushed around by 
collisions with anything that has a non-zero obstacle_return.
+ 
+- pose [ x:<float> y:<float> z:<float> heading:<float> ] \n
+  specify the pose of the model in its parent's coordinate system
+- size [ x:<float> y:<float> z:<float> ]\n
+  specify the size of the model in each dimension
+- origin [ x:<float> y:<float> z:<float> heading:<float> ]\n
+  specify the position of the object's center, relative to its pose
+- velocity [ x:<float> y:<float> z:<float> heading:<float> omega:<float> ]\n
+  Specify the initial velocity of the model. Note that if the model hits an 
obstacle, its velocity will be set to zero.
+ 
+- color <string>\n
+  specify the color of the object using a color name from the X11 database 
(rgb.txt)
+- bitmap filename:<string>\n
+  Draw the model by interpreting the lines in a bitmap (bmp, jpeg, gif, png 
supported). The file is opened and parsed into a set of lines.  The lines are 
scaled to fit inside the rectangle defined by the model's current size.
+- ctrl <string>\n
+  specify the controller module for the model
+ 
+- fiducial_return fiducial_id:<int>\n
+  if non-zero, this model is detected by fiducialfinder sensors. The value is 
used as the fiducial ID.
+- fiducial_key <int>
+  models are only detected by fiducialfinders if the fiducial_key values of 
model and fiducialfinder match. This allows you to have several independent 
types of fiducial in the same environment, each type only showing up in 
fiducialfinders that are "tuned" for it.
+- obstacle_return <int>\n
+  if 1, this model can collide with other models that have this property set 
+- ranger_return <int>\n
+  if 1, this model can be detected by ranger sensors
+- blob_return <int>\n
+  if 1, this model can be detected in the blob_finder (depending on its color)
+- laser_return <int>\n
+  if 0, this model is not detected by laser sensors. if 1, the model shows up 
in a laser sensor with normal (0) reflectance. If 2, it shows up with high (1) 
reflectance.
+- gripper_return <int>\n
+  iff 1, this model can be gripped by a gripper and can be pushed around by 
collisions with anything that has a non-zero obstacle_return.
+ 
+- gui_nose <int>\n
+  if 1, draw a nose on the model showing its heading (positive X axis)
+- gui_grid <int>\n
+  if 1, draw a scaling grid over the model
+- gui_outline <int>\n
+  if 1, draw a bounding box around the model, indicating its size
+- gui_movemask <int>\n
+  define how the model can be moved by the mouse in the GUI window
 
 */
 

Modified: code/stage/trunk/libstage/model_load.cc
===================================================================
--- code/stage/trunk/libstage/model_load.cc     2008-07-10 21:49:23 UTC (rev 
6837)
+++ code/stage/trunk/libstage/model_load.cc     2008-07-10 22:28:34 UTC (rev 
6838)
@@ -185,7 +185,7 @@
 
   if( wf->PropertyExists( wf_entity, "blocks" ) )
     {
-      int blockcount = wf->ReadInt( wf_entity, "blocks", -1 );
+      int blockcount = wf->ReadInt( wf_entity, "blocks", 0 );
 
       this->UnMap();
       this->ClearBlocks();


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to