Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World model element member last_tf_timestamp in ROS 2 #105

Open
matthias-mayr opened this issue Mar 1, 2024 · 0 comments
Open

World model element member last_tf_timestamp in ROS 2 #105

matthias-mayr opened this issue Mar 1, 2024 · 0 comments
Labels
enhancement ROS 2 Issue affects ROS 2

Comments

@matthias-mayr
Copy link
Member

Let's start from the beginning:
In ROS 1 noetic we received a lot of warnings if the AauSpatialReasoner published TF information with the same timestamp.
To tackle that we introduced a _last_tf_timestamp member:
https://github.com/RVMI/skiros2/blob/ed5bc907f8509f8223bf5c75ff2b7bcf9ff056e7/skiros2_common/skiros2_common/core/world_element.py#L68

Which is used by the reasoner:

        now = self._node.get_clock().now()
        # Prohibits publishing with the same timestamp - triggers warning in noetic
        if e._last_tf_timestamp == now:
            return
        tf = e.getData(":TransformMsg")
        tf.header.stamp = now.to_msg()
        e._last_tf_timestamp = now

In ROS 2 we obviously use the rclpy.Time object and there were pickle errors when deep-copying it. Deep-copying is for example used when doing spatial transformations with the reasoner since that directly changes the element.
I tried to reproduce this pickle error, but it worked then to do the deep-copy.

If nobody else can reproduce this, one can at least check if we need to save the last tf timestamp in ROS 2. If not, we can just remove it.

@matthias-mayr matthias-mayr added enhancement ROS 2 Issue affects ROS 2 labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ROS 2 Issue affects ROS 2
Projects
None yet
Development

No branches or pull requests

1 participant