47 public:
unsigned int id;
78 public:
virtual ~
Actor();
82 public:
void Load(sdf::ElementPtr _sdf);
85 public:
virtual void Init();
88 public:
virtual void Play();
91 public:
virtual void Stop();
94 public:
virtual bool IsActive();
97 public:
void Update();
100 public:
virtual void Fini();
104 public:
virtual void UpdateParameters(sdf::ElementPtr _sdf);
108 public:
virtual const sdf::ElementPtr GetSDF();
115 private:
void AddSphereInertia(sdf::ElementPtr _linkSdf,
117 double _mass,
double _radius);
124 private:
void AddSphereCollision(sdf::ElementPtr _linkSdf,
125 const std::string &_name,
136 private:
void AddSphereVisual(sdf::ElementPtr _linkSdf,
137 const std::string &_name,
140 const std::string &_material,
150 private:
void AddBoxVisual(sdf::ElementPtr _linkSdf,
151 const std::string &_name,
154 const std::string &_material,
161 private:
void AddActorVisual(sdf::ElementPtr _linkSdf,
162 const std::string &_name,
167 private:
void LoadAnimation(sdf::ElementPtr _sdf);
171 private:
void LoadScript(sdf::ElementPtr _sdf);
179 private:
void SetPose(std::map<std::string, math::Matrix4> _frame,
180 std::map<std::string, std::string> _skelMap,
double _time)
187 private:
void SetPose(
188 std::map<std::string, ignition::math::Matrix4d> _frame,
189 std::map<std::string, std::string> _skelMap,
double _time);
231 protected: std::map<unsigned int, common::PoseAnimation*>
trajectories;
237 protected: std::map<std::string, common::SkeletonAnimation*>
241 protected: std::map<std::string, std::map<std::string, std::string> >
A 3D mesh.
Definition: Mesh.hh:44
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:68
bool autoStart
True if the actor should start running automatically.
Definition: Actor.hh:219
double endTime
End time of the trajectory.
Definition: Actor.hh:59
#define GZ_PHYSICS_VISIBLE
Definition: system.hh:318
A skeleton.
Definition: Skeleton.hh:53
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
LinkPtr mainLink
Base link.
Definition: Actor.hh:222
std::string oldAction
THe old action.
Definition: Actor.hh:266
double pathLength
Length of the actor's path.
Definition: Actor.hh:251
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
unsigned int id
ID of the trajectory.
Definition: Actor.hh:47
std::map< std::string, common::SkeletonAnimation * > skelAnimation
Skeleton animations.
Definition: Actor.hh:238
double skinScale
Scaling factor to apply to the skin.
Definition: Actor.hh:201
Actor class enables GPU based mesh model / skeleton scriptable animation.
Definition: Actor.hh:71
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
const common::Mesh * mesh
Pointer to the actor's mesh.
Definition: Actor.hh:192
double lastScriptTime
Time the scipt was last updated.
Definition: Actor.hh:210
common::Skeleton * skeleton
The actor's skeleton.
Definition: Actor.hh:195
A model is a collection of links, joints, and plugins.
Definition: Model.hh:52
uint32_t visualId
ID for this visual.
Definition: Actor.hh:260
std::string visualName
Name of the visual.
Definition: Actor.hh:257
bool active
True if the actor is being updated.
Definition: Actor.hh:216
Information about a trajectory for an Actor.
Definition: Actor.hh:41
double startTime
Start time of the trajectory.
Definition: Actor.hh:56
std::string type
Type of trajectory.
Definition: Actor.hh:50
double scriptLength
Time length of a scipt.
Definition: Actor.hh:207
bool translated
True if the trajectory is tranlated.
Definition: Actor.hh:62
unsigned int lastTraj
THe last trajectory.
Definition: Actor.hh:254
double duration
Duration of the trajectory.
Definition: Actor.hh:53
Defines a color.
Definition: Color.hh:36
bool loop
True if the animation should loop.
Definition: Actor.hh:213
std::vector< TrajectoryInfo > trajInfo
Trajectory information.
Definition: Actor.hh:234
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
math::Vector3 lastPos
Last position of the actor.
Definition: Actor.hh:248
std::map< std::string, bool > interpolateX
True to interpolate along x direction.
Definition: Actor.hh:245
std::map< unsigned int, common::PoseAnimation * > trajectories
All the trajectories.
Definition: Actor.hh:231
std::map< std::string, std::map< std::string, std::string > > skelNodesMap
Skeleton to naode map.
Definition: Actor.hh:242
transport::PublisherPtr bonePosePub
Where to send bone info.
Definition: Actor.hh:263
common::Time playStartTime
Time when the animation was started.
Definition: Actor.hh:228
std::string skinFile
Filename for the skin.
Definition: Actor.hh:198
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
common::Time prevFrameTime
Time of the previous frame.
Definition: Actor.hh:225
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:92
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:39
double startDelay
Amount of time to delay start by.
Definition: Actor.hh:204