gz/sim/rendering/SceneManager.hh
Go to the documentation of this file.
Data structure for updating skeleton animations.
Definition: gz/sim/rendering/SceneManager.hh:60
common::TrajectoryInfo trajectory
Trajectory to be followed.
Definition: gz/sim/rendering/SceneManager.hh:75
std::chrono::steady_clock::duration time
Timepoint in the animation. Note that animation time is different from sim time. An actor can have mu...
Definition: gz/sim/rendering/SceneManager.hh:66
math::Matrix4d rootTransform
Transform of the root node in the skeleton. The actor's skeleton's root node transform needs to be se...
Definition: gz/sim/rendering/SceneManager.hh:85
std::string animationName
Name of animation to play. This field is set only if the actor is not animated by manually using skel...
Definition: gz/sim/rendering/SceneManager.hh:79
Scene manager class for loading and managing objects in the scene.
Definition: gz/sim/rendering/SceneManager.hh:94
std::map< std::string, math::Matrix4d > ActorSkeletonTransformsAt(Entity _id, std::chrono::steady_clock::duration _time) const
Get the skeleton local transforms of actor mesh given an id. Use this function if you are animating t...
rendering::NodePtr TopLevelNode(const rendering::NodePtr &_node) const
Get the top level node for the given node, which is the ancestor which is a direct child to the root ...
void SetScene(rendering::ScenePtr _scene)
Set the scene to manage.
rendering::VisualPtr CreateActor(Entity _id, const sdf::Actor &_actor, const std::string &_name, Entity _parentId=0)
Create an actor.
rendering::VisualPtr CreateInertiaVisual(Entity _id, const math::Inertiald &_inertial, Entity _parentId=0)
Create an inertia visual.
std::vector< rendering::NodePtr > Filter(const std::string &_node, std::function< bool(const rendering::NodePtr _nodeToFilter)> _filter) const
Filter a node and its children according to specific criteria.
rendering::VisualPtr CreateLink(Entity _id, const sdf::Link &_link, Entity _parentId=0)
Create a link.
std::pair< rendering::VisualPtr, std::vector< Entity > > CopyVisual(Entity _id, const std::string &_visual, Entity _parentId=0)
Copy a visual that currently exists in the scene.
rendering::VisualPtr VisualById(Entity _id)
Retrieve visual.
rendering::NodePtr NodeById(Entity _id) const
Get a rendering node given an entity id.
std::unordered_map< std::string, unsigned int > LoadAnimations(const sdf::Actor &_actor)
Load Actor animations.
bool AddSensor(Entity _gazeboId, const std::string &_sensorName, Entity _parentGazeboId=0)
Ignition sensors is the one responsible for adding sensors to the scene. Here we just keep track of i...
rendering::VisualPtr CreateLightVisual(Entity _id, const sdf::Light &_light, const std::string &_name, Entity _parentId)
Create a light.
void SequenceTrajectories(std::vector< common::TrajectoryInfo > &_trajectories, std::chrono::steady_clock::time_point _time)
Sequences Trajectories.
rendering::ParticleEmitterPtr CreateParticleEmitter(Entity _id, const msgs::ParticleEmitter &_emitter, Entity _parentId)
Create a particle emitter.
rendering::ParticleEmitterPtr UpdateParticleEmitter(Entity _id, const msgs::ParticleEmitter &_emitter)
Update an existing particle emitter.
rendering::VisualPtr CreateModel(Entity _id, const sdf::Model &_model, Entity _parentId=0)
Create a model.
void UpdateTransparency(const rendering::NodePtr &_node, bool _makeTransparent)
Updates the node to increase its transparency or reset back to its original transparency value,...
void UpdateJointParentPose(Entity _jointId)
Updates the world pose of joint parent visual according to its child.
rendering::VisualPtr CreateCOMVisual(Entity _id, const math::Inertiald &_inertial, Entity _parentId=0)
Create a center of mass visual.
rendering::LightPtr CreateLight(Entity _id, const sdf::Light &_light, const std::string &_name, Entity _parentId)
Create a light.
AnimationUpdateData ActorAnimationAt(Entity _id, std::chrono::steady_clock::duration _time) const
Get the actor animation update data given an id. Use this function to let the render engine handle th...
rendering::VisualPtr CreateJointVisual(Entity _id, const sdf::Joint &_joint, Entity _childId=0, Entity _parentId=0)
Create a joint visual.
rendering::VisualPtr CreateVisual(Entity _id, const sdf::Visual &_visual, Entity _parentId=0)
Create a visual.
common::SkeletonPtr ActorSkeletonById(Entity _id) const
Get a skeleton given an id.
rendering::VisualPtr TopLevelVisual(const rendering::VisualPtr &_visual) const
Get the top level visual for the given visual, which is the ancestor which is a direct child to the r...
rendering::VisualPtr CreateCollision(Entity _id, const sdf::Collision &_collision, Entity _parentId=0)
Create a collision visual.
rendering::MeshPtr ActorMeshById(Entity _id) const
Get a rendering mesh given an id.
Component< sdf::Geometry, class GeometryTag, serializers::GeometrySerializer > Geometry
This component holds an entity's geometry.
Definition: gz/sim/components/Geometry.hh:46
Component< NoData, class VisualTag > Visual
A component that identifies an entity as being a visual.
Definition: gz/sim/components/Visual.hh:80
Component< NoData, class CollisionTag > Collision
A component that identifies an entity as being a collision.
Definition: gz/sim/components/Collision.hh:42
Component< NoData, class ModelTag > Model
A component that identifies an entity as being a model.
Definition: gz/sim/components/Model.hh:125
Component< NoData, class JointTag > Joint
A component that identifies an entity as being a joint.
Definition: gz/sim/components/Joint.hh:33
Component< msgs::ParticleEmitter, class ParticleEmitterTag, serializers::MsgSerializer > ParticleEmitter
A component that contains a particle emitter.
Definition: include/gz/sim/components/ParticleEmitter.hh:37
Component< NoData, class LinkTag > Link
A component that identifies an entity as being a link.
Definition: gz/sim/components/Link.hh:33
Component< sdf::Material, class MaterialTag, serializers::MaterialSerializer > Material
This component holds an entity's material.
Definition: gz/sim/components/Material.hh:44
Component< sdf::Light, class LightTag, serializers::LightSerializer > Light
This component contains light source information. For more information on lights, see SDF's Light ele...
Definition: gz/sim/components/Light.hh:48
Component< sdf::Actor, class ActorTag, serializers::ActorSerializer > Actor
This component contains actor source information. For more information on actors, see SDF's Actor ele...
Definition: gz/sim/components/Actor.hh:80
uint64_t Entity
An Entity identifies a single object in simulation such as a model, link, or light....
Definition: gz/sim/Entity.hh:58