Open 3D Engine ROS2 Gem API Reference 25.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ROS2::TFInterfaceRequests Class Referenceabstract

Inherited by ROS2::TFInterfaceTraits.

Public Member Functions

 AZ_RTTI (TFInterfaceRequests, TFInterfaceTypeId)
 
virtual AZ::Outcome< AZ::Transform, AZStd::string > GetTransform (const AZStd::string &source, const AZStd::string &target, const builtin_interfaces::msg::Time &time)=0
 
virtual AZ::Transform GetLatestTransform (const AZStd::string &source, const AZStd::string &target)=0
 
virtual void PublishTransform (const AZStd::string &source, const AZStd::string &target, const AZ::Transform &transform, bool isDynamic)=0
 

Member Function Documentation

◆ GetLatestTransform()

virtual AZ::Transform ROS2::TFInterfaceRequests::GetLatestTransform ( const AZStd::string &  source,
const AZStd::string &  target 
)
pure virtual

Gets the latest transform from source frame to target frame, using ROS tf2 library. This method does not require a specific time and will return the most recent transform available.

Parameters
source- source frame name
target- target frame name
Returns
AZ::Transform representing the latest transform from source to target frame. If the transform is not available, it will return an identity transform.
Note
This method is useful for scripting use-case

◆ GetTransform()

virtual AZ::Outcome< AZ::Transform, AZStd::string > ROS2::TFInterfaceRequests::GetTransform ( const AZStd::string &  source,
const AZStd::string &  target,
const builtin_interfaces::msg::Time &  time 
)
pure virtual

Gets transform from source frame to target frame, at given time using ROS tf2 library. If the transform is not available, it will return an error message.

Parameters
source- source frame name
target- target frame name
time- time to get the transform at, if not provided, uses most recent time
Returns
AZ::Outcome with transform if successful, or error message if failed

◆ PublishTransform()

virtual void ROS2::TFInterfaceRequests::PublishTransform ( const AZStd::string &  source,
const AZStd::string &  target,
const AZ::Transform &  transform,
bool  isDynamic 
)
pure virtual

Publishes a transform between source and target frames with current time stamp.

Parameters
source- source frame name
target- target frame name
transform- AZ::Transform representing the transformation from source to target frame
isDynamic- if true, the transform is dynamic and should be published continuously
Note
This method is useful for scripting use-case

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