-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added GeoJSONSpawner Gem #93
Open
patrykantosz
wants to merge
19
commits into
main
Choose a base branch
from
pantosz/geojson_spawner
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2,587
−0
Conversation
This file contains 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
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
*additionaly added separated struct with configuration Signed-off-by: Patryk Antosz <[email protected]>
*code refactored *added new required field to the json schema (id) Signed-off-by: Patryk Antosz <[email protected]>
*splited into Editor and Game Components *added randomization (based on the configuration) *works in the Editor and in the GameLauncher Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
*changed used `find` function from AZStd::find to AZStd::unordered_set::find Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
wc-robotec
approved these changes
Dec 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine. Code looks good.
wc-robotec
reviewed
Dec 3, 2024
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.cpp
Show resolved
Hide resolved
pijaro
requested changes
Dec 5, 2024
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/SubscriptionHandler.h
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/SubscriptionHandler.h
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.h
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
michalpelka
reviewed
Dec 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1st round of comments from me. I would not merge at is it, but it is close.
I would consider:
- break it to second Gem : 1st core with C++/Lua API, 2nd with ROS2 integration (can be done in other PR)
- Some form of tests since there is a lot of logic.
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Include/GeoJSONSpawner/GeoJSONSpawnerBus.h
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerUtils.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.h
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerComponent.h
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/GeoJSONSpawnerEditorComponent.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.cpp
Outdated
Show resolved
Hide resolved
Gems/GeoJSONSpawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2Interface.h
Outdated
Show resolved
Hide resolved
...wner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2InterfaceEditorComponent.cpp
Outdated
Show resolved
Hide resolved
...wner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2InterfaceEditorComponent.cpp
Outdated
Show resolved
Hide resolved
...pawner/Code/Source/GeoJSONSpawner/ROS2Interface/GeoJSONSpawnerROS2InterfaceEditorComponent.h
Outdated
Show resolved
Hide resolved
*ROS2 handlers will be moved to new gem *added simple state queue to properly handle spawn/despawn requests Signed-off-by: Patryk Antosz <[email protected]>
patrykantosz
force-pushed
the
pantosz/geojson_spawner
branch
from
December 10, 2024 12:37
61eb3d5
to
17cb098
Compare
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
Signed-off-by: Patryk Antosz <[email protected]>
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.
This PR adds a new gem - GeoJSONSpawner. This gem provides a GeoJSONSpawner component that allows to:
In the Editor all operations can only be done via the file that is loaded into the component (similar to the CsvSpawner) - this file is then read again by the Game component to spawn entities at exactly the same locations (I had some problems with copying the exact logic from the CsvSpawner, so GeoJSONSpawner reads the file again when GL is started).
As said, GL reads the associated file at the startup, then all operations are available via the EBuses.
Using GeoJSONSpawnerROS2 Gem it is possible to use GeoJSONSpawner in runtime via the ROS 2 interface.
Since the GeoJSON standard only provides longitude and latitude information by default (and all online editors that I've seen follow it) I decided to set the desired altitude in the
Spawnable Asset Configuration
as theRaytrace starting height
(probably this is not the best name for a value used in a way, that is described later). The use of this value depends on thePlace on terrain
switch - if the switch is set to true, theRaytrace starting height
value is used as the name suggests - raytracing starts at that height. Otherwise, if the switch is set to false, this value is just a Z-axis coordinate at which the prefab will be spawned.Usage description is available in the README.