|
CARLA
|
Represents an actor in the simulation. More...
#include <Actor.h>
Inheritance diagram for carla::client::Actor:Public Member Functions | |
| Actor (ActorInitializer init) | |
| void | AddAngularImpulse (const geom::Vector3D &vector) |
| Add angular impulse to the actor. | |
| void | AddForce (const geom::Vector3D &force) |
| Add force to the actor at its center of mass. | |
| void | AddForce (const geom::Vector3D &force, const geom::Vector3D &location) |
| Add force to the actor at certain location. | |
| void | AddImpulse (const geom::Vector3D &impulse, const geom::Vector3D &location) |
| Add impulse to the actor at certain location. | |
| void | AddImpulse (const geom::Vector3D &vector) |
| Add impulse to the actor at its center of mass. | |
| void | AddTorque (const geom::Vector3D &vector) |
| Add a torque to the actor. | |
| void | ApplyTexture (const rpc::MaterialParameter &MaterialParameter, const rpc::TextureColor &Texture) |
| void | ApplyTexture (const rpc::MaterialParameter &MaterialParameter, const rpc::TextureFloatColor &Texture) |
| virtual bool | Destroy () |
| Tell the simulator to destroy this Actor, and return whether the actor was successfully destroyed. | |
| void | DisableConstantAcceleration () |
| Disable the constant acceleration mode. | |
| void | DisableConstantVelocity () |
| Disable the constant velocity mode. | |
| void | EnableConstantAcceleration (const geom::Vector3D &vector) |
| Enable a constant acceleration mode (direct acceleration, no pedal input) | |
| void | EnableConstantVelocity (const geom::Vector3D &vector) |
| Enable a constant velocity mode. | |
| geom::Vector3D | GetAcceleration () const |
| Return the current 3D acceleration of the actor. | |
| std::string | GetActorClassName () const |
| Return the name of the underlying actor's Unreal class. | |
| std::string | GetActorName () const |
| Return the name of the underlying Unreal actor. | |
| rpc::ActorState | GetActorState () const |
| geom::Vector3D | GetAngularVelocity () const |
| Return the current 3D angular velocity of the actor. | |
| std::vector< std::string > | GetBoneNames () const |
| Return the names of every bone reachable from the actor's first skinned mesh component. | |
| std::vector< geom::Transform > | GetBoneRelativeTransforms () const |
| Return the component-space transforms of every bone reachable from the actor's skinned mesh components. | |
| std::vector< geom::Transform > | GetBoneWorldTransforms () const |
| Return the world-space transforms of every bone reachable from the actor's skinned mesh components. | |
| std::vector< std::string > | GetComponentNames () const |
| Return the names of every actor component attached to the actor. | |
| geom::Transform | GetComponentRelativeTransform (const std::string &component_name) const |
| Return the parent-relative transform of the scene component named component_name attached to the actor. | |
| geom::Transform | GetComponentWorldTransform (const std::string &component_name) const |
| Return the world-space transform of the scene component named component_name attached to the actor. | |
| geom::Location | GetLocation () const |
| Return the current location of the actor. | |
| std::vector< std::string > | GetSocketNames () const |
| Return the names of every socket on every scene component attached to the actor. | |
| std::vector< geom::Transform > | GetSocketRelativeTransforms () const |
| Return the actor-relative transforms of every socket on every scene component attached to the actor. | |
| std::vector< geom::Transform > | GetSocketWorldTransforms () const |
| Return the world-space transforms of every socket on every scene component attached to the actor. | |
| geom::Transform | GetTransform () const |
| Return the current transform of the actor. | |
| geom::Vector3D | GetVelocity () const |
| Return the current 3D velocity of the actor. | |
| bool | IsActive () const |
| bool | IsAlive () const |
| bool | IsDormant () const |
| const auto & | Serialize () const |
| void | SetActorDead () |
| Set actor as dead and starts his life span. | |
| void | SetCollisions (bool enabled=true) |
| Enable or disable collisions on this actor. | |
| void | SetEnableGravity (bool enabled=true) |
| Enable or disable gravity on this actor. | |
| void | SetLocation (const geom::Location &location) |
| Teleport the actor to location. | |
| void | SetSimulatePhysics (bool enabled=true) |
| Enable or disable physics simulation on this actor. | |
| void | SetTargetAngularVelocity (const geom::Vector3D &vector) |
| Set the angular velocity of the actor before applying physics. | |
| void | SetTargetVelocity (const geom::Vector3D &vector) |
| Set the actor velocity before applying physics. | |
| void | SetTransform (const geom::Transform &transform) |
| Teleport and rotate the actor to transform. | |
| virtual | ~Actor ()=default |
Public Member Functions inherited from carla::client::detail::ActorState | |
| const std::vector< ActorAttributeValue > & | GetAttributes () const |
| const std::string & | GetDisplayId () const |
| ActorId | GetId () const |
| SharedPtr< Actor > | GetParent () const |
| ActorId | GetParentId () const |
| const std::vector< uint8_t > & | GetSemanticTags () const |
| uint64_t | GetSpawnFrame () const |
| Frame of the last world snapshot this client had received when the spawn of this actor was acknowledged by the server; unset for looked-up handles. | |
| const std::string & | GetTypeId () const |
| World | GetWorld () const |
| bool | WasSpawnedByThisClient () const |
| Whether this handle was returned by a spawn call of this client, as opposed to being looked up (get_actor, get_actors, parent, spectator). | |
Private Types | |
| using | Super = detail::ActorState |
Additional Inherited Members | |
Protected Member Functions inherited from carla::client::detail::ActorState | |
| ActorState (rpc::Actor description, EpisodeProxy episode) | |
| const rpc::Actor & | GetActorDescription () const |
| const geom::BoundingBox & | GetBoundingBox () const |
| EpisodeProxy & | GetEpisode () |
| const EpisodeProxy & | GetEpisode () const |
Private Member Functions inherited from carla::profiler::LifetimeProfiled | |
| LifetimeProfiled ()=default | |
Represents an actor in the simulation.
Definition at line 18 of file client/Actor.h.
|
private |
Definition at line 22 of file client/Actor.h.
|
inlineexplicit |
Definition at line 25 of file client/Actor.h.
|
virtualdefault |
| void carla::client::Actor::AddAngularImpulse | ( | const geom::Vector3D & | vector | ) |
Add angular impulse to the actor.
Definition at line 129 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::AddForce | ( | const geom::Vector3D & | force | ) |
Add force to the actor at its center of mass.
Definition at line 121 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::AddForce | ( | const geom::Vector3D & | force, |
| const geom::Vector3D & | location | ||
| ) |
Add force to the actor at certain location.
Definition at line 125 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::AddImpulse | ( | const geom::Vector3D & | impulse, |
| const geom::Vector3D & | location | ||
| ) |
Add impulse to the actor at certain location.
Definition at line 117 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::AddImpulse | ( | const geom::Vector3D & | vector | ) |
Add impulse to the actor at its center of mass.
Definition at line 113 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::AddTorque | ( | const geom::Vector3D & | vector | ) |
Add a torque to the actor.
Definition at line 133 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::ApplyTexture | ( | const rpc::MaterialParameter & | MaterialParameter, |
| const rpc::TextureColor & | Texture | ||
| ) |
Definition at line 153 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::ApplyTexture | ( | const rpc::MaterialParameter & | MaterialParameter, |
| const rpc::TextureFloatColor & | Texture | ||
| ) |
Definition at line 160 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
|
virtual |
Tell the simulator to destroy this Actor, and return whether the actor was successfully destroyed.
Reimplemented in carla::client::ServerSideSensor.
Definition at line 171 of file Actor.cpp.
References carla::client::detail::ActorState::GetDisplayId(), carla::client::detail::ActorState::GetEpisode(), carla::log_debug(), and carla::client::detail::EpisodeProxyImpl< PointerT >::TryLock().
| void carla::client::Actor::DisableConstantAcceleration | ( | ) |
Disable the constant acceleration mode.
Definition at line 109 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::DisableConstantVelocity | ( | ) |
Disable the constant velocity mode.
Definition at line 101 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::EnableConstantAcceleration | ( | const geom::Vector3D & | vector | ) |
Enable a constant acceleration mode (direct acceleration, no pedal input)
Definition at line 105 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::EnableConstantVelocity | ( | const geom::Vector3D & | vector | ) |
Enable a constant velocity mode.
Definition at line 97 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| geom::Vector3D carla::client::Actor::GetAcceleration | ( | ) | const |
Return the current 3D acceleration of the actor.
Definition at line 31 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::string carla::client::Actor::GetActorClassName | ( | ) | const |
Return the name of the underlying actor's Unreal class.
Definition at line 76 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::string carla::client::Actor::GetActorName | ( | ) | const |
Return the name of the underlying Unreal actor.
Definition at line 71 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| rpc::ActorState carla::client::Actor::GetActorState | ( | ) | const |
Definition at line 167 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
Referenced by IsActive(), IsAlive(), and IsDormant().
| geom::Vector3D carla::client::Actor::GetAngularVelocity | ( | ) | const |
Return the current 3D angular velocity of the actor.
Definition at line 27 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
Referenced by carla::rss::RssCheck::GetHeadingChange().
| std::vector< std::string > carla::client::Actor::GetBoneNames | ( | ) | const |
Return the names of every bone reachable from the actor's first skinned mesh component.
Definition at line 55 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::vector< geom::Transform > carla::client::Actor::GetBoneRelativeTransforms | ( | ) | const |
Return the component-space transforms of every bone reachable from the actor's skinned mesh components.
Each transform is the bone's local pose multiplied by FTransform::Identity, so the result is expressed in the owning USkinnedMeshComponent's space, not relative to the bone's parent.
Definition at line 47 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::vector< geom::Transform > carla::client::Actor::GetBoneWorldTransforms | ( | ) | const |
Return the world-space transforms of every bone reachable from the actor's skinned mesh components.
Definition at line 43 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::vector< std::string > carla::client::Actor::GetComponentNames | ( | ) | const |
Return the names of every actor component attached to the actor.
Definition at line 51 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| geom::Transform carla::client::Actor::GetComponentRelativeTransform | ( | const std::string & | component_name | ) | const |
Return the parent-relative transform of the scene component named component_name attached to the actor.
Definition at line 39 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| geom::Transform carla::client::Actor::GetComponentWorldTransform | ( | const std::string & | component_name | ) | const |
Return the world-space transform of the scene component named component_name attached to the actor.
Definition at line 35 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| geom::Location carla::client::Actor::GetLocation | ( | ) | const |
Return the current location of the actor.
Definition at line 15 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::vector< std::string > carla::client::Actor::GetSocketNames | ( | ) | const |
Return the names of every socket on every scene component attached to the actor.
Definition at line 67 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::vector< geom::Transform > carla::client::Actor::GetSocketRelativeTransforms | ( | ) | const |
Return the actor-relative transforms of every socket on every scene component attached to the actor.
Definition at line 63 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| std::vector< geom::Transform > carla::client::Actor::GetSocketWorldTransforms | ( | ) | const |
Return the world-space transforms of every socket on every scene component attached to the actor.
Definition at line 59 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| geom::Transform carla::client::Actor::GetTransform | ( | ) | const |
Return the current transform of the actor.
Definition at line 19 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
Referenced by carla::rss::RssCheck::CreateWorldModel(), carla::rss::RssCheck::GetSpeed(), carla::client::TrafficSign::GetStopWaypoints(), and carla::client::RssSensor::TickRssSensorThreadLocked().
| geom::Vector3D carla::client::Actor::GetVelocity | ( | ) | const |
Return the current 3D velocity of the actor.
Definition at line 23 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
Referenced by carla::rss::RssCheck::GetSpeed().
|
inline |
Definition at line 185 of file client/Actor.h.
References carla::rpc::Active, GetActorState(), carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::IsValid().
|
inline |
Definition at line 177 of file client/Actor.h.
References GetActorState(), carla::client::detail::ActorState::GetEpisode(), carla::rpc::Invalid, carla::client::detail::EpisodeProxyImpl< PointerT >::IsValid(), and carla::rpc::PendingKill.
Referenced by carla::client::ServerSideSensor::~ServerSideSensor().
|
inline |
Definition at line 181 of file client/Actor.h.
References carla::rpc::Dormant, GetActorState(), carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::IsValid().
|
inline |
Definition at line 198 of file client/Actor.h.
References carla::client::detail::ActorState::GetActorDescription().
| void carla::client::Actor::SetActorDead | ( | ) |
Set actor as dead and starts his life span.
Definition at line 145 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetCollisions | ( | bool | enabled = true | ) |
Enable or disable collisions on this actor.
Definition at line 141 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetEnableGravity | ( | bool | enabled = true | ) |
Enable or disable gravity on this actor.
Definition at line 149 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetLocation | ( | const geom::Location & | location | ) |
Teleport the actor to location.
Definition at line 81 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetSimulatePhysics | ( | bool | enabled = true | ) |
Enable or disable physics simulation on this actor.
Definition at line 137 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetTargetAngularVelocity | ( | const geom::Vector3D & | vector | ) |
Set the angular velocity of the actor before applying physics.
Definition at line 93 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetTargetVelocity | ( | const geom::Vector3D & | vector | ) |
Set the actor velocity before applying physics.
Definition at line 89 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
| void carla::client::Actor::SetTransform | ( | const geom::Transform & | transform | ) |
Teleport and rotate the actor to transform.
Definition at line 85 of file Actor.cpp.
References carla::client::detail::ActorState::GetEpisode(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().