Skip to content

Catching lookupTransform()#925

Open
moritzboeker wants to merge 1 commit intoros2:rollingfrom
moritzboeker:fix/buffer
Open

Catching lookupTransform()#925
moritzboeker wants to merge 1 commit intoros2:rollingfrom
moritzboeker:fix/buffer

Conversation

@moritzboeker
Copy link
Copy Markdown

@moritzboeker moritzboeker commented Apr 16, 2026

Description

We had a scenario, in which a point cloud had timestamps sometimes older than 10 seconds. This caused problems for the Spatio Temporal Voxel Layer, because when calling lookupTransform(), canTransform(), doTransform() it couldn't retrieve a transform for a point cloud this old since the tf buffer already timed out.

I didn't create an issue yet.
Fixes # (issue)

Did you use Generative AI?

Claude Code Sonnet 4.6

Additional Information

The original core dump was

#0  __pthread_kill_implementation (threadid=281472917954528, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x0000ffffba3a7670 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x0000ffffba35cb3c in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x0000ffffba347e00 in __GI_abort () at ./stdlib/abort.c:79
#4  0x0000ffffba5cd4d8 in __gnu_cxx::__verbose_terminate_handler() () from /lib/aarch64-linux-gnu/libstdc++.so.6
#5  0x0000ffffba5ca570 [PAC] in ?? () from /lib/aarch64-linux-gnu/libstdc++.so.6
#6  0x0000ffffba5c0e04 [PAC] in std::terminate() () from /lib/aarch64-linux-gnu/libstdc++.so.6
#7  0x0000ffffba5ca908 [PAC] in __cxa_throw () from /lib/aarch64-linux-gnu/libstdc++.so.6
#8  0x0000ffffb94ee804 [PAC] in tf2::BufferCore::lookupTransformImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, tf2::Transform&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >&) const () from /opt/ros/jazzy/lib/libtf2.so
#9  0x0000ffffb94ee86c [PAC] in tf2::BufferCore::lookupTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) const ()
   from /opt/ros/jazzy/lib/libtf2.so
#10 0x0000ffffb9410d08 [PAC] in tf2_ros::Buffer::waitForTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::chrono::duration<long, std::ratio<1l, 1000000000l> > const&, std::function<void (tf2_ros::TransformStampedFuture const&)>) () from /opt/ros/jazzy/lib/libtf2_ros.so
#11 0x0000ffff8af9ba80 [PAC] in ?? () from /opt/ros/jazzy/lib/libspatio_temporal_voxel_layer_core.so
#12 0x0000ffff8afc12fc [PAC] in ?? () from /opt/ros/jazzy/lib/libspatio_temporal_voxel_layer_core.so
#13 0x0000ffff8afac398 [PAC] in std::_Function_handler<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>), message_filters::Subscriber<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, rclcpp_lifecycle::LifecycleNode>::subscribe(rclcpp_lifecycle::LifecycleNode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rmw_qos_profile_s, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> >)::{lambda(std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>&&) () from /opt/ros/jazzy/lib/libspatio_temporal_voxel_layer_core.so
#14 0x0000ffff8afc826c [PAC] in std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(rclcpp::AnySubscriptionCallback<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, std::allocator<void> >::dispatch<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >(std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >, rclcpp::MessageInfo const&)::{lambda(auto:1&&)#1}&&, std::variant<std::function<void (sensor_msgs::msg::PointCloud2_<std::allocator<void> > const&)>, std::function<void (sensor_msgs::msg::PointCloud2_<std::allocator<void> > const&, rclcpp::MessageInfo const&)>, std::function<void (rclcpp::SerializedMessage const&)>, std::function<void (rclcpp::SerializedMessage const&, rclcpp::MessageInfo const&)>, std::function<void (std::unique_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::PointCloud2_<std::allocator<void> > > >)>, std::function<void (std::unique_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::PointCloud2_<std::allocator<void> > > >, rclcpp::MessageInfo const&)>, std::function<void (std::unique_ptr<rclcpp::SerializedMessage, std::default_delete<rclcpp::SerializedMessage> >)>, std::function<void (std::unique_ptr<rclcpp::SerializedMessage, std::default_delete<rclcpp::SerializedMessage> >, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const>)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const>, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const> const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const> const&, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const> const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const> const&, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage>)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage>, rclcpp::MessageInfo const&)> >&)>, std::integer_sequence<unsigned long, 8ul> >::__visit_invoke(rclcpp::AnySubscriptionCallback<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, std::allocator<void> >::dispatch<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >(std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >, rclcpp::MessageInfo const&)::{lambda(auto:1&&)#1}&&, std::variant<std::function<void (sensor_msgs::msg::PointCloud2_<std::allocator<void> > const&)>, std::function<void (sensor_msgs::msg::PointCloud2_<std::allocator<void> > const&, rclcpp::MessageInfo const&)>, std::function<void (rclcpp::SerializedMessage const&)>, std::function<void (rclcpp::SerializedMessage const&, rclcpp::MessageInfo const&)>, std::function<void (std::unique_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::PointCloud2_<std::allocator<void> > > >)>, std::function<void (std::unique_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::PointCloud2_<std::allocator<void> > > >, rclcpp::MessageInfo const&)>, std::function<void (std::unique_ptr<rclcpp::SerializedMessage, std::default_delete<rclcpp::SerializedMessage> >)>, std::function<void (std::unique_ptr<rclcpp::SerializedMessage, std::default_delete<rclcpp::SerializedMessage> >, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const>, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const>)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const>, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const> const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > const> const&, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const> const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage const> const&, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >)>, std::function<void (std::shared_ptr<sensor_msgs::msg::PointCloud2_<std::allocator<void> > >, rclcpp::MessageInfo const&)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage>)>, std::function<void (std::shared_ptr<rclcpp::SerializedMessage>, rclcpp::MessageInfo const&)> >&) () from /opt/ros/jazzy/lib/libspatio_temporal_voxel_layer_core.so
#15 0x0000ffff8afc1b00 [PAC] in ?? () from /opt/ros/jazzy/lib/libspatio_temporal_voxel_layer_core.so
#16 0x0000ffffbaa6bc38 [PAC] in rclcpp::Executor::execute_subscription(std::shared_ptr<rclcpp::SubscriptionBase>) () from /opt/ros/jazzy/lib/librclcpp.so
#17 0x0000ffffbaa6c9b4 [PAC] in rclcpp::Executor::execute_any_executable(rclcpp::AnyExecutable&) () from /opt/ros/jazzy/lib/librclcpp.so
#18 0x0000ffffbaa8164c [PAC] in rclcpp::executors::SingleThreadedExecutor::spin() () from /opt/ros/jazzy/lib/librclcpp.so
#19 0x0000ffffba601ae0 [PAC] in ?? () from /lib/aarch64-linux-gnu/libstdc++.so.6
#20 0x0000ffffba3a595c [PAC] in start_thread (arg=0x0) at ./nptl/pthread_create.c:447
#21 0x0000ffffba40b8dc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79

@moritzboeker moritzboeker changed the base branch from rolling to jazzy April 16, 2026 08:12
Copy link
Copy Markdown
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind to target rolling ? then I can backport this to older distros

@moritzboeker moritzboeker changed the base branch from jazzy to rolling April 16, 2026 10:51
@moritzboeker
Copy link
Copy Markdown
Author

Thank you, Alejandro. Sure, rebased it onto rolling a minute ago. Should I add a test to test_message_ filter.cpp?

@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Apr 16, 2026

Pulls: #925
Gist: https://gist.githubusercontent.com/ahcorde/bb0cb3a7850159871cb96a37351880c5/raw/5f8b49cfc31a2d7110a5f66574fb16e7cfe2da8a/ros2.repos
BUILD args: --packages-above-and-dependencies tf2_ros
TEST args: --packages-above tf2_ros
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18976

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Copy link
Copy Markdown
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moritzboeker
Copy link
Copy Markdown
Author

Yes, I will fix the error but not sure if I can take the time before my vacation.

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.

3 participants