Ros2BufferCore#
Fully qualified name: isaacsim::ros2::tf_viewer::Ros2BufferCore
-
class Ros2BufferCore#
Class that partially implements a tf2
BufferCore.This abstract class provides an interface for tf2 buffer operations such as setting transforms, retrieving transforms, and querying frame information. It serves as a compatibility layer for working with ROS 2 tf2 functionality.
Subclassed by isaacsim::ros2::tf_viewer::Ros2BufferCoreImpl
Public Functions
- virtual bool setTransform(
- void *msg,
- const std::string &authority,
- bool isStatic,
Adds a transform information to the buffer.
This function takes a ROS TFMessage and stores the transform information in the buffer for later retrieval.
- Parameters:
msg – [in]
TFMessagemessage pointer.authority – [in] The source of the information for the transform.
isStatic – [in] Whether to record the transform as static (the transform will be good across all time).
- Returns:
Whether the transform has been added successfully.
- virtual bool getTransform(
- const std::string &targetFrame,
- const std::string &sourceFrame,
- double translation[],
- double rotation[],
Gets the transform between two frames at the ROS zero time.
Calculates and retrieves the coordinate transformation between two frames in the tf tree at the ROS zero time.
- Parameters:
targetFrame – [in] Frame ID to which data should be transformed.
sourceFrame – [in] Frame ID where the data originated.
translation – [out] Buffer to store the Cartesian translation. Buffer length should be 3.
rotation – [out] Buffer to store the rotation (as quaternion: xyzw). Buffer length should be 4.
- Returns:
Whether the transform has been computed without exceptions.
- virtual bool getParentFrame( ) = 0#
Gets the parent frame of the specified frame at the ROS zero time.
Retrieves the parent frame ID for a given frame in the tf tree.
- Parameters:
frame – [in] Frame ID to search for.
parentFrame – [out] Reference in which the parent frame ID will be stored.
- Returns:
True if a parent exists, false otherwise.
-
virtual std::vector<std::string> getFrames() = 0#
Gets the available frame IDs.
Retrieves a list of all frame IDs currently available in the tf tree.
- Returns:
A list of available frame IDs.
-
virtual void clear() = 0#
Clears all buffer data.
Removes all transformations and frames from the buffer.