18 #ifndef _GEARBOXJOINT_HH_
19 #define _GEARBOXJOINT_HH_
53 public:
virtual void Load(sdf::ElementPtr _sdf)
56 if (_sdf->HasElement(
"gearbox_ratio"))
59 _sdf->Get<
double>(
"gearbox_ratio");
63 gzerr <<
"gearbox_ratio_not_specified, set to 1.\n";
64 this->gearRatio = 1.0;
71 if (_sdf->HasElement(
"gearbox_reference_body"))
74 _sdf->Get<std::string>(
"gearbox_reference_body");
78 gzerr <<
"Gearbox joint missing reference body.\n";
83 protected:
virtual void Init()
91 {
return this->gearRatio; }
98 public:
virtual void SetGearboxRatio(
double _gearRatio) = 0;
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:66
virtual double GetGearboxRatio() const
Get gearbox joint gear ratio.
Definition: GearboxJoint.hh:90
double gearRatio
Gearbox gearRatio.
Definition: GearboxJoint.hh:101
GearboxJoint(BasePtr _parent)
Constructor.
Definition: GearboxJoint.hh:41
virtual unsigned int GetAngleCount() const
Definition: GearboxJoint.hh:48
#define gzerr
Output an error message.
Definition: Console.hh:47
A double axis gearbox joint.
Definition: GearboxJoint.hh:37
virtual void Init()
Initialize joint.
Definition: GearboxJoint.hh:83
virtual ~GearboxJoint()
Destructor.
Definition: GearboxJoint.hh:44
std::string referenceBody
reference link/body for computing joint angles
Definition: GearboxJoint.hh:104
GearboxJoint type.
Definition: Base.hh:111
virtual void Load(sdf::ElementPtr _sdf)
Load joint.
Definition: GearboxJoint.hh:53
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48