#include <NamespaceConfiguration.h>
|
|
static void | Reflect (AZ::ReflectContext *context) |
| |
Configuration for handling of namespaces. Namespaces are useful for various ROS2 components. This structure encapsulates the namespace itself, composing namespaces and context-dependent default values.
- Note
- This structure is handled through ROS2FrameComponent.
◆ NamespaceStrategy
A choice of methods to handle namespaces.
- Note
- Top level ROS2FrameComponent will likely be associated with an interesting object (robot). For multi-robot simulations, namespaces are often derived from the robot name itself. For this reason, the default behavior for top level ROS2FrameComponent is to generate the namespace from entity name.
| Enumerator |
|---|
| Default | FromEntityName for top-level frames, Empty otherwise.
|
| Empty | An empty, blank namespace.
|
| FromEntityName | Generate from Entity name, but substitute disallowed characters through RosifyName.
|
| Custom | Non-empty and based on user-provided value.
|
◆ GetNamespace() [1/2]
| AZStd::string ROS2::NamespaceConfiguration::GetNamespace |
( |
| ) |
const |
Get the namespace of the frame, based on the parent namespace from the ROS2FrameSystemComponent.
- Returns
- namespace of the frame.
◆ GetNamespace() [2/2]
| AZStd::string ROS2::NamespaceConfiguration::GetNamespace |
( |
const AZStd::string & | parentNamespace | ) |
const |
Get the namespace of the frame, based on the provided namespace.
- Parameters
-
| parentNamespace | namespace of the parent frame. |
- Returns
- namespace of the frame.
◆ Init()
| void ROS2::NamespaceConfiguration::Init |
( |
| ) |
|
Initializes the namespace configuration. This function should be called in the Init functions of frame components.
◆ PopulateNamespace()
| void ROS2::NamespaceConfiguration::PopulateNamespace |
( |
bool | isRoot, |
|
|
const AZStd::string & | entityName ) |
Set namespace based on context.
- Parameters
-
| isRoot | Whether or not the namespace belongs to top-level entity in the entity hierarchy. |
| entityName | Raw (not ros-ified) name of the entity to which the namespace belongs. |
◆ SetNamespace()
| void ROS2::NamespaceConfiguration::SetNamespace |
( |
const AZStd::string & | ros2Namespace, |
|
|
NamespaceStrategy | strategy ) |
Update namespace and strategy.
- Parameters
-
| ros2Namespace | Desired namespace. |
| strategy | Namespace strategy. |
◆ SetParentNamespace()
| void ROS2::NamespaceConfiguration::SetParentNamespace |
( |
const AZStd::string & | parentNamespace | ) |
|
Update the parents namespace.
- Parameters
-
| parentNamespace | parent namespace. |
The documentation for this struct was generated from the following file:
- Gems/ROS2/Code/Include/ROS2/Frame/NamespaceConfiguration.h