Skip to content
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

Merge next changes from development to stabilization2310 #570

Merged

Conversation

PawelLiberadzki
Copy link
Contributor

@PawelLiberadzki PawelLiberadzki commented Oct 5, 2023

This PR includes following changes:

image

Tests:

142: Note: Google Test filter = -*SUITE_smoke*:*SUITE_periodic*:*SUITE_benchmark*:*SUITE_sandbox*:*SUITE_awsi*
142: [==========] Running 4 tests from 1 test case.
142: [----------] Global test environment set-up.
142: [----------] 4 tests from GNSSTest
142: [ RUN      ] GNSSTest.WGS84ToECEF
142: [       OK ] GNSSTest.WGS84ToECEF (0 ms)
142: [ RUN      ] GNSSTest.ECEFToENU
142: [       OK ] GNSSTest.ECEFToENU (0 ms)
142: [ RUN      ] GNSSTest.ENUToECEF
142: [       OK ] GNSSTest.ENUToECEF (0 ms)
142: [ RUN      ] GNSSTest.ECEFToWSG84
142: [       OK ] GNSSTest.ECEFToWSG84 (0 ms)
142: [----------] 4 tests from GNSSTest (0 ms total)
142: 
142: [----------] Global test environment tear-down
142: [==========] 4 tests from 1 test case ran. (0 ms total)
142: [  PASSED  ] 4 tests.
142: OKAY AzRunUnitTests() returned 0
142: Returning code: 0

100% tests passed, 0 tests failed out of 1

Label Time Summary:
FRAMEWORK_googletest    =   0.05 sec*proc (1 test)
SUITE_main              =   0.05 sec*proc (1 test)

Total Test time (real) =   0.06 sec
Process finished with exit code 0
143: [==========] Running 36 tests from 2 test cases.
143: [----------] Global test environment set-up.
143: [----------] 6 tests from SdfParserTest
143: [ RUN      ] SdfParserTest.SdfWithDuplicateModelNames_ResultsInError
143: SDF with duplicate model names failed to parse with errors: ErrorCode=2, Message=model with name[my_model] already exists.
143: ErrorCode=9, Message=Failed to load a world.
143: 
143: [       OK ] SdfParserTest.SdfWithDuplicateModelNames_ResultsInError (38 ms)
143: [ RUN      ] SdfParserTest.SdfWithModelsOnRootAndWorld_ParsesSuccessfully
143: [       OK ] SdfParserTest.SdfWithModelsOnRootAndWorld_ParsesSuccessfully (39 ms)
143: [ RUN      ] SdfParserTest.VisitingSdfWithMultipleModelsWithSameLinkName_VisitsAllLinks
143: [       OK ] SdfParserTest.VisitingSdfWithMultipleModelsWithSameLinkName_VisitsAllLinks (33 ms)
143: [ RUN      ] SdfParserTest.CheckModelCorrectness
143: [       OK ] SdfParserTest.CheckModelCorrectness (47 ms)
143: [ RUN      ] SdfParserTest.RobotImporterUtils
143: [       OK ] SdfParserTest.RobotImporterUtils (26 ms)
143: [ RUN      ] SdfParserTest.SensorPluginImporterHookCheck
143: [       OK ] SdfParserTest.SensorPluginImporterHookCheck (46 ms)
143: [----------] 6 tests from SdfParserTest (230 ms total)
143: 
143: [----------] 30 tests from UrdfParserTest
143: [ RUN      ] UrdfParserTest.ParseUrdfWithOneLink
143: [       OK ] UrdfParserTest.ParseUrdfWithOneLink (22 ms)
143: [ RUN      ] UrdfParserTest.ParseUrdfWithTwoLinksAndFixedJoint_WithPreserveFixedJoint_False
143: [       OK ] UrdfParserTest.ParseUrdfWithTwoLinksAndFixedJoint_WithPreserveFixedJoint_False (22 ms)
143: [ RUN      ] UrdfParserTest.ParseUrdfWithTwoLinksAndFixedJoint_WithPreserveFixedJoint_True
143: [       OK ] UrdfParserTest.ParseUrdfWithTwoLinksAndFixedJoint_WithPreserveFixedJoint_True (23 ms)
143: [ RUN      ] UrdfParserTest.ParseUrdfWithTwoLinksAndNonFixedJoint
143: [       OK ] UrdfParserTest.ParseUrdfWithTwoLinksAndNonFixedJoint (24 ms)
143: [ RUN      ] UrdfParserTest.ParseURDF_WithTwoLinks_AndBaseLinkWithNoInertia_WithUrdfFixedJointPreservationOn_Fails
143: URDF with single link and no inertia: ErrorCode=17, Message=A model must have at least one link.
143: ErrorCode=17, Message=A model must have at least one link.
143: ErrorCode=25, Message=FrameAttachedToGraph error: scope context name[] does not match __model__ or world.
143: 
143: [       OK ] UrdfParserTest.ParseURDF_WithTwoLinks_AndBaseLinkWithNoInertia_WithUrdfFixedJointPreservationOn_Fails (23 ms)
143: [ RUN      ] UrdfParserTest.ParseURDF_WithTwoLinks_AndBaseLinkWithNoInertia_WithUrdfFixedJointPreservationOff_Succeeds
143: [       OK ] UrdfParserTest.ParseURDF_WithTwoLinks_AndBaseLinkWithNoInertia_WithUrdfFixedJointPreservationOff_Succeeds (23 ms)
143: [ RUN      ] UrdfParserTest.ParseUrdf_WithRootLink_WithName_world_DoesNotContain_world_Link
143: [       OK ] UrdfParserTest.ParseUrdf_WithRootLink_WithName_world_DoesNotContain_world_Link (25 ms)
143: [ RUN      ] UrdfParserTest.ParseUrdf_WithRootLink_WithoutName_world_DoesContainThatLink
143: [       OK ] UrdfParserTest.ParseUrdf_WithRootLink_WithoutName_world_DoesContainThatLink (25 ms)
143: [ RUN      ] UrdfParserTest.WheelHeuristicNameValid
143: [       OK ] UrdfParserTest.WheelHeuristicNameValid (50 ms)
143: [ RUN      ] UrdfParserTest.WheelHeuristicNameNotValid1
143: [       OK ] UrdfParserTest.WheelHeuristicNameNotValid1 (24 ms)
143: [ RUN      ] UrdfParserTest.WheelHeuristicJointNotValid
143: [       OK ] UrdfParserTest.WheelHeuristicJointNotValid (23 ms)
143: [ RUN      ] UrdfParserTest.WheelHeuristicJointVisualNotValid
143: [       OK ] UrdfParserTest.WheelHeuristicJointVisualNotValid (24 ms)
143: [ RUN      ] UrdfParserTest.WheelHeuristicJointColliderNotValid
143: [       OK ] UrdfParserTest.WheelHeuristicJointColliderNotValid (25 ms)
143: [ RUN      ] UrdfParserTest.TestLinkListing
143: [       OK ] UrdfParserTest.TestLinkListing (25 ms)
143: [ RUN      ] UrdfParserTest.TestJointLink
143: [       OK ] UrdfParserTest.TestJointLink (26 ms)
143: [ RUN      ] UrdfParserTest.TestTransforms
143: [       OK ] UrdfParserTest.TestTransforms (28 ms)
143: [ RUN      ] UrdfParserTest.TestQueryJointsForParentLink_Succeeds
143: [       OK ] UrdfParserTest.TestQueryJointsForParentLink_Succeeds (27 ms)
143: [ RUN      ] UrdfParserTest.TestQueryJointsForChildLink_Succeeds
143: [       OK ] UrdfParserTest.TestQueryJointsForChildLink_Succeeds (28 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_ValidAbsolutePath_ResolvesCorrectly
143: [       OK ] UrdfParserTest.TestPathResolve_ValidAbsolutePath_ResolvesCorrectly (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_InvalidAbsolutePath_ReturnsEmptyPath
143: [       OK ] UrdfParserTest.TestPathResolve_InvalidAbsolutePath_ReturnsEmptyPath (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_ValidRelativePath_ResolvesCorrectly
143: [       OK ] UrdfParserTest.TestPathResolve_ValidRelativePath_ResolvesCorrectly (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_InvalidRelativePath_ReturnsEmptyPath
143: [       OK ] UrdfParserTest.TestPathResolve_InvalidRelativePath_ReturnsEmptyPath (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_ValidAmentRelativePathButNoPrefix_ReturnsEmptyPath
143: [       OK ] UrdfParserTest.TestPathResolve_ValidAmentRelativePathButNoPrefix_ReturnsEmptyPath (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_ValidAmentRelativePathAndPrefix_ResolvesCorrectly
143: [       OK ] UrdfParserTest.TestPathResolve_ValidAmentRelativePathAndPrefix_ResolvesCorrectly (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_ValidPathRelativeToAncestorPath_ResolvesCorrectly
143: [       OK ] UrdfParserTest.TestPathResolve_ValidPathRelativeToAncestorPath_ResolvesCorrectly (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolve_ValidPathRelativeToAncestorPath_FailsToResolveWhenAncestorPathsDisabled
143: [       OK ] UrdfParserTest.TestPathResolve_ValidPathRelativeToAncestorPath_FailsToResolveWhenAncestorPathsDisabled (0 ms)
143: [ RUN      ] UrdfParserTest.TestPathResolvementExplicitPackageName
143: [       OK ] UrdfParserTest.TestPathResolvementExplicitPackageName (0 ms)
143: [ RUN      ] UrdfParserTest.ResolvePath_UsingModelUriScheme_Succeeds
143: [       OK ] UrdfParserTest.ResolvePath_UsingModelUriScheme_Succeeds (0 ms)
143: [ RUN      ] UrdfParserTest.XacroParseArgsInvalid
143: [       OK ] UrdfParserTest.XacroParseArgsInvalid (0 ms)
143: [ RUN      ] UrdfParserTest.XacroParseArgs
143: [       OK ] UrdfParserTest.XacroParseArgs (0 ms)
143: [----------] 30 tests from UrdfParserTest (467 ms total)
143: 
143: [----------] Global test environment tear-down
143: [==========] 36 tests from 2 test cases ran. (697 ms total)
143: [  PASSED  ] 36 tests.
143: OKAY AzRunUnitTests() returned 0
143: Returning code: 0

100% tests passed, 0 tests failed out of 1

Label Time Summary:
FRAMEWORK_googletest    =   0.77 sec*proc (1 test)
SUITE_main              =   0.77 sec*proc (1 test)

Total Test time (real) =   0.78 sec
Process finished with exit code 0

lemonade-dm and others added 7 commits October 5, 2023 12:55
…#523)

Updated the URDFPrefabMaker to avoid referencing SDF link names as they are not globally unique

The `CreatePrefabTemplateFromUrdfOrSdf` function has been modified to create a JointMapper object which stores a mapping of joints to all their parent and child links.
It also creates a mapping of joints to the model they are directly attached to.

A similar LinkMapper structure has been added for SDF links, which stores a mapping of the link to their attached model.

Instead of `CreatePrefabTemplateFromUrdfOrSdf` creating a mapping of SDF link name to O3DE Entity, that mapping has now been updated toi map the SDF link pointer to O3DE Entity.
This ensures that SDF links with same name are not lost when mapping to O3DE entities.
This is needed as SDF links and joints are only required to be unique relative to their attached model.
Two links on different models, can have the same link name (http://sdformat.org/tutorials?tut=composition_proposal#1-6-proposed-parsing-stages)

Updated the Robot Importer Visitor callback to require "ModelStack" parameters, which passes in the stack of `sdf::Model` objects that were visited on the way to the sdf element being visited be that a link, joint or nested model.
Also updated the GetAllJoints and GetAllLinks function to store a fully qualified name for the joint/link including the ancestor model names when returning the name to joint and name to link map respectively.

Signed-off-by: lumberyard-employee-dm <[email protected]>

Addressed PR feedback for o3de/o3de-extra#523 around invalid text and grammar

Signed-off-by: lumberyard-employee-dm <[email protected]>
Updating ROS2 Gem to use libsdformat-13.5.0-rev2

The new revision of libsdformat comes with debug symbols, that can be used to get symbol information when debugging the RobotImporter using lldb/gdb

Signed-off-by: lumberyard-employee-dm <[email protected]>
(o3de#547)
Adding back inadvertent code deletion from the RobotImporterWidget.cpp

The `RobotImporterWidget::CreatePrefab` function had it's call to
`CheckCyclicalDependency` removed as part of a conflict when resolving a
rebase.

Signed-off-by: lumberyard-employee-dm <[email protected]>
Updated the Check Asset Page to not add Assets with empty source paths or null Asset IDs to the list of resolved assets

Signed-off-by: lumberyard-employee-dm <[email protected]>

Added a `GetModelContainingModel` function that can return the parent model of a nested model

Signed-off-by: lumberyard-employee-dm <[email protected]>

Updated the URDFPrefabMaker to create an Entity for which represents the URDF/SDF model itself.

The AddEntitiesForLink function has been updated to to pass in the model that the link is attached to and in order to allow the CollidersMaker, ArticulationsMaker and SensorsMaker have access to the Model

Signed-off-by: lumberyard-employee-dm <[email protected]>

Addressed sentence typos in comments.

Signed-off-by: lumberyard-employee-dm <[email protected]>

Fixed the joint iteration for loop in `CreatePrefabTemplateFromUrdfOrSdf`

The code in hee for loop was converted from a lambda to a for loop, but the return statements weren't converted.

Signed-off-by: lumberyard-employee-dm <[email protected]>
* First version of material conversion.
This currently skips scripts and pbr materials.

Signed-off-by: Mike Balfour <[email protected]>

* Modified comment so it's not a direct TODO.
Signed-off-by: Mike Balfour <[email protected]>

* PR feedback.
Cleaned up VisualMakers construction
Added error message if model fails to load.
Signed-off-by: Mike Balfour <[email protected]>

* Added missing includes and fixed missing asset warning.
Signed-off-by: Mike Balfour <[email protected]>

* Fixed typo to match fixed typo in development branch.
Signed-off-by: Mike Balfour <[email protected]>

---------

Signed-off-by: Mike Balfour <[email protected]>
* Fully working material conversions.
* Fixed mipmap bug by using AssetId instead of Asset.
* Rename GetMeshesFromModel to GetAssetsFromModel since it gets textures now too.

---------

Signed-off-by: Mike Balfour <[email protected]>
Co-authored-by: lumberyard-employee-dm <[email protected]>
@PawelLiberadzki PawelLiberadzki requested review from a team as code owners October 5, 2023 11:52
@PawelLiberadzki PawelLiberadzki added the feature/robotics This item is related to robotics. label Oct 5, 2023
@AMZN-alexpete AMZN-alexpete merged commit 65ce3dc into o3de:stabilization/2310 Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/robotics This item is related to robotics.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants