#include <ROS2FrameComponent.h>
Inherits AZ::Component, and AZ::TickBus::Handler.
Public Member Functions | |
AZ_COMPONENT (ROS2FrameComponent, "{EE743472-3E25-41EA-961B-14096AC1D66F}") | |
ROS2FrameComponent (const AZStd::string &frameId) | |
Initialize to a specific frame id. | |
void | Activate () override |
void | Deactivate () override |
AZStd::string | GetFrameID () const |
void | SetFrameID (const AZStd::string &frameId) |
Set a above-mentioned frame id. | |
AZ::Name | GetJointName () const |
void | SetJointName (const AZStd::string &jointNameString) |
AZStd::string | GetNamespace () const |
AZ::Transform | GetFrameTransform () const |
AZStd::string | GetGlobalFrameName () const |
void | UpdateNamespaceConfiguration (const AZStd::string &ns, NamespaceConfiguration::NamespaceStrategy strategy) |
This component marks an interesting reference frame for ROS2 ecosystem. It serves as sensor data frame of reference and is responsible, through ROS2Transform, for publishing ros2 static and dynamic transforms (/tf_static, /tf). It also facilitates namespace handling. An entity can only have a single ROS2Frame on each level. Many ROS2 Components require this component.
AZStd::string ROS2::ROS2FrameComponent::GetFrameID | ( | ) | const |
Get a frame id, which is needed for any ROS2 message with a Header
AZ::Transform ROS2::ROS2FrameComponent::GetFrameTransform | ( | ) | const |
Get a transform between this frame and the next frame up in hierarchy.
AZStd::string ROS2::ROS2FrameComponent::GetGlobalFrameName | ( | ) | const |
Global frame name in ros2 ecosystem.
AZ::Name ROS2::ROS2FrameComponent::GetJointName | ( | ) | const |
Get the joint name including the namespace
AZStd::string ROS2::ROS2FrameComponent::GetNamespace | ( | ) | const |
Get a namespace, which should be used for any publisher or subscriber in the same entity.
void ROS2::ROS2FrameComponent::SetJointName | ( | const AZStd::string & | jointNameString | ) |
Set the joint name
jointNameString | does not include the namespace. The namespace prefix is added automatically. |
void ROS2::ROS2FrameComponent::UpdateNamespaceConfiguration | ( | const AZStd::string & | ns, |
NamespaceConfiguration::NamespaceStrategy | strategy | ||
) |
Updates the namespace and namespace strategy of the underlying namespace configuration
ns | Namespace to set. |
strategy | Namespace strategy to use. |