sdf 1.8: add capsule geometry type#389
Conversation
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Copy Cylinder class and unit tests to create Capsule. Add Capsule to Geometry enum, logic, and integration test. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## master #389 +/- ##
==========================================
+ Coverage 87.52% 87.60% +0.07%
==========================================
Files 62 63 +1
Lines 9542 9616 +74
==========================================
+ Hits 8352 8424 +72
- Misses 1190 1192 +2
Continue to review full report at Codecov.
|
azeey
left a comment
There was a problem hiding this comment.
LGTM. Just left some minor comments
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
include/sdf/Capsule.hh
Outdated
| public: Capsule(Capsule &&_capsule) noexcept; | ||
|
|
||
| /// \brief Destructor | ||
| public: virtual ~Capsule(); |
There was a problem hiding this comment.
is there any point to having a virtual destructor? I copied it from the other classes, but would it be better without the virtual?
There was a problem hiding this comment.
I was going to leave a comment about that but didn't because the other classes use virtual destructors. IMO, these classes are not meant to be used polymorphically (they don't have any virtual functions), so there is no need for a virtual destructor.
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
chapulina
left a comment
There was a problem hiding this comment.
LGTM, I just have some minor comments and questions.
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
The parser will populate them with default values. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
This adds a
capsulegeometry type to the SDFormat 1.8 spec. This shape is a cylinder with hemispheres capping each end. Due to the similarity to a cylinder, the same parameterslengthandradiusare used. TheCylinderDOM class was copied and modified mainly with search and replaces/ylinder/apsule/to support the new shape. This requires gazebosim/gz-math#163, so this will be a Draft PR until that is merged and released.Part of #376.
Update: ignition-math 6.7.0 has been released, so this is now ready for review.