Limit max camera node position values #824
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🦟 Bug fix
Fixes #710
Summary
Currently rendering crashes with ogre assertion error when the camera position is a really large value. This PR places a limit on the max length of of the node position vector that can be set to prevent the crash. Note that the max limit is different between
ogre
andogre2
render enginesTo test:
launch gazebo and use view angle plugin to set the pose of the camera to a large number:
ign gazebo -v 4 shapes.sdf
View Angle
pluginCamera Pose
section and enter 100000000000 in theX
field -> gazebo should no longer crashChecklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.