Gazebo

libgazebo


Detailed Description

A shared memory interface to Gazebo.


Modules

 Interfaces

Classes

class  Vec3
class  Pose
class  Color
class  Server
class  Client
class  Iface
#define GZ_SEM_KEY   0x135135FA
#define GZ_CLIENT_ID_USER_FIRST   0x00
#define GZ_CLIENT_ID_USER_LAST   0x07
#define GZ_CLIENT_ID_WXGAZEBO   0x08
#define GZ_CLIENT_ID_PLAYER   0x09
#define GAZEBO_MAX_MODEL_TYPE   128

Defines

#define LIBGAZEBO_VERSION   0x070
 Interface version number.

Functions

virtual ~Server ()
void Init (int serverId, int force)
void Fini ()
void Post ()
virtual ~Client ()
void Query (int server_id)
void Connect (int server_id)
void ConnectWait (int server_id, int client_id)
void Disconnect ()
void Wait ()
virtual ~Iface ()
virtual void Create (Server *server, std::string id)
void Create (Server *server, std::string id, const std::string &modelType, int modelId, int parentModelId)
void Destroy ()
virtual void Open (Client *client, std::string id)
virtual void Close ()
int Lock (int blocking)
int Unlock ()
void Post ()
std::string GetType () const
virtual ~SimulationIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual ~CameraIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual ~PositionIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual void Close ()
virtual ~Graphics3dIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual ~LaserIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual void Close ()
virtual ~FiducialIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual ~FactoryIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual ~GripperIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)
virtual ~ActarrayIface ()
virtual void Create (Server *server, std::string id)
virtual void Open (Client *client, std::string id)

Variables

double y
 Y value.
double z
 Z value.
double roll
 Rotation information. Roll Euler angle.
double pitch
 Rotation information. Pitch Euler angle.
double yaw
 Rotation information. Yaw Euler angle.
float g
 Green color information.
float b
 Blue color information.
float a
 Alpha color information.
int serverId
 The server id.
std::string filename
 The directory containing mmap files.
int semKey
 The semphore key.
int semId
 The semphore id.
int serverId
 The server id.
int clientId
 The client id.
std::string filename
 The directory containing mmap files.
int semKey
 The semphore key.
int semId
 The semphore id.
Server * server
 The server we are associated with.
Client * client
 The client we are associated with.
int mmapFd
 File descriptor for the mmap file.
void * mMap
 Pointer to the mmap'ed mem.
std::string filename
 The name of the file we created/opened.
int version
 Interface version number.
size_t size
 Allocation size.
std::string modelType
 Type of model that owns this interface.
int modelId
 ID of the model that owns this interface.
int parentModelId
 ID of the parent model.
std::string type
 type of interface
bool opened
 True if opened.
double pauseTime
 Accumpated pause time (this interface may be updated with the server is paused).
double realTime
 Elapsed real time since start of simulation (from system clock).
int pause
 Pause simulation (set by client).
int reset
 Reset simulation (set by client).
int save
 Save current poses to world file (set by client).
uint8_t model_name [512]
 Name of the model to get/set data.
uint8_t model_req [32]
 Type of request
  • "get_pose" Sets model_pose to the pose of model_name
  • "set_pose3d" Set the model_name to model_pose
  • "set_pose2d" Set the model_name to model_pose.

Pose model_pose
 Pose of the model.
SimulationData * data
 Pointer to the simulation data.
unsigned int width
 Width of image in pixels.
unsigned int height
 Height of image in pixels.
unsigned int image_size
 Size of the image in bytes.
unsigned char image [640 *480 *3]
 Image pixel data.
CameraData * data
 Pointer to the camera data.
Pose pose
 Pose (usually global cs).
Pose velocity
 Velocity.
int stall
 Motor stall flag.
int cmdEnableMotors
 Enable the motors.
Pose cmdVelocity
 Commanded robot velocities (robot cs).
bool opened
 True if opened.
PositionData * data
 Pointer to the position data.
DrawMode drawmode
 Drawing mode.
unsigned int point_count
 Number of vertices.
Vec3 points [1024]
 Vertices.
Color color
 Drawing color.
Graphics3dData * data
 Pointer to the graphics3d data.
double time
 Data timestamp.
double min_angle
 Range scan min angle.
double max_angle
 Range scan max angle.
double res_angle
 Angular resolution.
double max_range
 Max range value.
int range_count
 Number of range readings.
double ranges [1024]
 Range readings.
int intensity [1024]
 Intensity readings.
int cmd_new_angle
 New command ( 0 or 1 ).
int cmd_new_length
 New command ( 0 or 1 ).
double cmd_max_range
 Commanded range value.
double cmd_min_angle
 Commaned min angle.
double cmd_max_angle
 Commaned max angle.
int cmd_range_count
 Commaned range count.
LaserData * data
 Pointer to the laser data.
Pose pose
 Fiducial pose.
int count
 Number of fiducials.
FiducialFid fids [401]
 Observed fiducials.
FiducialData * data
 Pointer to the fiducial data.
uint8_t newModel [4096]
 String describing the model to be initiated.
uint8_t deleteModel [512]
 Delete a model by name.
FactoryData * data
 Pointer to the factory data.
int cmd
int state
 Current state of the gripper.
int grip_limit_reach
 Gripped limit reached flag.
int lift_limit_reach
 Lift limit reached flag.
int outer_beam_obstruct
 Outer beam obstruct flag.
int inner_beam_obstruct
 Inner beam obstructed flag.
int left_paddle_open
 Left paddle open flag.
int right_paddle_open
 Right paddle open flag.
int lift_up
 Lift up flag.
int lift_down
 Lift down flag.
GripperData * data
 Pointer to the factory data.
uint8_t type
 The type of the actuator - linear or rotary.
float min
 Min range of motion (m or rad depending on the type).
float center
 Center position (m or rad).
float max
 Max range of motion (m or rad depending on the type).
float home
 Home position (m or rad depending on the type).
float config_speed
 The configured speed - different from current speed.
float max_speed
 The maximum achievable speed of the actuator.
uint8_t hasbrakes
 If the actuator has brakes or not.
float speed
 The speed of the actuator in m/s or rad/s depending on the type.
uint8_t state
 The current state of the actuator.
double time
 timestamp
ActarrayActuator actuators [16]
 The actuator data.
ActarrayActuatorGeom actuator_geoms [16]
 The actuators geoms.
float cmd_pos [16]
 position commands
float cmd_speed [16]
 speed commands
int bad_cmd
 bad command flag - (speed to high set for the actuators or position not reachable)
unsigned int joint_mode [16]
 position / speed comand
ActarrayData * data
 Pointer to the act array data.


Define Documentation

#define GAZEBO_MAX_MODEL_TYPE   128

Base class for all interfaces

For internal use only.

Max length of model type string

#define GZ_CLIENT_ID_PLAYER   0x09

Shared memory clientThe client object is used by Gazebo clients to establish a connection with a running server. Semaphore key used by Gazebo

#define GZ_CLIENT_ID_USER_FIRST   0x00

Reserved client IDs.

User programs may use numbers in the range GZ_SEM_NUM_USER to GZ_SEM_NUM_USER_LAST, inclusive. All other semaphore numbers are reserved.

#define GZ_CLIENT_ID_USER_LAST   0x07

Shared memory clientThe client object is used by Gazebo clients to establish a connection with a running server. Semaphore key used by Gazebo

#define GZ_CLIENT_ID_WXGAZEBO   0x08

Shared memory clientThe client object is used by Gazebo clients to establish a connection with a running server. Semaphore key used by Gazebo

#define GZ_SEM_KEY   0x135135FA

Shared memory clientThe client object is used by Gazebo clients to establish a connection with a running server. Semaphore key used by Gazebo


Function Documentation

virtual void Close (  )  [inline, virtual, inherited]

Close the interface

Reimplemented from Iface.

virtual void Close (  )  [inline, virtual, inherited]

Close the interface

Reimplemented from Iface.

virtual void Close (  )  [virtual, inherited]

Close the interface

Reimplemented in PositionIface, and LaserIface.

void Connect ( int  server_id  )  [inherited]

Connect to the server (non-blocking mode).

Parameters:
server_id Id of the server

void ConnectWait ( int  server_id,
int  client_id 
) [inherited]

Connect to the server (blocking mode).

Parameters:
server_id Server ID; each server must have a unique id.
client_id Client ID; in blocking mode, each client must have a unique id.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the interface

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the server

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the server

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the server

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the interface

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the interface

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the interface

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the interface

Reimplemented from Iface.

virtual void Create ( Server server,
std::string  id 
) [inline, virtual, inherited]

Create a simulation interface server Pointer to the server id String id

Reimplemented from Iface.

void Create ( Server server,
std::string  id,
const std::string &  modelType,
int  modelId,
int  parentModelId 
) [inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the server
modelType Type of the model
modelId Id of the model
parentModelId Id of the model's parent

virtual void Create ( Server server,
std::string  id 
) [virtual, inherited]

Create the interface (used by Gazebo server)

Parameters:
server Pointer to the server
id Id of the interface

Reimplemented in SimulationIface, CameraIface, PositionIface, Graphics3dIface, LaserIface, FiducialIface, FactoryIface, GripperIface, and ActarrayIface.

void Destroy (  )  [inherited]

Destroy the interface (server)

void Disconnect (  )  [inherited]

Disconnect from the server

void Fini (  )  [inherited]

Finalize the server

std::string GetType (  )  const [inherited]

Get the iface type

Returns:
The type of interface

void Init ( int  serverId,
int  force 
) [inherited]

Initialize the server

int Lock ( int  blocking  )  [inherited]

Lock the interface.

Parameters:
blocking 1=caller should block, 0=no-block
Returns:
0 if the lock is acquired

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open an existing interface

Parameters:
client Pointer to the client
id Id of the interface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open the iface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open the iface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open the iface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open an existing interface

Parameters:
client Pointer to the client
id Id of the interface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open an existing interface

Parameters:
client Pointer to the client
id Id of the interface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open an existing interface

Parameters:
client Pointer to the client
id Id of the interface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open an existing interface

Parameters:
client Pointer to the client
id Id of the interface

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [inline, virtual, inherited]

Open a simulation interface

Parameters:
client Pointer to the client
id String name of the client

Reimplemented from Iface.

virtual void Open ( Client client,
std::string  id 
) [virtual, inherited]

Open an existing interface

Parameters:
client Pointer to the client
id Id of the interface

Reimplemented in SimulationIface, CameraIface, PositionIface, Graphics3dIface, LaserIface, FiducialIface, FactoryIface, GripperIface, and ActarrayIface.

void Post (  )  [inherited]

Tell clients that new data is available

void Post (  )  [inherited]

Tell clients that new data is available

void Query ( int  server_id  )  [inherited]

Test for the presence of the server.

Parameters:
server_id Id of the server

int Unlock (  )  [inherited]

Unlock the interface

void Wait (  )  [inherited]

Wait for new data to be posted (blocking mode).

Returns:
Returns 0 on success, -1 on error.

virtual ~ActarrayIface (  )  [inline, virtual, inherited]

Destroy and Interface

virtual ~CameraIface (  )  [inline, virtual, inherited]

Destructor

virtual ~Client (  )  [virtual, inherited]

Destroy a client

virtual ~FactoryIface (  )  [inline, virtual, inherited]

Destructor

virtual ~FiducialIface (  )  [inline, virtual, inherited]

Destructor

virtual ~Graphics3dIface (  )  [inline, virtual, inherited]

Destructor

virtual ~GripperIface (  )  [inline, virtual, inherited]

Destructor

virtual ~Iface (  )  [virtual, inherited]

Destroy an interface

virtual ~LaserIface (  )  [inline, virtual, inherited]

Destructor

virtual ~PositionIface (  )  [inline, virtual, inherited]

Destructor

virtual ~Server (  )  [virtual, inherited]

Destructor

virtual ~SimulationIface (  )  [inline, virtual, inherited]

Destroy an interface


Variable Documentation

int cmd [inherited]

Current command for the gripper

Pose model_pose [inherited]

Pose of the model.

See also:
model_req


Last updated Aug 04 2007