##

SurfaceParams.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_PHYSICS_SURFACEPARAMS_HH_
#define GAZEBO_PHYSICS_SURFACEPARAMS_HH_
#include <sdf/sdf.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/msgs/msgs.hh"
#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
class GZ_PHYSICS_VISIBLE FrictionPyramid
{
public: FrictionPyramid();
public: virtual ~FrictionPyramid();
public: double MuPrimary() const;
public: double MuSecondary() const;
public: double MuTorsion() const;
public: double PatchRadius() const;
public: double SurfaceRadius() const;
public: bool UsePatchRadius() const;
public: void SetMuPrimary(double _mu);
public: void SetMuSecondary(double _mu);
public: void SetMuTorsion(const double _mu);
public: void SetPatchRadius(const double _radius);
public: void SetSurfaceRadius(const double _radius);
public: void SetUsePatchRadius(const bool _use);
public: double PoissonsRatio() const;
public: void SetPoissonsRatio(const double _ratio);
public: double ElasticModulus() const;
public: void SetElasticModulus(const double _modulus);
public: ignition::math::Vector3d direction1;
private: double Mu(const unsigned int _index) const;
private: void SetMu(unsigned int _index, double _mu);
private: double mu[3];
private: double patchRadius;
private: double surfaceRadius;
private: bool usePatchRadius;
private: double poissonsRatio;
private: double elasticModulus;
};
class GZ_PHYSICS_VISIBLE SurfaceParams
{
public: SurfaceParams();
public: virtual ~SurfaceParams();
public: virtual void Load(sdf::ElementPtr _sdf);
public: virtual void FillMsg(msgs::Surface &_msg);
public: virtual void ProcessMsg(const msgs::Surface &_msg);
public: virtual FrictionPyramidPtr FrictionPyramid() const;
public: bool collideWithoutContact;
public: unsigned int collideWithoutContactBitmask;
public: unsigned int collideBitmask;
};
}
}
#endif
gazebo::physics::FrictionPyramid::UsePatchRadius
bool UsePatchRadius() const
Get the torsional "use patch radius" flag.
gazebo::physics::FrictionPyramid::direction1
ignition::math::Vector3d direction1
Vector for specifying the primary friction direction, relative to the parent collision frame.
Definition: SurfaceParams.hh:115
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::physics::FrictionPyramid::SetMuSecondary
void SetMuSecondary(double _mu)
Set the friction coefficient in the secondary direction.
gazebo::physics::SurfaceParams::FrictionPyramid
virtual FrictionPyramidPtr FrictionPyramid() const
Get access to FrictionPyramid data, if available.
gazebo::physics::SurfaceParams::ProcessMsg
virtual void ProcessMsg(const msgs::Surface &_msg)
Process a surface message.
gazebo::physics::SurfaceParams::FillMsg
virtual void FillMsg(msgs::Surface &_msg)
Fill in a surface message.
gazebo::physics::FrictionPyramid::PoissonsRatio
double PoissonsRatio() const
Get the Poisson's ratio.
gazebo::physics::FrictionPyramid
Parameters used for friction pyramid model.
Definition: SurfaceParams.hh:36
gazebo::physics::FrictionPyramid::SurfaceRadius
double SurfaceRadius() const
Get the torsional surface radius.
gazebo::physics::FrictionPyramid::SetElasticModulus
void SetElasticModulus(const double _modulus)
Set the elastic modulus.
gazebo::physics::SurfaceParams::SurfaceParams
SurfaceParams()
Constructor.
system.hh
gazebo::physics::SurfaceParams::Load
virtual void Load(sdf::ElementPtr _sdf)
Load the contact params.
msgs.hh
PhysicsTypes.hh
default namespace for gazebo
gazebo::physics::SurfaceParams
SurfaceParams defines various Surface contact parameters. These parameters defines the properties of ...
Definition: SurfaceParams.hh:167
gazebo::physics::FrictionPyramid::ElasticModulus
double ElasticModulus() const
Get the elastic modulus.
gazebo::physics::FrictionPyramid::MuTorsion
double MuTorsion() const
Get the torsional friction coefficient.
gazebo::physics::FrictionPyramid::SetMuTorsion
void SetMuTorsion(const double _mu)
Set the torsional friction coefficient.
gazebo::physics::FrictionPyramid::FrictionPyramid
FrictionPyramid()
Constructor.
gazebo::physics::FrictionPyramid::SetMuPrimary
void SetMuPrimary(double _mu)
Set the friction coefficient in the primary direction.
gazebo::physics::FrictionPyramid::~FrictionPyramid
virtual ~FrictionPyramid()
Destructor.
gazebo::physics::FrictionPyramid::PatchRadius
double PatchRadius() const
Get the torsional patch radius.
gazebo::physics::FrictionPyramid::MuPrimary
double MuPrimary() const
Get the friction coefficient in the primary direction.
gazebo::physics::SurfaceParams::collideWithoutContact
bool collideWithoutContact
Allow collision checking without generating a contact joint.
Definition: SurfaceParams.hh:193
gazebo::physics::SurfaceParams::~SurfaceParams
virtual ~SurfaceParams()
Destructor.
gazebo::physics::FrictionPyramid::SetPoissonsRatio
void SetPoissonsRatio(const double _ratio)
Set the Poisson's ratio.
gazebo::physics::FrictionPyramid::MuSecondary
double MuSecondary() const
Get the friction coefficient in the secondary direction.
gazebo::physics::FrictionPyramid::SetPatchRadius
void SetPatchRadius(const double _radius)
Set the torsional patch radius.
gazebo::physics::FrictionPyramid::SetUsePatchRadius
void SetUsePatchRadius(const bool _use)
Set whether to use the surface radius.
gazebo::physics::FrictionPyramidPtr
boost::shared_ptr< FrictionPyramid > FrictionPyramidPtr
Definition: PhysicsTypes.hh:165
gazebo::physics::SurfaceParams::collideBitmask
unsigned int collideBitmask
Custom collision filtering.
Definition: SurfaceParams.hh:201
gazebo::physics::SurfaceParams::collideWithoutContactBitmask
unsigned int collideWithoutContactBitmask
Custom collision filtering used when collideWithoutContact is true.
Definition: SurfaceParams.hh:197
gazebo::physics::FrictionPyramid::SetSurfaceRadius
void SetSurfaceRadius(const double _radius)
Set the torsional surface radius.