Update of /cvsroot/playerstage/code/gazebo/libgazebo
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18792/libgazebo

Modified Files:
        gazebo.h 
Log Message:
Player simulation interface support

Index: gazebo.h
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/libgazebo/gazebo.h,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** gazebo.h    15 Dec 2006 18:56:20 -0000      1.88
--- gazebo.h    7 Jan 2007 00:26:04 -0000       1.89
***************
*** 31,35 ****
  #include <stdlib.h>
  #include <stdint.h>
! 
  
  #ifdef __cplusplus
--- 31,35 ----
  #include <stdlib.h>
  #include <stdint.h>
! #include <semaphore.h>
  
  #ifdef __cplusplus
***************
*** 312,320 ****
  
  The simulator interface provides access to certain global properties
! of the server, such as the current simulation time-step. 
  
  @{
  */
  
  /// Common simulator data
  typedef struct gz_sim_data
--- 312,366 ----
  
  The simulator interface provides access to certain global properties
! of the server, such as the current simulation time-step. Additionally 
! it provides the pose data of simulation objects (look: SimulationInterface)
  
  @{
  */
  
+ /// Maximum length for model name
+ #define GAZEBO_MODEL_NAME_MAXLEN 64
+ 
+ /// The maximum size of the request queue
+ #define GAZEBO_REQUEST_QUEUE_MAXSIZE 64
+ 
+ /// GAZEBO_SIM_REQ_GETPOSE2D request type 
+ #define GAZEBO_SIM_REQ_GETPOSE2D  1
+ /// GAZEBO_SIM_REQ_GETPOSE3D request type 
+ #define GAZEBO_SIM_REQ_GETPOSE3D  2
+ /// GAZEBO_SIM_REQ_SETPOSE2D request type 
+ #define GAZEBO_SIM_REQ_SETPOSE2D  3
+ /// GAZEBO_SIM_REQ_SETPOSE3D request type 
+ #define GAZEBO_SIM_REQ_SETPOSE3D  4
+ 
+ /// Pending request status
+ #define GAZEBO_SIM_REQ_STATUS_PENDING   1
+ /// Serviced request status
+ #define GAZEBO_SIM_REQ_STATUS_SERVICED  2
+ /// Failed request status
+ #define GAZEBO_SIM_REQ_STATUS_FAILED    3
+ 
+ /// A single request item (from the SimulationInterface)
+ typedef struct gz_sim_req_item
+ {
+   /// Request type from the simulation interface
+   int type;
+ 
+   /// Request status
+   int status;
+ 
+   /// Object name
+   char modelid[GAZEBO_MODEL_NAME_MAXLEN];
+ 
+   /// Object position
+   double pos[3];
+ 
+   /// Object euler angles
+   double rot[3];
+ 
+   /// Simulation time when the data were valid
+   double simtime;
+ 
+ } gz_sim_req_item_t;
+ 
  /// Common simulator data
  typedef struct gz_sim_data
***************
*** 322,326 ****
    /// Common data structure
    gz_data_t head;
!   
    /// Elapsed simulator time
    double sim_time;
--- 368,372 ----
    /// Common data structure
    gz_data_t head;
! 
    /// Elapsed simulator time
    double sim_time;
***************
*** 342,347 ****
    int save;
  
! } gz_sim_data_t;
  
  
  /// Simulator interface
--- 388,398 ----
    int save;
  
!   /// Model get/set property/pose request item
!   gz_sim_req_item_t request;
  
+   /// Semaphore so that the interface will wait for the request to be serviced
+   sem_t pending_request;
+ 
+ } gz_sim_data_t;
  
  /// Simulator interface


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to