Physics

Physics and dynamics functionality. More...

Modules

 Bullet Physics
 Bullet physics engine wrapper.
 
 Dart Physics
 dart physics engine wrapper
 
 ODE Physics
 Open Dynamics Engine physics wrapper.
 
 Simbody Physics
 simbody physics engine wrapper
 

Files

file  BulletTypes.hh
 Bullet wrapper forward declarations and typedefs.
 
file  DARTTypes.hh
 DART wrapper forward declarations and typedefs.
 
file  PhysicsTypes.hh
 default namespace for gazebo
 
file  SimbodyTypes.hh
 Simbody wrapper forward declarations and typedefs.
 

Namespaces

 gazebo::physics
 namespace for physics
 

Classes

class  Actor
 Actor class enables GPU based mesh model / skeleton scriptable animation. More...
 
class  AdiabaticAtmosphere
 Adiabatic atmosphere model based on the troposphere model in the Manual of the ICAO Standard Atmosphere. More...
 
class  Atmosphere
 This models a base atmosphere class to serve as a common interface to any derived atmosphere models. More...
 
class  AtmosphereFactory
 The atmosphere factory instantiates different atmosphere models. More...
 
class  BallJoint< T >
 Base class for a ball joint. More...
 
class  Base
 Base class for most physics classes. More...
 
class  BoxShape
 Box geometry primitive. More...
 
class  Collision
 Base class for all collision entities. More...
 
class  CollisionState
 Store state information of a physics::Collision object. More...
 
class  Contact
 A contact between two collisions. More...
 
class  ContactManager
 Aggregates all the contact information generated by the collision detection engine. More...
 
class  CylinderShape
 Cylinder collision. More...
 
class  Entity
 Base class for all physics objects in Gazebo. More...
 
class  FixedJoint< T >
 A fixed joint rigidly connecting two bodies. More...
 
class  FrictionPyramid
 Parameters used for friction pyramid model. More...
 
class  GearboxJoint< T >
 A double axis gearbox joint. More...
 
class  Gripper
 A gripper abstraction. More...
 
class  HeightmapShape
 HeightmapShape collision shape builds a heightmap from an image. More...
 
class  Hinge2Joint< T >
 A two axis hinge joint. More...
 
class  HingeJoint< T >
 A single axis hinge joint. More...
 
class  Inertial
 A class for inertial information about a link. More...
 
class  Joint
 Base class for all joints. More...
 
class  JointController
 A class for manipulating physics::Joint. More...
 
class  JointState
 keeps track of state of a physics::Joint More...
 
class  JointWrench
 Wrench information from a joint. More...
 
class  Light
 A light entity. More...
 
class  LightState
 Store state information of a Light object. More...
 
class  Link
 Link class defines a rigid body entity, containing information on inertia, visual and collision properties of a rigid body. More...
 
class  LinkState
 Store state information of a physics::Link object. More...
 
class  Logplay
 Open and playback log files that were recorded using LogRecord. More...
 
class  LogPlay
 
class  MapShape
 Creates box extrusions based on an image. More...
 
class  MeshShape
 Triangle mesh collision shape. More...
 
class  Model
 A model is a collection of links, joints, and plugins. More...
 
class  ModelState
 Store state information of a physics::Model object. More...
 
class  MultiRayShape
 Laser collision contains a set of ray-collisions, structured to simulate a laser range scanner. More...
 
class  PhysicsEngine
 Base class for a physics engine. More...
 
class  PhysicsFactory
 The physics factory instantiates different physics engines. More...
 
class  PlaneShape
 Collision for an infinite plane. More...
 
class  PolylineShape
 Polyline geometry primitive. More...
 
class  Population
 Class that automatically populates an environment with multiple objects based on several parameters to define the number of objects, shape of the object distribution or type of distribution. More...
 
class  PopulationParams
 Stores all the posible parameters that define a population. More...
 
class  QuadNode
 
class  RayShape
 Base class for Ray collision geometry. More...
 
class  Road
 for building a Road from SDF More...
 
class  ScrewJoint< T >
 A screw joint, which has both prismatic and rotational DOFs. More...
 
class  Shape
 Base class for all shapes. More...
 
class  SliderJoint< T >
 A slider joint. More...
 
class  SphereShape
 Sphere collision shape. More...
 
class  State
 State of an entity. More...
 
class  SurfaceParams
 SurfaceParams defines various Surface contact parameters. More...
 
class  UniversalJoint< T >
 A universal joint. More...
 
class  Wind
 Base class for wind. More...
 
class  World
 The world provides access to all other object within a simulated environment. More...
 
class  WorldState
 Store state information of a physics::World object. More...
 

Macros

#define GZ_REGISTER_ATMOSPHERE_MODEL(_name, _classname)
 Static atmosphere registration macro. More...
 
#define GZ_REGISTER_PHYSICS_ENGINE(name, classname)
 Static physics registration macro. More...
 

Typedefs

typedef std::unique_ptr< Atmosphere >(* AtmosphereFactoryFn) (World &world)
 
typedef PhysicsEnginePtr(* PhysicsFactoryFn) (WorldPtr world)
 

Functions

WorldPtr create_world (const std::string &_name="")
 Create a world given a name. More...
 
bool fini ()
 Finalize transport by calling gazebo::transport::fini. More...
 
WorldPtr get_world (const std::string &_name="")
 Returns a pointer to a world by name. More...
 
uint32_t getUniqueId ()
 Get a unique ID. More...
 
bool has_world (const std::string &_name="")
 checks if the world with this name exists. More...
 
void init_world (WorldPtr _world) GAZEBO_DEPRECATED(11.0)
 Init world given a pointer to it. More...
 
void init_world (WorldPtr _world, UpdateScenePosesFunc _func)
 Init world given a pointer to it. More...
 
void init_worlds () GAZEBO_DEPRECATED(11.0)
 initialize multiple worlds stored in static variable gazebo::g_worlds More...
 
void init_worlds (UpdateScenePosesFunc _func)
 initialize multiple worlds stored in static variable gazebo::g_worlds More...
 
bool load ()
 Setup gazebo::SystemPlugin's and call gazebo::transport::init. More...
 
void load_world (WorldPtr _world, sdf::ElementPtr _sdf)
 Load world from sdf::Element pointer. More...
 
void load_worlds (sdf::ElementPtr _sdf)
 load multiple worlds from single sdf::Element pointer More...
 
void pause_world (WorldPtr _world, bool _pause)
 Pause world by calling World::SetPaused. More...
 
void pause_worlds (bool pause)
 pause multiple worlds stored in static variable gazebo::g_worlds More...
 
void remove_worlds ()
 remove multiple worlds stored in static variable gazebo::g_worlds More...
 
void run_world (WorldPtr _world, unsigned int _iterations=0)
 Run world by calling World::Run() given a pointer to it. More...
 
void run_worlds (unsigned int _iterations=0)
 Run multiple worlds stored in static variable gazebo::g_worlds. More...
 
void stop_world (WorldPtr _world)
 Stop world by calling World::Stop() given a pointer to it. More...
 
void stop_worlds ()
 stop multiple worlds stored in static variable gazebo::g_worlds More...
 
bool worlds_running ()
 Return true if any world is running. More...
 

Variables

static std::string EntityTypename []
 String names for the different entity types. More...
 

Detailed Description

Physics and dynamics functionality.

Macro Definition Documentation

◆ GZ_REGISTER_ATMOSPHERE_MODEL

#define GZ_REGISTER_ATMOSPHERE_MODEL (   _name,
  _classname 
)
Value:
std::unique_ptr<Atmosphere> \
New##_classname(World &_world) \
{ \
return std::unique_ptr<Atmosphere>( \
new gazebo::physics::_classname(_world)); \
} \
\
void Register##_classname() \
{\
AtmosphereFactory::RegisterAtmosphere(_name, New##_classname);\
}

Static atmosphere registration macro.

Use this macro to register atmosphere model with the server.

Parameters
[in]_nameAtmosphere type name, as it appears in the world file.
[in]_classnameC++ class name for the atmosphere model.

◆ GZ_REGISTER_PHYSICS_ENGINE

#define GZ_REGISTER_PHYSICS_ENGINE (   name,
  classname 
)
Value:
PhysicsEnginePtr New##classname(WorldPtr _world) \
{ \
return PhysicsEnginePtr(new gazebo::physics::classname(_world)); \
} \
void Register##classname() \
{\
PhysicsFactory::RegisterPhysicsEngine(name, New##classname);\
}
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:90
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:126

Static physics registration macro.

Use this macro to register physics engine with the server.

Parameters
[in]namePhysics type name, as it appears in the world file.
[in]classnameC++ class name for the physics engine.

Typedef Documentation

◆ AtmosphereFactoryFn

typedef std::unique_ptr<Atmosphere>(* AtmosphereFactoryFn) (World &world)

◆ PhysicsFactoryFn

typedef PhysicsEnginePtr(* PhysicsFactoryFn) (WorldPtr world)

Function Documentation

◆ create_world()

WorldPtr gazebo::physics::create_world ( const std::string &  _name = "")

Create a world given a name.

Parameters
[in]_nameName of the world to create.
Returns
Pointer to the new world.

◆ fini()

bool gazebo::physics::fini ( )

Finalize transport by calling gazebo::transport::fini.

◆ get_world()

WorldPtr gazebo::physics::get_world ( const std::string &  _name = "")

Returns a pointer to a world by name.

Parameters
[in]_nameName of the world to get.
Returns
Pointer to the world.

◆ getUniqueId()

uint32_t gazebo::physics::getUniqueId ( )

Get a unique ID.

Returns
A unique integer

◆ has_world()

bool gazebo::physics::has_world ( const std::string &  _name = "")

checks if the world with this name exists.

Can be used to check if get_world(const std::string&) will succeed or throw an exception.

Parameters
[in]_nameName of the world to check for, or empty to check if any world has been loaded.
Returns
true if the world exists.

◆ init_world() [1/2]

void gazebo::physics::init_world ( WorldPtr  _world)

Init world given a pointer to it.

Parameters
[in]_worldWorld to initialize.
Deprecated:
See init_world(WorldPtr, UpdateScenePosesFunc)

◆ init_world() [2/2]

void gazebo::physics::init_world ( WorldPtr  _world,
UpdateScenePosesFunc  _func 
)

Init world given a pointer to it.

Parameters
[in]_worldWorld to initialize.
[in]_funcfunction to be called when Poses are available.

◆ init_worlds() [1/2]

void gazebo::physics::init_worlds ( )

initialize multiple worlds stored in static variable gazebo::g_worlds

Deprecated:
See init_worlds(UpdateScenePosesFunc)

◆ init_worlds() [2/2]

void gazebo::physics::init_worlds ( UpdateScenePosesFunc  _func)

initialize multiple worlds stored in static variable gazebo::g_worlds

Parameters
[in]_funcfunction to be called when Poses are available.

◆ load()

bool gazebo::physics::load ( )

◆ load_world()

void gazebo::physics::load_world ( WorldPtr  _world,
sdf::ElementPtr  _sdf 
)

Load world from sdf::Element pointer.

Parameters
[in]_worldPointer to a world.
[in]_sdfSDF values to load from.

◆ load_worlds()

void gazebo::physics::load_worlds ( sdf::ElementPtr  _sdf)

load multiple worlds from single sdf::Element pointer

Parameters
[in]_sdfSDF values used to create worlds.

◆ pause_world()

void gazebo::physics::pause_world ( WorldPtr  _world,
bool  _pause 
)

Pause world by calling World::SetPaused.

Parameters
[in]_worldWorld to pause or unpause.
[in]_pauseTrue to pause, False to unpause.

◆ pause_worlds()

void gazebo::physics::pause_worlds ( bool  pause)

pause multiple worlds stored in static variable gazebo::g_worlds

Parameters
[in]_pauseTrue to pause, False to unpause.

◆ remove_worlds()

void gazebo::physics::remove_worlds ( )

remove multiple worlds stored in static variable gazebo::g_worlds

◆ run_world()

void gazebo::physics::run_world ( WorldPtr  _world,
unsigned int  _iterations = 0 
)

Run world by calling World::Run() given a pointer to it.

Parameters
[in]_worldWorld to run.
[in]_iterationsNumber of iterations for each world to take. Zero indicates that each world should continue forever.

◆ run_worlds()

void gazebo::physics::run_worlds ( unsigned int  _iterations = 0)

Run multiple worlds stored in static variable gazebo::g_worlds.

Parameters
[in]_iterationsNumber of iterations for each world to take. Zero indicates that each world should continue forever.

◆ stop_world()

void gazebo::physics::stop_world ( WorldPtr  _world)

Stop world by calling World::Stop() given a pointer to it.

Parameters
[in]_worldWorld to stop.

◆ stop_worlds()

void gazebo::physics::stop_worlds ( )

stop multiple worlds stored in static variable gazebo::g_worlds

◆ worlds_running()

bool gazebo::physics::worlds_running ( )

Return true if any world is running.

Returns
True if any world is running.

Variable Documentation

◆ EntityTypename

std::string EntityTypename[]
static
Initial value:
= {
"common",
"entity",
"model",
"actor",
"link",
"collision",
"light",
"visual",
"joint",
"ball",
"hinge2",
"hinge",
"slider",
"universal",
"shape",
"box",
"cylinder",
"heightmap",
"map",
"multiray",
"ray",
"plane",
"sphere",
"trimesh",
"polyline"
}

String names for the different entity types.