Repository navigation
Extend tests of the legacy version - #259
Conversation
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
7494637 to
0c378f3
Compare
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
818a382 to
7666d01
Compare
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
scpeters
left a comment
There was a problem hiding this comment.
I love seeing new tests!
I have two thoughts:
-
All of these new tests use URDFs defined in string constants within a test. Alternatively they could be defined in separate files. There are trade-offs with each approach:
- Benefits of testing URDF string constants: URDF is defined right next to its test, making it easier to cross-reference between the two. You don't need to deal with loading from the filesystem. Don't need to choose filenames for the test URDFs.
- Benefits of testing URDF files: the test files can also serve as a reference, and are easier to reuse.
In sdformat, we use a mixture of both in our tests, but I've found the test files in the test/sdf folder rather useful as references. I suggest converting at least a few of the test URDF string constants to test files.
-
This test is over 2000 lines; I think it would be easier to navigate and interpret if it was split into multiple
.cppfiles
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
|
@scpeters what do you think about the changes= |
|
Tick the box to add this pull request to the merge queue (same as
|
scpeters
left a comment
There was a problem hiding this comment.
thanks for splitting up the files! I'm in the middle of reviewing them and have only noticed one issue so far
| <inertial> | ||
| <mass value="5.25"/> | ||
| <inertia ixx="0.1" ixy="0.01" ixz="0.001" | ||
| iyy="0.2" iyz="0.002" izz="0.3"/> |
There was a problem hiding this comment.
there are some special properties that inertia matrices must satisfy (and sdformat complains if they are not satisfied):
- matrix is positive definite (eigenvalues are positive)
- principal moments / eigenvalues must satisfy the triangle inequality
these values look visually borderline on failing the triangle inequality, so I checked, and they indeed fail (though barely). I think it would be enough to increase the diagonal elements from [0.1 0.2 0.3] to [0.2 0.3 0.4]
There was a problem hiding this comment.
Good point. I like the idea, should we add an explicit check for these conditions on URDF side? or not needed?
There was a problem hiding this comment.
we can add a "strict" parsing mode that is initially off by default, and consider enabling it by default for a new version of the URDF spec
There was a problem hiding this comment.
I like it. I can add that in a different PR
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
ahcorde
left a comment
There was a problem hiding this comment.
I added same changes:
- .hpp includes
- parseAsset helper
- ASSERT guards
|
Pulls: #259 |
|
Thank you @ahcorde |
This PR is mainly to extend the tests of the legacy 1.0 version for most possible combinations of data