-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[backport Gazebo7] Fixed crash when collision size is zero (#2769)
* Fixed crash when collision size is zero Signed-off-by: ahcorde <ahcorde@gmail.com> * Using ignition::math::isnan Signed-off-by: ahcorde <ahcorde@gmail.com> * Improved error message Signed-off-by: ahcorde <ahcorde@gmail.com> * fixed method to get the name of the visual Signed-off-by: ahcorde <ahcorde@gmail.com> * Fixed else brackets Signed-off-by: ahcorde <ahcorde@gmail.com> * [Gazebo 9] Added test to check collisions equal to zero (#2788) * Added test to check collisions equal to zero Signed-off-by: ahcorde <ahcorde@gmail.com> * Included feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * make linters happy Signed-off-by: ahcorde <ahcorde@gmail.com> * Update Visual_TEST.cc
- Loading branch information
Showing
3 changed files
with
127 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.5"> | ||
<world name="default"> | ||
<include> | ||
<uri>model://ground_plane</uri> | ||
</include> | ||
<include> | ||
<uri>model://sun</uri> | ||
</include> | ||
<model name="box"> | ||
<pose>0 0 0.5 0 0 0</pose> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>0 0 0</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>1 1 1</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<script>Gazebo/WoodPallet</script> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
<model name="sphere"> | ||
<pose>0 1.5 0.5 0 0 0</pose> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<sphere> | ||
<radius>0</radius> | ||
</sphere> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<sphere> | ||
<radius>0.5</radius> | ||
</sphere> | ||
</geometry> | ||
<material> | ||
<script>Gazebo/WoodPallet</script> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
<model name="cylinder"> | ||
<pose>0 -1.5 0.5 0 1.5707 0</pose> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<cylinder> | ||
<radius>0</radius> | ||
<length>0</length> | ||
</cylinder> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<cylinder> | ||
<radius>0.5</radius> | ||
<length>1.0</length> | ||
</cylinder> | ||
</geometry> | ||
<material> | ||
<script>Gazebo/WoodPallet</script> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
</world> | ||
</sdf> |