Skip to content

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