Skip to content

fix(perception_2nodes): fix duplicate node names and TimeSynchronizer race in FPGA streamlined pipeline - #33

Open
prtmxio wants to merge 1 commit into
ros-acceleration:mainfrom
prtmxio:fix/issue-19-streamlined-node-name-collision
Open

fix(perception_2nodes): fix duplicate node names and TimeSynchronizer race in FPGA streamlined pipeline#33
prtmxio wants to merge 1 commit into
ros-acceleration:mainfrom
prtmxio:fix/issue-19-streamlined-node-name-collision

Conversation

@prtmxio

@prtmxio prtmxio commented Jul 31, 2026

Copy link
Copy Markdown

Problem

Fixes #19.

When launching trace_rectify_resize_fpga_streamlined.launch.py, the name= parameter on the Node() action injects a global
--ros-args -r __node:=<name> into the process. Since both RectifyNodeFPGAStreamlined and ResizeNodeFPGAStreamlined run in
the same executable and share the same global args, both nodes end up registering with the same ROS name. This triggers the
Publisher already registered warning and breaks camera_info delivery — one node's TimeSynchronizer starves, resulting in
only a handful of synced frames over several minutes.

Even after removing name= (as suggested in the comments), sync was still unreliable. The reason: MultiThreadedExecutor can
call the image and camera_info callbacks of the same node's message_filters::TimeSynchronizer from two threads
simultaneously. TimeSynchronizer is not thread-safe, so messages get silently dropped. The CPU reference
(rectify_resize_node.cpp) always used SingleThreadedExecutor — this wasn't accidental.

Changes

  • Remove name= from both trace_rectify_resize_fpga_streamlined launch files (non-XRT and XRT)
  • Use a separate rclcpp::NodeOptions() per node instead of a shared instance
  • Switch MultiThreadedExecutorSingleThreadedExecutor in both executables

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.

Topics '/camera/image_raw' and '/camera_info' do not appear to be synchronized

1 participant