RapyutaSimulationPlugins
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
URRPoseSensorManager Class Reference

Robot pose sensor manager which has two URRROS2EntityStateSensorComponent which publishes. More...

#include <RRPoseSensorManager.h>

Inheritance diagram for URRPoseSensorManager:
Inheritance graph
[legend]
Collaboration diagram for URRPoseSensorManager:
Collaboration graph
[legend]

Public Member Functions

 URRPoseSensorManager ()
 Construct a new URRPoseSensorManager object, configuring sensor default property values. More...
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns the properties used for network replication, this needs to be overridden by all actor classes with native. More...
 
virtual void InitalizeWithROS2 (UROS2NodeComponent *InROS2Node, const FString &InPublisherName=EMPTY_STR, const FString &InTopicName=EMPTY_STR, const UROS2QoS InQoS=UROS2QoS::SensorData) override
 Create and initialize publisher and start sensor update by calling. More...
 
virtual void SensorUpdate () override
 Calculate relative pose with URRGeneralUtils and update Data. More...
 
virtual void UpdateReferenceActorWithTag ()
 Update reference actor to the nearest one along Z axis with tag. More...
 
- Public Member Functions inherited from URRROS2EntityStateSensorComponent
 URRROS2EntityStateSensorComponent ()
 Construct a new URRROS2EntityStateSensorComponent object. More...
 
void BeginPlay () override
 
virtual void SetReferenceActorByName (const FString &InName)
 
virtual void SetRootOffset (const FTransform &InRootOffset)
 
virtual void SetReferenceActorByActor (AActor *InActor)
 
virtual FROSEntityState GetROS2Data ()
 return Data More...
 
virtual void SetROS2Msg (UROS2GenericMsg *InMessage) override
 Set result of GetROS2Data to InMessage. More...
 
- Public Member Functions inherited from URRROS2BaseSensorComponent
 URRROS2BaseSensorComponent ()
 Construct a new URRROS2BaseSensorComponent object. More...
 
virtual void CreatePublisher (const FString &InPublisherName=TEXT(""))
 Create a Publisher with SensorPublisherClass. More...
 
virtual void PreInitializePublisher (UROS2NodeComponent *InROS2Node, const FString &InTopicName=TEXT(""))
 Set publish frequency, topic name and FrameId. More...
 
virtual void InitializePublisher (UROS2NodeComponent *InROS2Node, const UROS2QoS InQoS=UROS2QoS::SensorData)
 Initialize Sensorpublisher by using UROS2Publisher's methods. More...
 
virtual void Run ()
 Start timer to update and publish sensor data by using SetTimer. More...
 
virtual void Stop ()
 Stop timer to update and publish sensor data by using ClearTimer. More...
 

Public Attributes

ASimulationStateServerSimState = nullptr
 Handle to server's main sim state. More...
 
FString ReferenceTag = URRActorCommon::MAP_ORIGIN_TAG
 Reference actor's tag. More...
 
ERRRefActorSelectMode RefActorSelectMode = ERRRefActorSelectMode::AUTO
 Reference actor's selection mode. More...
 
FString MapFrameId = URRActorCommon::MAP_ROS_FRAME_ID
 Map frame id. More...
 
URRROS2EntityStateSensorComponentMapOriginPoseSensor = nullptr
 Map origin's pose sensor. More...
 
- Public Attributes inherited from URRROS2EntityStateSensorComponent
FString ReferenceActorName = TEXT("")
 NOTE: Only URRPoseSensorManager uses ReferenceActor. More...
 
AActor * ReferenceActor = nullptr
 
FTransform OffsetTransform = FTransform::Identity
 
FOnNewReferenceActorDetected OnNewReferenceActorDetected
 
FROSEntityState Data
 
- Public Attributes inherited from URRROS2BaseSensorComponent
TSubclassOf< UROS2Publisher > SensorPublisherClass = URRROS2BaseSensorPublisher::StaticClass()
 
URRROS2BaseSensorPublisherSensorPublisher = nullptr
 
TSubclassOf< UROS2GenericMsg > MsgClass = UROS2GenericMsg::StaticClass()
 
FString TopicName = TEXT("sensor_data")
 
FString FrameId = TEXT("sensor_frame")
 
int32 PublicationFrequencyHz = 30
 
bool bAppendNodeNamespace = true
 Append namespace to FrameId or not. More...
 
bool bIsValid = true
 

Protected Member Functions

virtual void OnComponentCreated () override
 Callback on component creation to setup SetIsReplicated() More...
 

Additional Inherited Members

- Protected Attributes inherited from URRROS2BaseSensorComponent
FTimerHandle TimerHandle
 

Detailed Description

Robot pose sensor manager which has two URRROS2EntityStateSensorComponent which publishes.

Typical usecase is to set map origin as reference actor and publish robot pose from map_origin.

This is useful to navigate robot in the large area such as multiple floor building which has multiple map origins.

UCLASS(ClassGroup = (Custom), Blueprintable, meta = (BlueprintSpawnableComponent))

Constructor & Destructor Documentation

◆ URRPoseSensorManager()

URRPoseSensorManager::URRPoseSensorManager ( )

Construct a new URRPoseSensorManager object, configuring sensor default property values.

Member Function Documentation

◆ GetLifetimeReplicatedProps()

virtual void URRPoseSensorManager::GetLifetimeReplicatedProps ( TArray< FLifetimeProperty > &  OutLifetimeProps) const
overridevirtual

Returns the properties used for network replication, this needs to be overridden by all actor classes with native.

replicated properties

Parameters
OutLifetimePropsOutput lifetime properties

◆ InitalizeWithROS2()

virtual void URRPoseSensorManager::InitalizeWithROS2 ( UROS2NodeComponent *  InROS2Node,
const FString &  InPublisherName = EMPTY_STR,
const FString &  InTopicName = EMPTY_STR,
const UROS2QoS  InQoS = UROS2QoS::SensorData 
)
overridevirtual

Create and initialize publisher and start sensor update by calling.

CreatePublisher, PreInitializePublisher, InitializePublisher and Run.

Parameters
InROS2NodeROS2Node which this publisher belongs to
InPublisherNamePublisher component name
InTopicNameTopic name
InQoSTopic QoS
See also
UROS2NodeComponent
ROS 2 QoS

Reimplemented from URRROS2BaseSensorComponent.

◆ OnComponentCreated()

virtual void URRPoseSensorManager::OnComponentCreated ( )
overrideprotectedvirtual

Callback on component creation to setup SetIsReplicated()

◆ SensorUpdate()

virtual void URRPoseSensorManager::SensorUpdate ( )
overridevirtual

Calculate relative pose with URRGeneralUtils and update Data.

Todo:
Currently twist = ZeroVectors. Should be filled for physics actors.

Reimplemented from URRROS2EntityStateSensorComponent.

◆ UpdateReferenceActorWithTag()

virtual void URRPoseSensorManager::UpdateReferenceActorWithTag ( )
virtual

Update reference actor to the nearest one along Z axis with tag.

UFUNCTION(BlueprintCallable)

Member Data Documentation

◆ MapFrameId

FString URRPoseSensorManager::MapFrameId = URRActorCommon::MAP_ROS_FRAME_ID

◆ MapOriginPoseSensor

URRROS2EntityStateSensorComponent* URRPoseSensorManager::MapOriginPoseSensor = nullptr

◆ RefActorSelectMode

ERRRefActorSelectMode URRPoseSensorManager::RefActorSelectMode = ERRRefActorSelectMode::AUTO

◆ ReferenceTag

FString URRPoseSensorManager::ReferenceTag = URRActorCommon::MAP_ORIGIN_TAG

◆ ServerSimState

ASimulationState* URRPoseSensorManager::ServerSimState = nullptr

The documentation for this class was generated from the following file: