17 #ifndef _GAZEBO_WORLD_PRIVATE_HH_
18 #define _GAZEBO_WORLD_PRIVATE_HH_
25 #include <boost/thread.hpp>
178 public: sdf::ElementPtr
sdf;
238 public: std::deque<WorldState>
states[2];
msgs::Scene sceneMsg
Outgoing scene message.
Definition: WorldPrivate.hh:140
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:72
sdf::SDFPtr factorySDF
Store a factory SDF object to improve speed at which objects are inserted via the factory...
Definition: WorldPrivate.hh:257
bool resetModelOnly
True to reset only model poses.
Definition: WorldPrivate.hh:211
common::Time prevStepWallTime
For keeping track of time step throttling.
Definition: WorldPrivate.hh:47
std::string name
Name of the world.
Definition: WorldPrivate.hh:65
transport::SubscriberPtr modelSub
Subscriber to model messages.
Definition: WorldPrivate.hh:131
std::list< std::string > deleteEntity
List of entities to delete.
Definition: WorldPrivate.hh:184
uint64_t iterations
The number of simulation iterations.
Definition: WorldPrivate.hh:272
boost::recursive_mutex * worldUpdateMutex
Used by World classs in following calls: World::Step for then entire function World::StepWorld for ch...
Definition: WorldPrivate.hh:175
std::list< Entity * > dirtyPoses
when physics engine makes an update and changes a link pose, this flag is set to trigger Entity::SetW...
Definition: WorldPrivate.hh:315
common::Time pauseStartTime
Time at which pause started.
Definition: WorldPrivate.hh:149
common::Time prevProcessMsgsTime
Last time incoming messages were processed.
Definition: WorldPrivate.hh:232
bool loaded
True if the world has been loaded.
Definition: WorldPrivate.hh:217
boost::thread * thread
thread in which the world is updated.
Definition: WorldPrivate.hh:59
std::set< ModelPtr > publishModelPoses
The list of models that need to publish their pose.
Definition: WorldPrivate.hh:260
transport::SubscriberPtr controlSub
Subscriber to world control messages.
Definition: WorldPrivate.hh:110
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
transport::SubscriberPtr lightFactorySub
Subscriber to light factory messages.
Definition: WorldPrivate.hh:125
bool initialized
True if the world has been initialized.
Definition: WorldPrivate.hh:214
transport::PublisherPtr responsePub
Publisher for request response messages.
Definition: WorldPrivate.hh:92
PresetManagerPtr presetManager
Class to manage preset simulation parameter profiles.
Definition: WorldPrivate.hh:318
Forward declarations for transport.
Model_V models
A cached list of models. This is here for performance.
Definition: WorldPrivate.hh:303
boost::thread * logThread
Worker thread for logging.
Definition: WorldPrivate.hh:300
std::list< msgs::Light > lightFactoryMsgs
Light factory message buffer.
Definition: WorldPrivate.hh:196
uint64_t stopIterations
The number of simulation iterations to take before stopping.
Definition: WorldPrivate.hh:275
std::mutex loadLightMutex
Mutex to protext loading of lights.
Definition: WorldPrivate.hh:161
transport::NodePtr node
Transportation node.
Definition: WorldPrivate.hh:86
std::set< ModelPtr > publishModelScales
The list of models that need to publish their scale.
Definition: WorldPrivate.hh:263
transport::PublisherPtr guiPub
Publisher for gui messages.
Definition: WorldPrivate.hh:98
std::vector< WorldPluginPtr > plugins
All the plugins.
Definition: WorldPrivate.hh:181
event::Connection_V connections
All the event connections.
Definition: WorldPrivate.hh:83
std::shared_ptr< UserCmdManager > UserCmdManagerPtr
Definition: PhysicsTypes.hh:128
transport::SubscriberPtr requestSub
Subscriber to request messages.
Definition: WorldPrivate.hh:134
Information for use in an update event.
Definition: UpdateInfo.hh:30
boost::mutex factoryDeleteMutex
This mutex is used to by the ::RemoveModel and ::ProcessFactoryMsgs functions.
Definition: WorldPrivate.hh:310
int stepInc
Number of steps in increment by.
Definition: WorldPrivate.hh:80
default namespace for gazebo
common::Time prevStatTime
Last time a world statistics message was sent.
Definition: WorldPrivate.hh:146
std::vector< LightPtr > Light_V
Definition: PhysicsTypes.hh:212
boost::mutex entityDeleteMutex
Mutex to protect the deleteEntity list.
Definition: WorldPrivate.hh:297
boost::mutex * loadModelMutex
Mutex to protext loading of models.
Definition: WorldPrivate.hh:158
transport::PublisherPtr poseLocalPub
Publisher for local pose messages.
Definition: WorldPrivate.hh:107
Light_V lights
A cached list of lights.
Definition: WorldPrivate.hh:306
Private data class for World.
Definition: WorldPrivate.hh:44
bool enablePhysicsEngine
True to enable the physics engine.
Definition: WorldPrivate.hh:220
std::list< msgs::Factory > factoryMsgs
Factory message buffer.
Definition: WorldPrivate.hh:190
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:116
sdf::ElementPtr sdf
THe world's SDF values.
Definition: WorldPrivate.hh:178
transport::SubscriberPtr jointSub
Subscriber to joint messages.
Definition: WorldPrivate.hh:119
msgs::WorldStatistics worldStatsMsg
Outgoing world statistics message.
Definition: WorldPrivate.hh:137
PhysicsEnginePtr physicsEngine
Pointer the physics engine.
Definition: WorldPrivate.hh:50
std::atomic_bool sensorsInitialized
True if sensors have been initialized.
Definition: WorldPrivate.hh:325
void(World::* modelUpdateFunc)()
Function pointer to the model update function.
Definition: WorldPrivate.hh:143
The world provides access to all other object within a simulated environment.
Definition: World.hh:68
UserCmdManagerPtr userCmdManager
Class to manage user commands.
Definition: WorldPrivate.hh:321
BasePtr rootElement
The root of all entities in the world.
Definition: WorldPrivate.hh:56
common::Time realTimeOffset
Used to compute a more accurate real time value.
Definition: WorldPrivate.hh:152
transport::SubscriberPtr lightModifySub
Subscriber to light modify messages.
Definition: WorldPrivate.hh:128
transport::PublisherPtr modelPub
Publisher for model messages.
Definition: WorldPrivate.hh:95
transport::PublisherPtr lightPub
Publisher for light messages.
Definition: WorldPrivate.hh:101
bool resetAll
True to reset everything.
Definition: WorldPrivate.hh:205
common::Time pauseTime
Amount of time simulation has been paused.
Definition: WorldPrivate.hh:71
boost::mutex * setWorldPoseMutex
: Add an accessor for this, and make it private Used in Entity.cc.
Definition: WorldPrivate.hh:167
common::SphericalCoordinatesPtr sphericalCoordinates
Pointer the spherical coordinates data.
Definition: WorldPrivate.hh:53
common::Time sleepOffset
sleep timing error offset due to clock wake up latency
Definition: WorldPrivate.hh:229
WorldState prevStates[2]
Buffer of prev states.
Definition: WorldPrivate.hh:244
boost::recursive_mutex * receiveMutex
Mutex to protect incoming message buffers.
Definition: WorldPrivate.hh:155
boost::condition_variable logContinueCondition
Condition used to guarantee the log worker thread doesn't skip an interation.
Definition: WorldPrivate.hh:282
std::vector< ConnectionPtr > Connection_V
Definition: CommonTypes.hh:157
int stateToggle
Int used to toggle between prevStates.
Definition: WorldPrivate.hh:247
WorldState logPlayState
Current state when playing from a log file.
Definition: WorldPrivate.hh:253
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
bool needsReset
True to reset the world on next update.
Definition: WorldPrivate.hh:202
bool pluginsLoaded
True if the plugins have been loaded.
Definition: WorldPrivate.hh:226
boost::condition_variable logCondition
Condition used for log worker.
Definition: WorldPrivate.hh:278
bool stop
True to stop the world from running.
Definition: WorldPrivate.hh:62
transport::SubscriberPtr playbackControlSub
Subscriber to log playback control messages.
Definition: WorldPrivate.hh:113
transport::PublisherPtr posePub
Publisher for pose messages.
Definition: WorldPrivate.hh:104
boost::mutex logBufferMutex
Mutex to protect the log state buffers.
Definition: WorldPrivate.hh:294
common::Time processMsgsPeriod
Period over which messages should be processed.
Definition: WorldPrivate.hh:235
std::deque< WorldState > states[2]
Alternating buffer of states.
Definition: WorldPrivate.hh:238
std::set< LightPtr > publishLightPoses
The list of lights that need to publish their pose.
Definition: WorldPrivate.hh:266
transport::PublisherPtr statPub
Publisher for world statistics messages.
Definition: WorldPrivate.hh:89
std::vector< ModelPtr > Model_V
Definition: PhysicsTypes.hh:196
common::UpdateInfo updateInfo
Info passed through the WorldUpdateBegin event.
Definition: WorldPrivate.hh:269
common::Time startTime
Clock time when simulation was started.
Definition: WorldPrivate.hh:74
transport::SubscriberPtr factorySub
Subscriber to factory messages.
Definition: WorldPrivate.hh:116
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Store state information of a physics::World object.
Definition: WorldState.hh:47
std::list< msgs::Request > requestMsgs
Request message buffer.
Definition: WorldPrivate.hh:187
std::list< msgs::Model > modelMsgs
Model message buffer.
Definition: WorldPrivate.hh:193
boost::shared_ptr< SphericalCoordinates > SphericalCoordinatesPtr
Definition: CommonTypes.hh:140
uint64_t logPrevIteration
Last iteration recorded by the log worker thread.
Definition: WorldPrivate.hh:285
transport::SubscriberPtr lightSub
Subscriber to light messages.
Definition: WorldPrivate.hh:122
RayShapePtr testRay
Ray used to test for collisions when placing entities.
Definition: WorldPrivate.hh:223
bool resetTimeOnly
True to reset only the time.
Definition: WorldPrivate.hh:208
int currentStateBuffer
Keep track of current state buffer being updated.
Definition: WorldPrivate.hh:241
sdf::ElementPtr logPlayStateSDF
State from from log file.
Definition: WorldPrivate.hh:250
common::Time logRealTime
Real time value set from a log file.
Definition: WorldPrivate.hh:288
common::Time simTime
Current simulation time.
Definition: WorldPrivate.hh:68
bool pause
True if simulation is paused.
Definition: WorldPrivate.hh:77
boost::mutex logMutex
Mutex to protect the log worker thread.
Definition: WorldPrivate.hh:291
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44
std::list< msgs::Light > lightModifyMsgs
Light modify message buffer.
Definition: WorldPrivate.hh:199
boost::shared_ptr< RayShape > RayShapePtr
Definition: PhysicsTypes.hh:136
boost::shared_ptr< PresetManager > PresetManagerPtr
Definition: PhysicsTypes.hh:120