Go to the documentation of this file.
17 #ifndef GAZEBO_PHYSICS_COLLISION_HH_
18 #define GAZEBO_PHYSICS_COLLISION_HH_
48 public:
virtual void Fini()
override;
52 public:
virtual void Load(sdf::ElementPtr _sdf)
override;
55 public:
virtual void Init()
override;
101 public:
virtual ignition::math::AxisAlignedBox
BoundingBox()
const
119 public:
void SetScale(
const ignition::math::Vector3d &_scale);
183 {
return this->surface;}
201 public:
virtual const ignition::math::Pose3d &
WorldPose()
const
210 private: msgs::Visual CreateCollisionVisual();
225 private:
float laserRetro = 0.0;
231 private:
unsigned int maxContacts;
234 private: uint32_t collisionVisualId;
237 private:
mutable bool worldPoseDirty;
240 private:
const sdf::Collision *collisionSDFDom =
nullptr;
virtual unsigned int GetMaxContacts()
returns number of contacts allowed for this collision.
void SetCollision(bool _placeable)
Set the encapsulated collision object.
LinkPtr GetLink() const
Get the link this collision belongs to.
void SetShape(ShapePtr _shape)
Set the shape for this collision.
ShapePtr GetShape() const
Get the collision shape.
Base class for all collision entities.
Definition: Collision.hh:39
Forward declarations for the common classes.
Definition: Animation.hh:27
virtual void Init() override
Initialize the collision.
CollisionState GetState()
Get the collision state.
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:94
SurfaceParamsPtr surface
The surface parameters.
Definition: Collision.hh:222
bool placeable
Flag for placeable.
Definition: Collision.hh:216
virtual std::optional< sdf::SemanticPose > SDFSemanticPose() const override
Get the SDF SemanticPose object associated with the pose of this object.
SurfaceParamsPtr GetSurface() const
Get the surface parameters.
Definition: Collision.hh:182
Collision(LinkPtr _link)
Constructor.
LinkPtr link
The link this collision belongs to.
Definition: Collision.hh:213
virtual void SetMaxContacts(unsigned int _maxContacts)
Number of contacts allowed for this collision.
virtual ~Collision()
Destructor.
virtual ignition::math::Vector3d RelativeLinearAccel() const override
Get the linear acceleration of the collision.
virtual const ignition::math::Pose3d & WorldPose() const override
Get the absolute pose of the entity.
virtual ignition::math::Vector3d RelativeAngularVel() const override
Get the angular velocity of the collision.
virtual ignition::math::AxisAlignedBox BoundingBox() const override=0
Get the bounding box for this collision.
void SetWorldPoseDirty()
Indicate that the world pose should be recalculated.
void SetState(const CollisionState &_state)
Set the current collision state.
default namespace for gazebo
Store state information of a physics::Collision object.
Definition: CollisionState.hh:44
float GetLaserRetro() const
Get the laser retro reflectiveness.
virtual ignition::math::Vector3d WorldLinearAccel() const override
Get the linear acceleration of the collision in the world frame.
virtual ignition::math::Vector3d RelativeAngularAccel() const override
Get the angular acceleration of the collision.
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:142
virtual ignition::math::Vector3d WorldAngularVel() const override
Get the angular velocity of the collision in the world frame.
virtual ignition::math::Vector3d WorldLinearVel() const override
Get the linear velocity of the collision in the world frame.
void SetLaserRetro(float _retro)
Set the laser retro reflectiveness.
void SetPlaceable(const bool _placeable)
Set if this object is moveable.
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
void ProcessMsg(const msgs::Collision &_msg)
Update parameters from a message.
Base class for all physics objects in Gazebo.
Definition: Entity.hh:53
ModelPtr GetModel() const
Get the model this collision belongs to.
void FillMsg(msgs::Collision &_msg)
Fill a collision message.
virtual void SetCollideBits(unsigned int _bits)=0
Set the collide bits, used during collision detection.
boost::shared_ptr< SurfaceParams > SurfaceParamsPtr
Definition: PhysicsTypes.hh:170
virtual void Load(sdf::ElementPtr _sdf) override
Load the collision.
ShapePtr shape
Pointer to physics::Shape.
Definition: Collision.hh:219
virtual void UpdateParameters(sdf::ElementPtr _sdf) override
Update the parameters using new sdf values.
unsigned int GetShapeType() const
Get the shape type.
virtual void SetCategoryBits(unsigned int _bits)=0
Set the category bits, used during collision detection.
virtual ignition::math::Vector3d RelativeLinearVel() const override
Get the linear velocity of the collision.
virtual void Fini() override
Finalize the collision.
bool IsPlaceable() const
Return whether this collision is movable.
void SetScale(const ignition::math::Vector3d &_scale)
Set the scale of the collision.
virtual ignition::math::Vector3d WorldAngularAccel() const override
Get the angular acceleration of the collision in the world frame.