Skip to content

Conversation

@Nisarg236
Copy link

@Nisarg236 Nisarg236 commented Dec 22, 2025

Issue
Before, the join was called in the main thread. So when cancel is running, it will block other callbacks like odom callback from running. When cancel is running, the controller relies on odom callback to check if the robot is stopped and then it returns cancel. But as odom is not updated, the cancel keeps running.

After this change, it moves the block that runs cancel and updates the slot in a function and this function is called in a separate thread. So it does not block the main thread. I tested this by sending a goal with a different controller when cancel from one controller is running, and it seems to work. The next goal is executed after the first one is cancelled and the callbacks keep running in parallel.

@Nisarg236 Nisarg236 marked this pull request as ready for review December 22, 2025 10:17
@Nisarg236 Nisarg236 changed the title fix: main thread is blocked when canceling an execution (#15) fix: main thread is blocked when canceling an execution Dec 23, 2025
@amock amock added the ros1 PRs that target the ROS1 version of move base flex label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ros1 PRs that target the ROS1 version of move base flex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants