Skip to content

Commit 7912e22

Browse files
CSVSpawner and ROS2PoseControl update to 2505 (#137)
* CSVSpawner and ROS2PoseControl update to O3DE 2505 * Added missing Cmake dependencies * Version bump and compatibility marked --------- Signed-off-by: Norbert Prokopiuk <[email protected]>
1 parent 6668806 commit 7912e22

File tree

7 files changed

+20
-15
lines changed

7 files changed

+20
-15
lines changed

Gems/CsvSpawner/Code/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
127127
BUILD_DEPENDENCIES
128128
PUBLIC
129129
Gem::ROS2.Editor.Static
130+
Gem::LevelGeoreferencing.API
130131
AZ::AzToolsFramework
131132
${gem_name}.Private.Object
132133
)

Gems/CsvSpawner/Code/Source/CsvSpawner/CsvSpawnerCsvParser.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <AzCore/Math/Vector3.h>
1515
#include <AzCore/std/string/string.h>
1616
#include <AzFramework/Spawnable/SpawnableEntitiesInterface.h>
17-
#include <ROS2/Georeference/GeoreferenceBus.h>
17+
#include <Georeferencing/GeoreferenceBus.h>
1818
#include <csv/csv.hpp>
1919

2020
namespace CsvSpawner::CsvSpawnerUtils
@@ -84,13 +84,13 @@ namespace CsvSpawner::CsvSpawnerUtils
8484
}
8585
else if (isWGSCoordinates)
8686
{
87-
ROS2::WGS::WGS84Coordinate coordinate;
87+
Georeferencing::WGS::WGS84Coordinate coordinate;
8888
coordinate.m_latitude = row[index_lat.value()].get<double>();
8989
coordinate.m_longitude = row[index_lon.value()].get<double>();
9090
coordinate.m_altitude = row[index_alt.value()].get<double>();
9191
AZ::Vector3 coordinateInLevel = AZ::Vector3(-1);
92-
ROS2::GeoreferenceRequestsBus::BroadcastResult(
93-
coordinateInLevel, &ROS2::GeoreferenceRequests::ConvertFromWGS84ToLevel, coordinate);
92+
Georeferencing::GeoreferenceRequestsBus::BroadcastResult(
93+
coordinateInLevel, &Georeferencing::GeoreferenceRequests::ConvertFromWGS84ToLevel, coordinate);
9494
AZ_Printf(
9595
"TreeSpawnerEditorComponent",
9696
"Converted WGS84 coordinate to level coordinate: %f, %f, %f WGS84: %f, %f, %f\n",

Gems/CsvSpawner/gem.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"gem_name": "CsvSpawner",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"display_name": "CsvSpawner",
55
"license": "Apache-2.0",
66
"license_url": "https://opensource.org/licenses/Apache-2.0",
@@ -21,7 +21,8 @@
2121
"requirements": "Requires ROS2 Gem",
2222
"documentation_url": "",
2323
"dependencies": [
24-
"ROS2"
24+
"ROS2",
25+
"LevelGeoreferencing"
2526
],
2627
"repo_uri": "",
2728
"compatible_engines": [],

Gems/ROS2PoseControl/Code/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ ly_add_target(
5757
Gem::ImGui.Static
5858
Gem::ROS2.Static
5959
Gem::ROS2.API
60+
Gem::LevelGeoreferencing.API
6061
)
6162

6263
target_depends_on_ros2_packages(${gem_name}.Private.Object geometry_msgs)

Gems/ROS2PoseControl/Code/Source/Clients/ROS2PoseControl.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include <AzFramework/Physics/PhysicsScene.h>
2121
#include <AzFramework/Physics/PhysicsSystem.h>
2222
#include <AzFramework/Physics/SimulatedBodies/RigidBody.h>
23+
#include <Georeferencing/GeoreferenceBus.h>
2324
#include <LmbrCentral/Scripting/TagComponentBus.h>
2425
#include <ROS2/Frame/ROS2FrameComponent.h>
25-
#include <ROS2/Georeference/GeoreferenceBus.h>
2626
#include <ROS2/Utilities/ROS2Conversions.h>
2727
#include <ROS2/Utilities/ROS2Names.h>
2828
#include <RigidBodyComponent.h>
@@ -291,7 +291,7 @@ namespace ROS2PoseControl
291291
}
292292
bool isWGS = m_configuration.m_useWGS && msg->header.frame_id == "wgs84";
293293

294-
if (isWGS && !ROS2::GeoreferenceRequestsBus::HasHandlers())
294+
if (isWGS && !Georeferencing::GeoreferenceRequestsBus::HasHandlers())
295295
{
296296
AZ_Error(
297297
"ROS2PoseControl",
@@ -304,15 +304,16 @@ namespace ROS2PoseControl
304304

305305
if (isWGS)
306306
{
307-
ROS2::WGS::WGS84Coordinate coordinate;
307+
Georeferencing::WGS::WGS84Coordinate coordinate;
308308
AZ::Vector3 coordinateInLevel = AZ::Vector3(-1);
309309
AZ::Quaternion rotationInENU = AZ::Quaternion::CreateIdentity();
310310
coordinate.m_latitude = msg->pose.position.x;
311311
coordinate.m_longitude = msg->pose.position.y;
312312
coordinate.m_altitude = msg->pose.position.z;
313-
ROS2::GeoreferenceRequestsBus::BroadcastResult(rotationInENU, &ROS2::GeoreferenceRequests::GetRotationFromLevelToENU);
314-
ROS2::GeoreferenceRequestsBus::BroadcastResult(
315-
coordinateInLevel, &ROS2::GeoreferenceRequests::ConvertFromWGS84ToLevel, coordinate);
313+
Georeferencing::GeoreferenceRequestsBus::BroadcastResult(
314+
rotationInENU, &Georeferencing::GeoreferenceRequests::GetRotationFromLevelToENU);
315+
Georeferencing::GeoreferenceRequestsBus::BroadcastResult(
316+
coordinateInLevel, &Georeferencing::GeoreferenceRequests::ConvertFromWGS84ToLevel, coordinate);
316317

317318
rotationInENU =
318319
(rotationInENU.GetInverseFast() *

Gems/ROS2PoseControl/gem.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"gem_name": "ROS2PoseControl",
3-
"version": "2.0.0",
3+
"version": "3.0.0",
44
"display_name": "ROS2PoseControl",
55
"license": "Apache-2.0",
66
"license_url": "https://opensource.org/licenses/Apache-2.0",
@@ -22,6 +22,7 @@
2222
"documentation_url": "See the docs in the repo",
2323
"dependencies": [
2424
"ROS2",
25+
"LevelGeoreferencing",
2526
"ImGui"
2627
],
2728
"repo_uri": "",

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Note that this is not a "Canonical" part of O3DE - those gems are third-party co
88

99
| Gem name | Compatibility |
1010
| -------------------------- | --------------- |
11-
| **CsvSpawner** | incompatible |
11+
| **CsvSpawner** | compatible |
1212
| **DisableMainView** | not verified |
1313
| **ExposeConsoleToRos** | not verified |
1414
| **GeoJSONSpawner** | compatible |
@@ -22,7 +22,7 @@ Note that this is not a "Canonical" part of O3DE - those gems are third-party co
2222
| **RobotecSpectatorCamera** | not verified |
2323
| **RobotecSplineTools** | compatible |
2424
| **RobotecWatchdogTools** | not verified |
25-
| **ROS2PoseControl** | incompatible |
25+
| **ROS2PoseControl** | compatible |
2626
| **ROS2ScriptIntegration** | not verified |
2727
| **SensorDebug** | not verified |
2828
| **Smoothing** | not verified |

0 commit comments

Comments
 (0)