Skip to content

fix: gnb power pluginand ue power plugin working with oai/ change to … - #17

Open
phine-richiB wants to merge 2 commits into
mainfrom
fix/power_buttons
Open

phine-richiB wants to merge 2 commits into
mainfrom
fix/power_buttons

Conversation

@phine-richiB

@phine-richiB phine-richiB commented Jun 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Refactored the UePowerPlugin and gNBPowerPlugin GUI plugins to resolve critical Gazebo UI freezing (thread starvation) and status flickering issues. The previous synchronous implementation using popen to execute docker exec commands was blocking the main GUI thread, causing heavy log delays and unresponsiveness.

This PR introduces an asynchronous, file-based polling architecture. Docker background commands now instantly dump process statuses to temporary files (/tmp/*_pids.txt), which the C++ backend reads instantly. Additionally, a tick-based cooldown/debounce mechanism was added to prevent the UI from flickering between states while Docker containers are spinning up or shutting down.

Changelog

[Changed]:

  • For free5gc changed t3512Value in amf config for UE deallocation

  • Replaced synchronous popen Docker calls with asynchronous background execution (&) to completely eliminate Gazebo GUI thread starvation and freezing.

  • Refactored Docker process tracking to use atomic file-based polling (writing to /tmp/ue_*_pids.txt and /tmp/gnb_*_pids.txt) for instant, non-blocking C++ parsing.

[Fixed]:

  • Fixed UI red/green flickering during start/stop transitions by implementing a tick-based debounce/cooldown mechanism (skip_checks_count and failed_checks).

  • Fixed process name truncation and shell-escaping bugs by using ps -eo pid,stat,args and performing the zombie-process (Z) filtering directly in C++ rather than relying on brittle bash pipes.

  • Fixed gNBPowerPlugin build errors by properly declaring tracking integers in the .hh header file.

[Limitations]:

  • in free5gc demo, rviz cannot continue to stream data after UE has been switched off and then on again. This is due to the fact that the UE gets a different IP address since its assignation is dynamic and not static. Solving this should solve the bug
  • after the first connection the buttons are for 1 second red (UE and gNB inactive) but then everything works properly

Checklist

  • Code is tested and passes locally
  • Documentation is updated if needed
  • Follows code style and guidelines [Lint, Guidelines and co will follow if not existing]

@phine-richiB
phine-richiB requested a review from phine-lukas June 19, 2026 10:53
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