Skip to content

fix(manager): terminate and reset sim when user app exits - #311

Closed
Rajratna-D wants to merge 1 commit into
JdeRobot:humble-develfrom
Rajratna-D:fix/terminate-exited-application
Closed

Rajratna-D wants to merge 1 commit into
JdeRobot:humble-develfrom
Rajratna-D:fix/terminate-exited-application

Conversation

@Rajratna-D

Copy link
Copy Markdown

Fixes #310

Summary

  • Add Manager.check_application_processes() and invoke it on each iteration of Manager.start() so that when state == "application_running" and all user application processes have exited (poll() is not None), self.terminate_application() is triggered automatically—pausing/resetting the simulation and transitioning back to tools_ready.
  • Skip stop_process_and_children() in on_terminate_application() for processes that have already exited (poll() is not None).
  • Add unit tests in test/test_application_crash_cleanup.py.

Verification

  • pytest test/test_application_crash_cleanup.py -v: 3 passed
  • black --check robotics_application_manager/manager/manager.py test/test_application_crash_cleanup.py: passed

Signed-off-by: Rajratna Dhiwar <dhiwarrajratna89@gmail.com>
@javizqh

javizqh commented Nov 28, 2026

Copy link
Copy Markdown
Member

Does not follow the contributor guidelines. Please follow them on the next PR

@javizqh javizqh closed this Nov 28, 2026
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.

Robot keeps moving and state stays application_running after user code crashes

2 participants