Skip to content

Commit 3ffada1

Browse files
authored
Added wheel animation tool (#143)
* Added wheel animation tool * Udpated license to Apache 2.0 Signed-off-by: Michał Pełka <[email protected]>
1 parent 5c319ec commit 3ffada1

32 files changed

+1370
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ Gems/ROS2ScriptIntegration @jhanca-robotecai @MateuszWasilewski @michalpelka
2020
Gems/SensorDebug @jhanca-robotecai @MateuszWasilewski @michalpelka
2121
Gems/Smoothing @michalpelka @w-czerski @pijaro
2222
Gems/ViewportStreamer @lawendah @patrykantosz
23+
Gems/WheelAnimTool @michalpelka @jhanca-robotecai

Gems/WheelAnimTool/.gitignore

Whitespace-only changes.

Gems/WheelAnimTool/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
o3de_gem_setup("WheelAnimTool")
17+
18+
ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
19+
20+
add_subdirectory(Code)
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
# Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR}
17+
# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
18+
# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
19+
# in which case it will see if that platform is present here or in the restricted folder.
20+
# i.e. It could here in our gem : Gems/WheelAnimTool/Code/Platform/<platorm_name> or
21+
# <restricted_folder>/<platform_name>/Gems/WheelAnimTool/Code
22+
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
23+
24+
# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
25+
# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
26+
# is supported by this platform.
27+
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
28+
29+
# Check to see if building the Gem Modules are supported for the current platform
30+
if(NOT PAL_TRAIT_WHEELANIMTOOL_SUPPORTED)
31+
return()
32+
endif()
33+
34+
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
35+
36+
# The ${gem_name}.API target declares the common interface that users of this gem should depend on in their targets
37+
ly_add_target(
38+
NAME ${gem_name}.API INTERFACE
39+
NAMESPACE Gem
40+
FILES_CMAKE
41+
wheelanimtool_api_files.cmake
42+
${pal_dir}/wheelanimtool_api_files.cmake
43+
INCLUDE_DIRECTORIES
44+
INTERFACE
45+
Include
46+
BUILD_DEPENDENCIES
47+
INTERFACE
48+
AZ::AzCore
49+
)
50+
51+
# The ${gem_name}.Private.Object target is an internal target
52+
# It should not be used outside of this Gems CMakeLists.txt
53+
ly_add_target(
54+
NAME ${gem_name}.Private.Object STATIC
55+
NAMESPACE Gem
56+
FILES_CMAKE
57+
wheelanimtool_private_files.cmake
58+
${pal_dir}/wheelanimtool_private_files.cmake
59+
TARGET_PROPERTIES
60+
O3DE_PRIVATE_TARGET TRUE
61+
INCLUDE_DIRECTORIES
62+
PRIVATE
63+
Include
64+
Source
65+
BUILD_DEPENDENCIES
66+
PUBLIC
67+
AZ::AzCore
68+
AZ::AzFramework
69+
Gem::Atom_RPI.Public
70+
71+
)
72+
target_link_libraries(${gem_name}.Private.Object PRIVATE Eigen3::Eigen)
73+
74+
# Here add ${gem_name} target, it depends on the Private Object library and Public API interface
75+
ly_add_target(
76+
NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
77+
NAMESPACE Gem
78+
FILES_CMAKE
79+
wheelanimtool_shared_files.cmake
80+
${pal_dir}/wheelanimtool_shared_files.cmake
81+
INCLUDE_DIRECTORIES
82+
PUBLIC
83+
Include
84+
PRIVATE
85+
Source
86+
BUILD_DEPENDENCIES
87+
PUBLIC
88+
Gem::${gem_name}.API
89+
PRIVATE
90+
Gem::${gem_name}.Private.Object
91+
)
92+
93+
# Include the gem name into the Client Module source file
94+
# for use with the AZ_DECLARE_MODULE_CLASS macro
95+
# This is to allow renaming of the gem to also cause
96+
# the CreateModuleClass_Gem_<gem-name> function which
97+
# is used to bootstrap the gem in monolithic builds to link to the new gem name
98+
ly_add_source_properties(
99+
SOURCES
100+
Source/Clients/WheelAnimToolModule.cpp
101+
PROPERTY COMPILE_DEFINITIONS
102+
VALUES
103+
O3DE_GEM_NAME=${gem_name}
104+
O3DE_GEM_VERSION=${gem_version})
105+
106+
# By default, we will specify that the above target ${gem_name} would be used by
107+
# Client and Server type targets when this gem is enabled. If you don't want it
108+
# active in Clients or Servers by default, delete one of both of the following lines:
109+
ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
110+
ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
111+
ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
112+
113+
# For the Client and Server variants of ${gem_name} Gem, an alias to the ${gem_name}.API target will be made
114+
ly_create_alias(NAME ${gem_name}.Clients.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
115+
ly_create_alias(NAME ${gem_name}.Servers.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
116+
ly_create_alias(NAME ${gem_name}.Unified.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
117+
118+
# Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
119+
# for the Clients, Servers, Unified gem variants
120+
o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Clients Servers Unified)
121+
122+
# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor MODULE target
123+
if(PAL_TRAIT_BUILD_HOST_TOOLS)
124+
# The ${gem_name}.Editor.API target can be used by other gems that want to interact with the ${gem_name}.Editor module
125+
ly_add_target(
126+
NAME ${gem_name}.Editor.API INTERFACE
127+
NAMESPACE Gem
128+
FILES_CMAKE
129+
wheelanimtool_editor_api_files.cmake
130+
${pal_dir}/wheelanimtool_editor_api_files.cmake
131+
INCLUDE_DIRECTORIES
132+
INTERFACE
133+
Include
134+
BUILD_DEPENDENCIES
135+
INTERFACE
136+
AZ::AzToolsFramework
137+
)
138+
139+
# The ${gem_name}.Editor.Private.Object target is an internal target
140+
# which is only to be used by this gems CMakeLists.txt and any subdirectories
141+
# Other gems should not use this target
142+
ly_add_target(
143+
NAME ${gem_name}.Editor.Private.Object STATIC
144+
NAMESPACE Gem
145+
FILES_CMAKE
146+
wheelanimtool_editor_private_files.cmake
147+
TARGET_PROPERTIES
148+
O3DE_PRIVATE_TARGET TRUE
149+
INCLUDE_DIRECTORIES
150+
PRIVATE
151+
Include
152+
Source
153+
BUILD_DEPENDENCIES
154+
PUBLIC
155+
AZ::AzToolsFramework
156+
${gem_name}.Private.Object
157+
)
158+
159+
ly_add_target(
160+
NAME ${gem_name}.Editor GEM_MODULE
161+
NAMESPACE Gem
162+
AUTOMOC
163+
FILES_CMAKE
164+
wheelanimtool_editor_shared_files.cmake
165+
INCLUDE_DIRECTORIES
166+
PRIVATE
167+
Source
168+
PUBLIC
169+
Include
170+
BUILD_DEPENDENCIES
171+
PUBLIC
172+
Gem::${gem_name}.Editor.API
173+
PRIVATE
174+
Gem::${gem_name}.Editor.Private.Object
175+
)
176+
177+
# Include the gem name into the Editor Module source file
178+
# for use with the AZ_DECLARE_MODULE_CLASS macro
179+
# This is to allow renaming of the gem to also cause
180+
# the CreateModuleClass_Gem_<gem-name> function which
181+
# is used to bootstrap the gem in monolithic builds to link to the new gem name
182+
ly_add_source_properties(
183+
SOURCES
184+
Source/Tools/WheelAnimToolEditorModule.cpp
185+
PROPERTY COMPILE_DEFINITIONS
186+
VALUES
187+
O3DE_GEM_NAME=${gem_name}
188+
O3DE_GEM_VERSION=${gem_version})
189+
190+
# By default, we will specify that the above target ${gem_name} would be used by
191+
# Tool and Builder type targets when this gem is enabled. If you don't want it
192+
# active in Tools or Builders by default, delete one of both of the following lines:
193+
ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
194+
ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
195+
196+
# For the Tools and Builders variants of ${gem_name} Gem, an alias to the ${gem_name}.Editor API target will be made
197+
ly_create_alias(NAME ${gem_name}.Tools.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
198+
ly_create_alias(NAME ${gem_name}.Builders.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
199+
200+
# Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
201+
# for the Tools and Builders gem variants
202+
o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Tools Builders)
203+
endif()
204+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* Copyright 2025, Robotec.ai sp. z o.o.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
#pragma once
17+
18+
namespace WheelAnimTool
19+
{
20+
// System Component TypeIds
21+
inline constexpr const char* WheelAnimToolSystemComponentTypeId = "{43759813-052C-41F1-9B30-61BAE33C99C7}";
22+
inline constexpr const char* WheelAnimToolEditorSystemComponentTypeId = "{D7E9C79F-F9D1-4B02-A5AB-9F0CE0C7EE1C}";
23+
24+
// Module derived classes TypeIds
25+
inline constexpr const char* WheelAnimToolModuleInterfaceTypeId = "{4E2DA4AC-7636-43A6-A935-F5B5560820BD}";
26+
inline constexpr const char* WheelAnimToolModuleTypeId = "{D1181477-468E-4948-8A5F-D68EA3B2A7A7}";
27+
// The Editor Module by default is mutually exclusive with the Client Module
28+
// so they use the Same TypeId
29+
inline constexpr const char* WheelAnimToolEditorModuleTypeId = WheelAnimToolModuleTypeId;
30+
31+
// Interface TypeIds
32+
inline constexpr const char* WheelAnimToolRequestsTypeId = "{B6EF8413-9B8A-411B-86D3-CF87AACDE064}";
33+
} // namespace WheelAnimTool
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
set(PAL_TRAIT_WHEELANIMTOOL_SUPPORTED TRUE)
17+
set(PAL_TRAIT_WHEELANIMTOOL_TEST_SUPPORTED FALSE)
18+
set(PAL_TRAIT_WHEELANIMTOOL_EDITOR_TEST_SUPPORTED FALSE)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
set(FILES
17+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
set(FILES
17+
)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
# Platform specific files for Linux
17+
# i.e. ../Source/Linux/WheelAnimToolLinux.cpp
18+
# ../Source/Linux/WheelAnimToolLinux.h
19+
# ../Include/Linux/WheelAnimToolLinux.h
20+
21+
set(FILES
22+
)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2025, Robotec.ai sp. z o.o.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
# Platform specific files for Linux
17+
# i.e. ../Source/Linux/WheelAnimToolLinux.cpp
18+
# ../Source/Linux/WheelAnimToolLinux.h
19+
# ../Include/Linux/WheelAnimToolLinux.h
20+
21+
set(FILES
22+
)

0 commit comments

Comments
 (0)