23#include <gz/math/Pose3.hh>
24#include <gz/utils/ImplPtr.hh>
37 inline namespace SDF_VERSION_NAMESPACE {
55 public:
const std::string &
Name()
const;
59 public:
void SetName(
const std::string &_name);
94 GZ_UTILS_IMPL_PTR(dataPtr)
121 public: gz::math::Pose3d
Pose()
const;
125 public:
void SetPose(
const gz::math::Pose3d &_pose);
128 GZ_UTILS_IMPL_PTR(dataPtr)
147 public: uint64_t
Id()
const;
155 public:
const std::string &
Type()
const;
160 public:
void SetType(
const std::string &_type);
186 GZ_UTILS_IMPL_PTR(dataPtr)
206 public:
const std::string &
Name()
const;
210 public:
void SetName(
const std::string &_name);
217 public:
const gz::math::Pose3d &
RawPose()
const;
407 GZ_UTILS_IMPL_PTR(dataPtr)
Provides a description of an actor.
Definition: Actor.hh:192
const gz::math::Pose3d & RawPose() const
Get the pose of the actor.
const Animation * AnimationByIndex(uint64_t _index) const
Get an animation based on an index.
const Joint * JointByIndex(uint64_t _index) const
Get a joint based on an index.
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
sdf::Plugins & Plugins()
Get a mutable vector of plugins attached to this object.
void SetScriptLoop(bool _scriptLoop)
Set whether the animation plays in loop.
void AddPlugin(const Plugin &_plugin)
Add a plugin to this object.
Errors Load(ElementPtr _sdf)
Load the actor based on a element pointer.
const std::string & Name() const
Get the name of the actor.
void SetPoseRelativeTo(const std::string &_frame)
Set the name of the coordinate frame relative to which this object's pose is expressed.
const std::string & FilePath() const
The path to the file where this element was loaded from.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
const Trajectory * TrajectoryByIndex(uint64_t _index) const
Get a trajectory based on an index.
const Link * LinkByIndex(uint64_t _index) const
Get a link based on an index.
void SetScriptDelayStart(double _scriptDelayStart)
Set the delay time to start.
void SetName(const std::string &_name)
Set the name of the actor.
bool LinkNameExists(const std::string &_name) const
Get whether a link name exists.
bool AddJoint(const Joint &_joint)
Add a joint to the actor.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this actor.
void ClearPlugins()
Remove all plugins.
void SetScriptAutoStart(bool _scriptAutoStart)
Set whether the animation plays when simulation starts.
void AddAnimation(const Animation &_anim)
Add a new animation.
uint64_t JointCount() const
Get the number of joints.
void SetSkinFilename(std::string _skinFilename)
Set the skin filename.
void ClearLinks()
Remove all links.
const sdf::Plugins & Plugins() const
Get the plugins attached to this object.
bool TrajectoryIdExists(uint64_t _id) const
Get whether a trajectory id exists.
bool ScriptLoop() const
Get whether the animation plays in loop.
double ScriptDelayStart() const
Get the time (in seconds) of delay to start.
double SkinScale() const
Get the skin scale.
const std::string & PoseRelativeTo() const
Get the name of the coordinate frame relative to which this object's pose is expressed.
void ClearJoints()
Remove all joints.
void SetSkinScale(double _skinScale)
Set the skin scale.
bool ScriptAutoStart() const
Get whether the animation plays when simulation starts.
bool JointNameExists(const std::string &_name) const
Get whether a joint name exists.
uint64_t TrajectoryCount() const
Get the number of trajectories.
void AddTrajectory(const Trajectory &_traj)
Add a new trajectory.
Actor()
Default constructor.
const std::string & SkinFilename() const
Get the skin filename.
uint64_t LinkCount() const
Get the number of links.
bool AddLink(const Link &_link)
Add a link to the actor.
bool AnimationNameExists(const std::string &_name) const
Get whether an animation name exists.
void SetRawPose(const gz::math::Pose3d &_pose)
Set the pose of the actor.
uint64_t AnimationCount() const
Get the number of animations.
Animation in Actor.
Definition: Actor.hh:41
const std::string & FilePath() const
The path to the file where this element was loaded from.
Errors Load(ElementPtr _sdf)
Load the animation based on a element pointer.
void SetInterpolateX(bool _interpolateX)
Set whether the animation is interpolated on X.
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
void SetName(const std::string &_name)
Set the name of the animation.
void SetFilename(const std::string &_filename)
Set the filename of the animation.
Animation()
Default constructor.
double Scale() const
Get the scale for the animation skeleton.
bool InterpolateX() const
Get whether the animation is interpolated on X.
const std::string & Filename() const
Get the animation filename.
const std::string & Name() const
Get the name of the animation.
void SetScale(double _scale)
Set the scale of the animation skeleton.
Trajectory for Animation.
Definition: Actor.hh:133
Trajectory()
Default constructor.
uint64_t WaypointCount() const
Get the number of waypoints.
void AddWaypoint(const Waypoint &_waypoint)
Add a new waypoint.
Errors Load(ElementPtr _sdf)
Load the trajectory based on a element pointer.
uint64_t Id() const
Get the unique id of the trajectory.
double Tension() const
Get the tension of the trajectory spline.
void SetType(const std::string &_type)
Set the animation type of the trajectory.
void SetId(uint64_t _id)
Set the ID of the trajectory.
const std::string & Type() const
Get the type of the trajectory.
void SetTension(double _tension)
Set the tension of trajectory spline.
const Waypoint * WaypointByIndex(uint64_t _index) const
Get a waypoint based on an index.
Waypoint for Trajectory.
Definition: Actor.hh:99
gz::math::Pose3d Pose() const
Get the pose to be reached.
double Time() const
Get the time in seconds when the pose should be reached.
Errors Load(ElementPtr _sdf)
Load the waypoint based on a element pointer.
void SetPose(const gz::math::Pose3d &_pose)
Set the pose to be reached.
Waypoint()
Default constructor.
void SetTime(double _time)
Set the time in seconds when the pose should be reached.
std::vector< Plugin > Plugins
A vector of Plugin.
Definition: Plugin.hh:245
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:95
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25