Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add generic interface to tf2
Signed-off-by: kyle-basis <kyle@basisrobotics.tech>
  • Loading branch information
kyle-basis authored Nov 11, 2024
commit eee73eba95caf5987f5703849f4250451cbc0b5f
33 changes: 33 additions & 0 deletions tf2/include/tf2/buffer_core_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ class BufferCoreInterface
* \return The transform between the frames.
*/
TF2_PUBLIC
virtual tf2::Transform
lookupTransformTf2(
const std::string & target_frame,
const std::string & source_frame,
const tf2::TimePoint & time) const = 0;

/**
* \brief Get the transform between two frames by frame ID.
* \param target_frame The frame to which data should be transformed.
* \param source_frame The frame where the data originated.
* \param time The time at which the value of the transform is desired (0 will get the latest).
* \return The transform between the frames as a ROS type.
*/
TF2_PUBLIC
virtual geometry_msgs::msg::TransformStamped
lookupTransform(
const std::string & target_frame,
Expand All @@ -84,6 +98,25 @@ class BufferCoreInterface
* \return The transform between the frames.
*/
TF2_PUBLIC
virtual tf2::Transform
lookupTransformTf2(
const std::string & target_frame,
const tf2::TimePoint & target_time,
const std::string & source_frame,
const tf2::TimePoint & source_time,
const std::string & fixed_frame) const = 0;

/**
* \brief Get the transform between two frames by frame ID assuming fixed frame.
* \param target_frame The frame to which data should be transformed.
* \param target_time The time to which the data should be transformed (0 will get the latest).
* \param source_frame The frame where the data originated.
* \param source_time The time at which the source_frame should be evaluated
* (0 will get the latest).
* \param fixed_frame The frame in which to assume the transform is constant in time.
* \return The transform between the frames as a ROS type.
*/
TF2_PUBLIC
virtual geometry_msgs::msg::TransformStamped
lookupTransform(
const std::string & target_frame,
Expand Down