Skip to content

Refactor API#5

Open
qthibeault wants to merge 80 commits into
mainfrom
refactor
Open

Refactor API#5
qthibeault wants to merge 80 commits into
mainfrom
refactor

Conversation

@qthibeault

Copy link
Copy Markdown
Contributor

Update API to improve ergonomics. The objective of these changes is to make it easier to define new components, and extend existing components without compromising functionality.

These changes introduce several async functions which enable container monitoring during interaction. Monitoring is a major feature we are excited to include because it ensures that component failures can effectively interrupt the simulations instead of causing other components to idle forever when their data sources are no longer running.

qthibeault added 30 commits May 13, 2026 12:07
Implementations can use these options rather than needing to re-define
them per module
Components are now uniquely identified and are used to index into the
simulation to interact with running members. Interaction is achieved
through asyncio co-processes, and components can list their dependencies
that must remain running when interacting with the component.
Run is implemented as a context manager to handle simulation start and
stop automatically
Bakefile integrates more tightly with Docker than makefiles and provides
a more ergonomic experience
These contexts are defined in the bakefile and allow us to define
intermediate images without tagging them
Instead of copying multicosim files to an intermediate image and then
installing, we mount the context and install directly from that,
reducing the number of dockerfile instructions
Psy-taliro is outside the scope of this project and is not used in any
examples. Nox depends on a more recent version of attrs so we remove the
dependency on psy-taliro
Create test session that runs test module against python version matrix
Instead of setting the version in both the pyproject and __version__
attribute, dynamically populate __version__ using importlib.metadata
By using a uv workspace we ensure the compatibility between both
container programs and the multicosim library. This also allows us to
more easily manage the development environment
Since sub-programs are now workspace members, they do not have their own
lockfiles and must use the top-level one.
qthibeault added 30 commits June 1, 2026 14:26
Rather than raise an exception, return a value from the coroutine that
monitors a component's dependencies. This way we can raise the exception
on the main thread and a value will be returned from both coroutines
which satisfies the type checker.
Change workflow definitions to hopefully speed up execution by avoiding
downloading Python too many times.
Using numeric values for Python versions causes trailing zeros to be
dropped (i.e. 3.10 -> 3.1) which may refer to version that no longer
exist.
Resolve MyPy error about duplicate rover.py module. Make roverctl
executable for ease of use. Previous organization was to avoid
installing unnecessary modules into the virtual environment (which uv
doesn't do) and avoid Gazebo import errors (which we have confined to
the vehicles module).
This allows us to share dependency versions with workspace members and
avoid having to specify version ranges multiple times. This also
installs workspace members in editable mode to avoid code duplication.
Refactor rover example inputs to accept more options as command-line
arguments. Refactor rover control messages to support pickling. Create
more stubs to ensure roverctl package type-checks. Update docker
bakefile to build rover controller image from root context. Refactor
gazebo module to generate world name when constructed.
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