Skip to content

Fix FilePath service callbacks hanging in nvblox node#168

Open
shenfangqi123 wants to merge 1 commit into
NVIDIA-ISAAC-ROS:release-3.2from
shenfangqi123:fix-filepath-service-hang
Open

Fix FilePath service callbacks hanging in nvblox node#168
shenfangqi123 wants to merge 1 commit into
NVIDIA-ISAAC-ROS:release-3.2from
shenfangqi123:fix-filepath-service-hang

Conversation

@shenfangqi123

Copy link
Copy Markdown

Summary

This PR fixes FilePath-based services in NvbloxNode hanging indefinitely when called from ROS 2.

In release-3.2, services such as save_map, save_rates, and save_ply can enter their callbacks, but the ROS 2 client may never receive a response. During debugging, it was observed that FilePath service requests could block while waiting for queued work to complete, causing the service call to hang indefinitely in a component container setup.

This change:

  • Uses explicit 3-argument service callbacks for FilePath services.
  • Executes FilePath save/load operations directly in the service callbacks.
  • Avoids waiting on queued work from within the service callback.

Testing

Tested with Isaac ROS Nvblox release-3.2 using component_container_isolated.

Before this change:

  • /nvblox_node/save_rates hangs indefinitely
  • /nvblox_node/save_map hangs indefinitely
  • /nvblox_node/save_ply hangs indefinitely

After this change:

  • save_rates returns success=True
  • save_map returns success=True and successfully writes a .nvblx file
  • save_ply returns normally instead of hanging

Test Commands

ros2 service call /nvblox_node/save_rates \
nvblox_msgs/srv/FilePath \
"{file_path: '/tmp/rates.txt'}"

ros2 service call /nvblox_node/save_map \
nvblox_msgs/srv/FilePath \
"{file_path: '/workspace/.../test.nvblx'}"

ros2 service call /nvblox_node/save_ply \
nvblox_msgs/srv/FilePath \
"{file_path: '/workspace/.../test.ply'}"

Reproduction

The issue can be reproduced with:

ros2 service call /nvblox_node/save_rates \
nvblox_msgs/srv/FilePath \
"{file_path: '/tmp/rates.txt'}"

ros2 service call /nvblox_node/save_map \
nvblox_msgs/srv/FilePath \
"{file_path: '/tmp/test.nvblx'}"

ros2 service call /nvblox_node/save_ply \
nvblox_msgs/srv/FilePath \
"{file_path: '/tmp/test.ply'}"

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