One parameter world constructor for parallel scripts#155
Open
jonyMarino wants to merge 1 commit into
Open
Conversation
enables running script after scripts and multiple service-only scripts
❌ ProjectAirSim Self-Hosted CI
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enables running script after scripts and multiple service-only scripts
Fixes: #
About
This pull request introduces several new example scripts for controlling drones in a simulation and refactors the client and drone code to support "service-only" mode, where pub-sub topics are disabled if another topic client is already connected. The changes enable running multiple clients (e.g., for multi-vehicle scenarios)
New Example Scripts:
hello_drone_secondary.py, demonstrating how to fly a drone using only service calls (no topic subscriptions), intended for use as a secondary controller.two_drones_split_drone1.pyandtwo_drones_split_drone2.py, which show how to control two drones in a split fashion, with Drone1 loading the scene and Drone2 attaching to the existing world. These scripts illustrate proper usage of topics and service-only mode. [1] [2]Client Refactoring and Service-Only Mode Support:
ProjectAirSimClientclass now detects if a topic client is already connected and, if so, disables topic functionality for subsequent clients (service-only mode). Methods that interact with topics (subscribe, publish, unsubscribe, etc.) now check for this mode and log warnings when operations are skipped. [1] [2] [3] [4] [5] [6] [7]has_topic_client()andis_service_only_mode()methods to the client API for better control and diagnostics.Drone Sensor Topic Setup Improvements:
Drone.set_sensor_topics()to support passive discovery from cached topics if configuration is missing, and to log detailed diagnostics about the topic setup source and endpoints. This ensures drones can still function in service-only mode or when config is incomplete.These changes collectively make the system more robust for multi-client and multi-drone scenarios, and provide clear examples and error handling for users.
How Has This Been Tested?
local tests with scripts provided.
Screenshots and videos (if appropriate):