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

bug fix, to ensure that the timestamp comparison works with rosbags. #133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dev10110
Copy link

To get the latest transform, originally the code was

if (timestamp == rclcpp::Time(0) {
    ...
}

However, when using rclcpp::Time(0), it automatically sets the clock_type to RCL_SYSTEM_TIME but if we are using a rosbag, the messages are coming on clock_type RCL_ROS_TIME this means that the equality check fails. so instead, we explicitly construct a time that has the same clocktype as the timestamp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant