RapyutaSimulationPlugins
|
Base Robot ROS 2 interface class. More...
#include <RRBaseROS2Interface.h>
Public Member Functions | |
virtual bool | IsSupportedForNetworking () const override |
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 | Initialize (AActor *Owner) |
Initialize robot's ROS 2 interface by calling InitRobotROS2Node, InitPublishers, InitSubscriptions and ARRBaseRobot::InitSensors. More... | |
virtual void | InitInterfaces () |
Init publishers, subscribers, service clients, service servers, action clients, and action servers. More... | |
void | BPInitialize () |
AdditionalInitialization implemented in BP. More... | |
virtual void | DeInitialize () |
DeInitialize robot's ROS 2 interface by stopping publisher. More... | |
virtual void | InitRobotROS2Node (AActor *Owner) |
Spawn ROS2Node and initialize it. More... | |
virtual void | InitROS2NodeParam (AActor *Owner) |
Spawn ROS2 Node, and initialize it if ROS2 Node = nullptr. More... | |
virtual void | SetupROSParams () |
Setup ROS Params, overridable by child classes to config custom ROS 2 Interface's params. More... | |
void | BPSetupROSParams () |
Setup ROS params called after SetupROSParams. override by BP child class to config custom ROS 2 Interface's params. More... | |
void | SetupROSParamsAll () |
Call SetupROSParams and BPSetupROSParams. More... | |
virtual bool | InitPublishers () |
Initialize non sensor basic publishers such as odometry. More... | |
virtual void | StopPublishers () |
Stop all publishers. More... | |
virtual bool | InitSubscriptions () |
Initialize subscriptions for cmd_vel & joint_states topics. More... | |
virtual bool | InitServiceClients () |
Initialize service clients. More... | |
virtual bool | InitServiceServers () |
Initialize service servers. More... | |
virtual bool | InitActionClients () |
Initialize action clients. More... | |
virtual bool | InitActionServers () |
Initialize action servers. More... | |
Public Attributes | |
TObjectPtr< UROS2NodeComponent > | RobotROS2Node = nullptr |
ROS 2 node of this interface created by InitRobotROS2Node. More... | |
TObjectPtr< UROS2Spawnable > | ROSSpawnParameters = nullptr |
ROS2SpawnParameters which is created when robot is spawn from /SpawnEntity srv provided by ASimulationState. More... | |
FString | DefautlROSNamespace = TEXT("") |
Defautl ROS namespace. More... | |
TMap< FString, UROS2Publisher * > | Publishers |
You can add your publishers here to ask ROS2Interface to manage. More... | |
TMap< FString, UROS2Subscriber * > | Subscribers |
You can add your subscribers here to ask ROS2Interface to manage. More... | |
TMap< FString, UROS2ServiceClient * > | ServiceClients |
You can add your publishers here to ask ROS2Interface to manage. More... | |
TMap< FString, UROS2ServiceServer * > | ServiceServers |
You can add your publishers here to ask ROS2Interface to manage. More... | |
TMap< FString, UROS2ActionClient * > | ActionClients |
You can add your publishers here to ask ROS2Interface to manage. More... | |
TMap< FString, UROS2ActionServer * > | ActionServers |
You can add your publishers here to ask ROS2Interface to manage. More... | |
Base Robot ROS 2 interface class.
This class owns ROS2Node and controls ROS 2 interfaces
Please create child class of this class to custom ROS2Interface which have your own ROS2Interfaces.
UCLASS(Blueprintable, EditInlineNew)
This class represents the base ROS 2 interface for a robot in the RapyutaSimulationPlugins module.
It provides functionality for initializing and managing ROS 2 nodes, publishers, subscribers, service clients, service servers, action clients, and action servers.
void URRBaseROS2Interface::BPInitialize | ( | ) |
AdditionalInitialization implemented in BP.
Child BP class can use this method to add initialization behaviour
void URRBaseROS2Interface::BPSetupROSParams | ( | ) |
Setup ROS params called after SetupROSParams. override by BP child class to config custom ROS 2 Interface's params.
|
virtual |
DeInitialize robot's ROS 2 interface by stopping publisher.
InRobot |
Reimplemented in URRRobotROS2Interface.
|
override |
Returns the properties used for network replication, this needs to be overridden by all actor classes with native.
replicated properties
OutLifetimeProps | Output lifetime properties |
|
virtual |
Initialize action clients.
Overidden in child robot ROS 2 interface classes for specialized action clients.
|
virtual |
Initialize action servers.
Overidden in child robot ROS 2 interface classes for specialized action servers.
|
virtual |
Initialize robot's ROS 2 interface by calling InitRobotROS2Node, InitPublishers, InitSubscriptions and ARRBaseRobot::InitSensors.
This method is mainly used by #ARRBaseoRbotROSController via ARRBaseRobot::InitROS2Interface.
InRobot |
Reimplemented in URRRobotROS2Interface.
|
virtual |
Init publishers, subscribers, service clients, service servers, action clients, and action servers.
Reimplemented in URRRobotROS2Interface.
|
virtual |
Initialize non sensor basic publishers such as odometry.
Overidden in child robot ROS 2 interface classes for specialized publishers.
Reimplemented in URRRobotROS2Interface.
|
virtual |
Spawn ROS2Node and initialize it.
InPawn |
|
virtual |
Spawn ROS2 Node, and initialize it if ROS2 Node = nullptr.
Owner |
Reimplemented in URRRobotROS2Interface.
|
virtual |
Initialize service clients.
Overidden in child robot ROS 2 interface classes for specialized services clients.
|
virtual |
Initialize service servers.
Overidden in child robot ROS 2 interface classes for specialized services servers.
|
virtual |
Initialize subscriptions for cmd_vel & joint_states topics.
Overidden in child robot ROS 2 interface classes for specialized topic subscriptions.
Reimplemented in URRRobotROS2Interface.
|
inlineoverridevirtual |
|
inlinevirtual |
Setup ROS Params, overridable by child classes to config custom ROS 2 Interface's params.
Reimplemented in URRTurtlebotROS2Interface.
|
inline |
|
virtual |
Stop all publishers.
TMap<FString, UROS2ActionClient*> URRBaseROS2Interface::ActionClients |
You can add your publishers here to ask ROS2Interface to manage.
Other option is to create child class to overwrite each method.
TMap<FString, UROS2ActionServer*> URRBaseROS2Interface::ActionServers |
You can add your publishers here to ask ROS2Interface to manage.
Other option is to create child class to overwrite each method.
FString URRBaseROS2Interface::DefautlROSNamespace = TEXT("") |
Defautl ROS namespace.
This is not used if robot spawn from ROS or Pawn is ARRBaseRobot
TMap<FString, UROS2Publisher*> URRBaseROS2Interface::Publishers |
You can add your publishers here to ask ROS2Interface to manage.
Other option is to create child class to overwrite each method.
TObjectPtr<UROS2NodeComponent> URRBaseROS2Interface::RobotROS2Node = nullptr |
ROS 2 node of this interface created by InitRobotROS2Node.
TObjectPtr<UROS2Spawnable> URRBaseROS2Interface::ROSSpawnParameters = nullptr |
ROS2SpawnParameters which is created when robot is spawn from /SpawnEntity srv provided by ASimulationState.
TMap<FString, UROS2ServiceClient*> URRBaseROS2Interface::ServiceClients |
You can add your publishers here to ask ROS2Interface to manage.
Other option is to create child class to overwrite each method.
TMap<FString, UROS2ServiceServer*> URRBaseROS2Interface::ServiceServers |
You can add your publishers here to ask ROS2Interface to manage.
Other option is to create child class to overwrite each method.
TMap<FString, UROS2Subscriber*> URRBaseROS2Interface::Subscribers |
You can add your subscribers here to ask ROS2Interface to manage.
Other option is to create child class to overwrite each method.