Skip to content

Python support - #4

Merged
fmrico merged 2 commits into
rollingfrom
python_support
Aug 16, 2026
Merged

fmrico merged 2 commits into
rollingfrom
python_support

Conversation

@fmrico

@fmrico fmrico commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Hi,

This PR adds Python support for creating missions and manage the fleet

Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
Copilot AI lite review requested due to automatic review settings August 16, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds ROS 2 Python (ament_python) support by introducing a new Python “mission manager” package that mirrors the existing C++ APIs (FleetSession/RobotHandle/SimpleController) and a Python-based example deployment/mission script that reuses the existing scenario assets.

Changes:

  • Introduces easyfleet_mission_manager_py, a Python implementation of capability discovery, action-client orchestration, robot handles, and RViz status markers.
  • Adds a pytest-based test suite (including a fake nav capability process) plus ament linters for the new Python package(s).
  • Adds easyfleet_easynav_collaboration_simple_api_deployment_py, a Python mission-controller mirror deployment with a YAML launch file and a scripted mission.

Reviewed changes

Copilot reviewed 37 out of 42 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
easyfleet_mission_manager_py/test/test_xmllint.py Adds ament xmllint test for the Python package.
easyfleet_mission_manager_py/test/test_throttle.py Unit tests for the new Throttle helper.
easyfleet_mission_manager_py/test/test_pep257.py Adds ament pep257 linter test.
easyfleet_mission_manager_py/test/test_nav_fake_capability.py Provides a minimal fake navigation action server for integration tests.
easyfleet_mission_manager_py/test/test_fleet_session_shutdown.py Tests FleetSession shutdown behavior with rclpy context invalidation.
easyfleet_mission_manager_py/test/test_fleet_session_robot_handle.py End-to-end integration tests for FleetSession/RobotHandle/SimpleController.
easyfleet_mission_manager_py/test/test_flake8.py Adds ament flake8 linter test.
easyfleet_mission_manager_py/test/test_copyright.py Adds ament copyright linter test.
easyfleet_mission_manager_py/test/test_capability_state.py Unit tests for CapabilityState string conversion.
easyfleet_mission_manager_py/test/test_capability_discovery.py Integration tests for capability discovery over ROS topics.
easyfleet_mission_manager_py/test/init.py Marks test directory as a package for relative imports.
easyfleet_mission_manager_py/setup.py Declares the new Python package for installation.
easyfleet_mission_manager_py/setup.cfg Configures script install locations for ament_python.
easyfleet_mission_manager_py/resource/easyfleet_mission_manager_py Registers the package resource for the ament index.
easyfleet_mission_manager_py/package.xml Declares ROS/package dependencies and test dependencies.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/throttle.py Adds a thread-safe minimum-interval rate limiter.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/status_markers.py Publishes RViz status markers for robot mission status.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/simple_controller.py Adds a minimal controller wrapper around FleetSession.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/robot_handle.py Implements RobotHandle for running/stopping capabilities and tracking state.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/output.py Adds serialized printing for multi-threaded output.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/mission_helpers.py Adds common goal builders, feedback printers, and helper utilities.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/fleet_session.py Implements FleetSession with background executor spinning and heartbeat handling.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/detail/running_capability.py Tracks per-capability in-flight goals and timeouts, maps outcomes to states.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/detail/init.py Initializes the internal detail package.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/capability_state.py Defines CapabilityState enum and string conversion helper.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/capability_info.py Defines CapabilityInfo and pretty-printers for discovery output.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/capability_discovery.py Implements discovery of capabilities via /capabilities and /capabilities_status.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/capability_client.py Implements an ActionClient wrapper with outcome normalization and cancel handling.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/ansi.py Provides ANSI formatting constants for terminal output.
easyfleet_mission_manager_py/easyfleet_mission_manager_py/init.py Exposes the public Python API surface for the new package.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/test/test_xmllint.py Adds ament xmllint test for the example Python deployment package.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/test/test_pep257.py Adds ament pep257 linter test for the deployment package.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/test/test_flake8.py Adds ament flake8 linter test for the deployment package.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/test/test_copyright.py Adds ament copyright test for the deployment package.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/test/init.py Marks deployment tests as a package.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/setup.py Declares the deployment Python package and console entry point.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/setup.cfg Configures script install locations for ament_python.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/resource/easyfleet_easynav_collaboration_simple_api_deployment_py Registers the deployment package resource for the ament index.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/package.xml Declares ROS/package dependencies for the deployment and its tests.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/launch/easynav_collaboration_launch.yaml Launches the scenario but swaps in the Python mission controller node.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/easyfleet_easynav_collaboration_simple_api_deployment_py/mission.py Implements the Python mission choreography against the new API.
easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment_py/easyfleet_easynav_collaboration_simple_api_deployment_py/init.py Initializes the deployment Python package.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +35 to +40
def _spin_in_background(executor) -> threading.Thread:
thread = threading.Thread(target=executor.spin, daemon=True)
thread.start()
while not executor.is_spinning:
pass
return thread
Comment thread easyfleet_mission_manager_py/easyfleet_mission_manager_py/capability_state.py Outdated
Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
@fmrico
fmrico merged commit a6a5fcb into rolling Aug 16, 2026
1 check passed
@fmrico
fmrico deleted the python_support branch August 16, 2026 11:37
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.

2 participants