Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

[backport Gazebo7] Fixed crash when collision size is zero #2769

Merged
merged 6 commits into from
Jul 28, 2020

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Jun 29, 2020

Orignal PR #2768

Signed-off-by: ahcorde [email protected]

@mabelzhang
Copy link
Collaborator

I tested this on Ubuntu 16.04, since that's where Kinetic + Gazebo 7 is official.
I'm getting the same compiler error as Jenkins - isnan not declared in this scope. Changing to std::isnan worked. The next error I'm getting is line 803: 'Name' was not declared in this scope.

@mabelzhang
Copy link
Collaborator

mabelzhang commented Jul 9, 2020

I retested and it works. Specifying --verbose shows the error printout. (In non-verbose mode, only the sdformat error message is printed, Error [Param.cc:452] Unable to set value [-nan -nan -nan] for key[size].)

Linux CI looks okay.

@j-rivero @scpeters Mac is saying pip3 not found?

++ pip3 install lxml
./scripts/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash: line 81: pip3: command not found
Build step 'Execute shell' marked build as failure
Recording test results
ERROR: Step ‘Publish JUnit test result report’ failed: Test reports were found but none of them are new. Did leafNodes run? 
For example, /Users/jenkins/workspace/gazebo-ci-pr_any-homebrew-amd64/build/test_results/EXAMPLE_examples_build.xml is 1 day 15 hr old

and Windows is not finding Qt:

CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindQt4.cmake:1314 (message):
  Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x

None of this is related to this PR, but I don't know if I should approve and merge if some of the CIs hadn't run...

@scpeters
Copy link
Member

Mac is saying pip3 not found?

I think that was an intermittent failure that should be resolved now by gazebo-tooling/release-tools#236

@scpeters
Copy link
Member

@osrf-jenkins run tests please

@mabelzhang
Copy link
Collaborator

Thanks Steve! Looks like Mac has a bunch of complaints about cmath and math.h, e.g.

In file included from /Users/jenkins/workspace/gazebo-ci-pr_any-homebrew-amd64/gazebo/gazebo/common/Animation.cc:19:
In file included from /usr/local/Cellar/ignition-math2/2.9.0/include/ignition/math2/ignition/math/Spline.hh:22:
In file included from /usr/local/Cellar/ignition-math2/2.9.0/include/ignition/math2/ignition/math/Helpers.hh:20:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^

Same thing for isfinite, isinf, isnan, isnormal, isgreater, etc. That looks like it shouldn't happen?

Signed-off-by: ahcorde <[email protected]>
@scpeters scpeters added the 7 Gazebo 7 label Jul 15, 2020
@ahcorde ahcorde self-assigned this Jul 23, 2020
@ahcorde ahcorde requested a review from mabelzhang July 23, 2020 15:53
* Added test to check collisions equal to zero

Signed-off-by: ahcorde <[email protected]>

* Included feedback

Signed-off-by: ahcorde <[email protected]>

* make linters happy

Signed-off-by: ahcorde <[email protected]>

* Update Visual_TEST.cc
@ahcorde
Copy link
Contributor Author

ahcorde commented Jul 24, 2020

@mabelzhang CI is passing

131: [ RUN      ] Visual_TEST.CollisionZero
131: [Msg] Waiting for master.
131: [Msg] Connected to gazebo master @ http://127.0.0.1:11345
131: [Msg] Publicized address: 172.17.0.2
131: [Dbg] [ServerFixture.cc:207] ServerFixture load in 0.8 seconds, timeout after 600 seconds
131: Error [Param.cc:452] Unable to set value [-nan -nan -nan] for key[size]
131: [Err] [Visual.cc:805] box::link::collision__COLLISION_VISUAL__: Size of the collision contains one or several zeros. Collisions may not visualize properly.
131: [Err] [Visual.cc:805] sphere::link::collision__COLLISION_VISUAL__: Size of the collision contains one or several zeros. Collisions may not visualize properly.
131: [Err] [Visual.cc:805] cylinder::link::collision__COLLISION_VISUAL__: Size of the collision contains one or several zeros. Collisions may not visualize properly.
131: [Dbg] [ServerFixture.cc:133] ServerFixture::Unload
131: [       OK ] Visual_TEST.CollisionZero (3049 ms)

Copy link
Collaborator

@mabelzhang mabelzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally - test failed before the fix, and passed after the fix in Ubuntu 16 + Gazebo 7.

@ahcorde ahcorde merged commit 9351f5c into gazebosim:gazebo7 Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
7 Gazebo 7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants