Skip to content

Add option to start simulator via docker#944

Merged
Turnlings merged 120 commits intomainfrom
939-add-option-to-start-simulator-via-docker
Feb 22, 2026
Merged

Add option to start simulator via docker#944
Turnlings merged 120 commits intomainfrom
939-add-option-to-start-simulator-via-docker

Conversation

@Turnlings
Copy link
Copy Markdown
Contributor

@Turnlings Turnlings commented Dec 31, 2025

Adds the option to start the simulator via docker from a modal opened under the "Advanced" navbar item.

Frontend

image

Modal allows for configuration of port and vehicle type, aswell as checkbox for connecting after start. There is some easy potential for adding the other parameters from DEVELOPMENT_GUIDE.md, but was starting to suffer a bit from scope creep I thought.

Features

  • Set port(s)
  • Set vehicle type (ArduCopter or ArduPlane)
  • Shows loading notification if the docker container has to be downloaded for the first time
  • Connect after start by waiting for "YOU CAN NOW CONNECT" message
  • Lots of error messages for docker exceptions

Notes

  • This feature is primarily developmental so will NOT be tested
  • This feature must be enabled under the "Experimental Developer Features" setting

Copilot AI review requested due to automatic review settings December 31, 2025 14:52
@Turnlings Turnlings linked an issue Dec 31, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functionality to start and stop an ArduPilot SITL (Software In The Loop) simulator via Docker from the GCS application. A button is added to the Advanced menu in the toolbar that allows users to start and stop the simulator container.

  • Adds a new Python endpoint module for Docker simulation control via SocketIO events
  • Implements Redux state management for tracking simulation status (Idle, Starting, Running)
  • Adds UI controls in the Advanced menu to start/stop the simulation

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
radio/requirements.txt Adds docker==7.1.0 dependency for Docker API integration
radio/app/endpoints/simulation.py New endpoint module with handlers for starting/stopping Docker containers
radio/app/endpoints/init.py Imports the new simulation endpoint module
gcs/src/redux/slices/droneConnectionSlice.js Adds simulation status state, actions, selectors, and emitters
gcs/src/redux/middleware/socketMiddleware.js Adds socket event handler for simulation_result messages
gcs/src/redux/middleware/emitters.js Implements emitters for start/stop simulation commands
gcs/src/components/toolbar/menus/advanced.jsx Adds UI button for starting/stopping simulation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread gcs/src/redux/slices/droneConnectionSlice.js Outdated
Comment thread gcs/src/redux/middleware/emitters.js Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread gcs/src/redux/slices/droneConnectionSlice.js Outdated
Comment thread gcs/src/redux/middleware/socketMiddleware.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/requirements.txt Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread radio/app/endpoints/simulation.py Outdated
@Turnlings
Copy link
Copy Markdown
Contributor Author

All these copilot comments are non-issues or over-engineering so as per meeting today, requesting a review.

@Turnlings Turnlings requested a review from a team February 16, 2026 20:38
NexInfinite
NexInfinite previously approved these changes Feb 16, 2026
Copy link
Copy Markdown
Contributor

@NexInfinite NexInfinite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, copilot is going crazy

Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll test locally tomorrow, but adding these comments for now.

Comment thread gcs/src/components/toolbar/simulationModal.jsx Outdated
Comment thread gcs/src/components/toolbar/simulationModal.jsx
Comment thread gcs/src/components/toolbar/simulationModal.jsx
Comment thread gcs/src/components/toolbar/simulationModal.jsx Outdated
Comment thread gcs/src/redux/slices/simulationParamsSlice.js Outdated
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py
Comment thread radio/app/endpoints/simulation.py Outdated
Comment thread radio/app/endpoints/simulation.py
Comment thread radio/app/endpoints/simulation.py Outdated
@1Blademaster
Copy link
Copy Markdown
Member

image

Can you swap this out for the trash icon, take a look at the mission item row for example

@1Blademaster
Copy link
Copy Markdown
Member

Can we somehow show the loading/connection modal (which shows connection progress) while connecting to the simulation?

@1Blademaster
Copy link
Copy Markdown
Member

1Blademaster commented Feb 17, 2026

Got to add a disconnect from the simulation if stopping the simulation and are still connected

@1Blademaster
Copy link
Copy Markdown
Member

image

Do we care about any ports other than 5760, 5762 and 5763? SITL doesn't open any others for access

@Turnlings
Copy link
Copy Markdown
Contributor Author

Do we care about any ports other than 5760, 5762 and 5763? SITL doesn't open any others for access

No I don't think we do, but what change do you suggest, limit to 3 port mappings?

@Turnlings
Copy link
Copy Markdown
Contributor Author

Can you swap this out for the trash icon, take a look at the mission item row for example

Done.

Can we somehow show the loading/connection modal (which shows connection progress) while connecting to the simulation?

Extracted the progress bar at the bottom of the connect menu to its own component and added it to the bottom of the simulation modal.

Got to add a disconnect from the simulation if stopping the simulation and are still connected

Done for if auto-connects after start, so will not work if simulation started and connected separately, but this will act the same as when container stopped from command line.

Do we care about any ports other than 5760, 5762 and 5763? SITL doesn't open any others for access

The added ports now start from 5762 rather than 5761 so first 3 ports if no changes made will be 5760, 5762, 57623.

Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big PR. Diffs look good to me and initial tests went smoothly. I think in the future we can ship a custom dockerfile so we don't have to pull from the internet.

@Turnlings Turnlings merged commit 41046dd into main Feb 22, 2026
8 checks passed
@Turnlings Turnlings deleted the 939-add-option-to-start-simulator-via-docker branch February 22, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to start simulator via docker

4 participants