21 #ifndef _LINKSTATE_HH_
22 #define _LINKSTATE_HH_
63 const common::Time &_simTime,
const uint64_t _iterations);
76 public:
explicit LinkState(
const sdf::ElementPtr _sdf);
90 const common::Time &_simTime,
const uint64_t _iterations);
96 public:
virtual void Load(
const sdf::ElementPtr _elem);
104 public:
const math::Pose &GetVelocity()
const;
108 public:
const math::Pose &GetAcceleration()
const;
118 public:
unsigned int GetCollisionStateCount()
const;
127 public:
CollisionState GetCollisionState(
unsigned int _index)
const;
137 const std::string &_collisionName)
const;
141 public:
const std::vector<CollisionState> &GetCollisionStates()
const;
145 public:
bool IsZero()
const;
149 public:
void FillSDF(sdf::ElementPtr _sdf);
154 public:
virtual void SetWallTime(
const common::Time &_time);
158 public:
virtual void SetRealTime(
const common::Time &_time);
162 public:
virtual void SetSimTime(
const common::Time &_time);
167 public:
virtual void SetIterations(
const uint64_t _iterations);
188 public:
inline friend std::ostream &
operator<<(std::ostream &_out,
192 _out << std::fixed <<std::setprecision(5)
193 <<
"<link name='" << _state.
name <<
"'>"
195 << _state.pose.
pos.
x <<
" "
196 << _state.pose.
pos.
y <<
" "
197 << _state.pose.
pos.
z <<
" "
205 _out << std::fixed <<std::setprecision(4)
207 << _state.velocity.
pos.
x <<
" "
208 << _state.velocity.
pos.
y <<
" "
209 << _state.velocity.
pos.
z <<
" "
243 private: std::vector<CollisionState> collisionStates;
#define GZ_PHYSICS_VISIBLE
Definition: system.hh:259
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
std::string name
Name associated with this State.
Definition: State.hh:130
double x
X location.
Definition: Vector3.hh:311
double z
Z location.
Definition: Vector3.hh:317
State of an entity.
Definition: State.hh:49
Vector3 pos
The position.
Definition: Pose.hh:252
Quaternion rot
The rotation.
Definition: Pose.hh:255
friend std::ostream & operator<<(std::ostream &_out, const gazebo::physics::LinkState &_state)
Stream insertion operator.
Definition: LinkState.hh:188
Store state information of a physics::Collision object.
Definition: CollisionState.hh:42
Store state information of a physics::Link object.
Definition: LinkState.hh:49
double y
Y location.
Definition: Vector3.hh:314
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:100
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44
Vector3 GetAsEuler() const
Return the rotation in Euler angles.