Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.

tf Python waitForTransform API documentation #229

Closed
@mitchallain

Description

@mitchallain

In the tf Python documentation, the Transformer.waitForTransform method lists that passing a value of rospy.Time() to the time parameter will "indicate present time".

time – time of the transformation, use rospy.Time() to indicate present time.

https://github.com/ros/geometry/blob/52ed78c8cf2891ae975fd5456fa91e9b4aad5c1a/tf/tf_python.rst
http://docs.ros.org/en/melodic/api/tf/html/python/tf_python.html

However, I believe the underlying BufferCore.walkToTopParent type will lookup the latest common time.

  //If getting the latest get the latest common time
  if (time == ros::Time())
  {
    int retval = getLatestCommonTime(target_id, source_id, time, error_string);
    if (retval != tf2_msgs::TF2Error::NO_ERROR)
    {
      return retval;
    }
  }

https://github.com/ros/geometry2/blob/c73b5939723db078c9bbe18523230ad54f859682/tf2/src/buffer_core.cpp#L330-L338

I understand that this tf Python API is older and somewhat deprecated in favor of tf2. But can we update this waitForTransform method documentation? Something like:

time – time of the transformation, use rospy.Time() to indicate latest common time.

If someone can confirm my understanding is correct, then I would be happy to open the PR for the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions