17 #ifndef GAZEBO_PHYSICS_JOINTSTATE_HH_
18 #define GAZEBO_PHYSICS_JOINTSTATE_HH_
28 #include <ignition/math/Angle.hh>
54 const common::Time &_simTime,
const uint64_t _iterations);
64 public:
explicit JointState(
const sdf::ElementPtr _sdf);
78 public:
virtual void Load(
const sdf::ElementPtr _elem);
82 public:
unsigned int GetAngleCount()
const;
89 public:
math::Angle GetAngle(
unsigned int _axis)
const
103 public:
double Position(
const unsigned int _axis = 0)
const;
108 public:
const std::vector<math::Angle> GetAngles()
const
117 public:
const std::vector<double> &Positions()
const;
121 public:
bool IsZero()
const;
125 public:
void FillSDF(sdf::ElementPtr _sdf);
146 public:
inline friend std::ostream &
operator<<(std::ostream &_out,
149 _out <<
"<joint name='" << _state.
GetName() <<
"'>";
152 for (std::vector<double>::const_iterator iter =
153 _state.positions.begin(); iter != _state.positions.end(); ++iter)
155 _out <<
"<angle axis='" << i <<
"'>" << (*iter) <<
"</angle>";
163 private: std::vector<double> positions;
std::string GetName() const
Get the name associated with this State.
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
State of an entity.
Definition: State.hh:49
friend std::ostream & operator<<(std::ostream &_out, const gazebo::physics::JointState &_state)
Stream insertion operator.
Definition: JointState.hh:146
keeps track of state of a physics::Joint
Definition: JointState.hh:43
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
An angle and related functions.
Definition: Angle.hh:53
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44