ODEUniversalJoint.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16*/
17#ifndef _ODEUNIVERSALJOINT_HH_
18#define _ODEUNIVERSALJOINT_HH_
19
20#include <boost/any.hpp>
21#include <string>
22
26#include "gazebo/util/system.hh"
27
28namespace gazebo
29{
30 namespace physics
31 {
34
36 class GZ_PHYSICS_VISIBLE ODEUniversalJoint :
37 public UniversalJoint<ODEJoint>
38 {
42 public: ODEUniversalJoint(dWorldID _worldId, BasePtr _parent);
43
45 public: virtual ~ODEUniversalJoint();
46
47 // Documentation inherited
48 public: virtual ignition::math::Vector3d Anchor(
49 const unsigned int _index) const;
50
51 // Documentation inherited
52 public: virtual void SetAnchor(const unsigned int _index,
53 const ignition::math::Vector3d &_anchor);
54
55 // Documentation inherited
56 public: virtual ignition::math::Vector3d GlobalAxis(
57 const unsigned int _index) const;
58
59 // Documentation inherited
60 public: virtual void SetAxis(const unsigned int _index,
61 const ignition::math::Vector3d &_axis);
62
63 // Documentation inherited
64 public: virtual double PositionImpl(const unsigned int _index) const;
65
66 // Documentation inherited
67 public: virtual double GetVelocity(unsigned int _index) const;
68
69 // Documentation inherited
70 public: virtual void SetVelocity(unsigned int _index, double _angle);
71
72 // Documentation inherited
73 public: virtual void SetParam(unsigned int _parameter, double _value);
74
75 // Documentation inherited.
76 public: virtual void SetUpperLimit(const unsigned int _index,
77 const double _limit);
78
79 // Documentation inherited.
80 public: virtual void SetLowerLimit(const unsigned int _index,
81 const double _limit);
82
83 // Documentation inherited.
84 public: virtual bool SetParam(const std::string &_key,
85 unsigned int _index,
86 const boost::any &_value);
87
88 // Documentation inherited.
89 public: virtual double GetParam(const std::string &_key,
90 unsigned int _index);
91
92 // Documentation inherited
93 public: virtual double GetParam(unsigned int _parameter) const;
94
95 // Documentation inherited
96 protected: virtual void SetForceImpl(unsigned int _index, double _effort);
97 };
99 }
100}
101#endif
A universal joint.
Definition ODEUniversalJoint.hh:38
virtual bool SetParam(const std::string &_key, unsigned int _index, const boost::any &_value)
Set a non-generic parameter for the joint.
virtual ~ODEUniversalJoint()
Destuctor.
virtual void SetAxis(const unsigned int _index, const ignition::math::Vector3d &_axis)
Set the axis of rotation where axis is specified in local joint frame.
virtual void SetUpperLimit(const unsigned int _index, const double _limit)
Set the joint's upper limit.
virtual double PositionImpl(const unsigned int _index) const
Helper function to get the position of an axis.
virtual void SetForceImpl(unsigned int _index, double _effort)
Set the force applied to this physics::Joint.
virtual ignition::math::Vector3d Anchor(const unsigned int _index) const
Get the anchor point.
virtual void SetAnchor(const unsigned int _index, const ignition::math::Vector3d &_anchor)
Set the anchor point.
virtual void SetLowerLimit(const unsigned int _index, const double _limit)
Set the joint's lower limit.
virtual double GetParam(const std::string &_key, unsigned int _index)
Get a non-generic parameter for the joint.
virtual void SetParam(unsigned int _parameter, double _value)
Set an ODE joint paramter.
virtual double GetVelocity(unsigned int _index) const
Get the rotation rate of an axis(index)
virtual void SetVelocity(unsigned int _index, double _angle)
Set the velocity of an axis(index).
ODEUniversalJoint(dWorldID _worldId, BasePtr _parent)
Constructor.
virtual ignition::math::Vector3d GlobalAxis(const unsigned int _index) const
Get the axis of rotation in global cooridnate frame.
virtual double GetParam(unsigned int _parameter) const
Get an ODE joint parameter.
A universal joint.
Definition UniversalJoint.hh:36
boost::shared_ptr< Base > BasePtr
Definition PhysicsTypes.hh:77
Forward declarations for the common classes.
Definition Animation.hh:27