Skip to content

Fix crash when setting covariance using null quaternion - #1180

Closed
dhood wants to merge 1 commit into
kinetic-develfrom
fix_covar_crash
Closed

dhood wants to merge 1 commit into
kinetic-develfrom
fix_covar_crash

Conversation

@dhood

@dhood dhood commented Jan 3, 2018

Copy link
Copy Markdown
Contributor

This is an alternative fix for #1137. The current fix in place is from #1139 which prevented the crash by rejecting the invalid quaternions.

The root cause of the crash was that, although the null quaternion is set to identity in FrameManager::transform() at this line, it was still using the null quaternion for the covariance display.

This will allow us to not reject null quaternions, which is important given the prevalence of invalid quaternions as uncovered by #1167

@dhood dhood self-assigned this Jan 3, 2018
@dhood
dhood requested a review from wjwwood January 3, 2018 02:13

@rhaschke rhaschke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think #1179 solves the issue in a more fundamental fashion.


// Set the orientation of the fixed node. Since this node is attached to the root node, it's orientation will be the
// inverse of pose's orientation.
fixed_orientation_node_->setOrientation(ori.Inverse());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In contrast to #1179, this PR doesn't handle normalization of the quaternion. As ogre and rviz/ros might follow different normalization strategies, this might yield inconsistent results, because the quaternion is once normalized internally by ROS (see #1179 (comment)) before being passed to SceneNode::setOrientation and once (here) not.

@dhood

dhood commented Jan 3, 2018

Copy link
Copy Markdown
Contributor Author

I think #1179 solves the issue in a more fundamental fashion.

We had been looking to avoid normalising the quaternions (just dealing with the null ones as the bare minimum) but as you pointed out they are being normalised anyway elsewhere. So now I agree and this PR will likely be closed in favour of #1179

@rhaschke

rhaschke commented Jan 4, 2018 •

Copy link
Copy Markdown
Contributor

So now I agree and this PR will likely be closed in favour of #1179.

@dhood Why did you then merged #1182 ? This obviously creates conflicts with #1179.
Sorry, didn't yet read the conversation in #1179.

@dhood dhood closed this Jan 4, 2018
@dhood
dhood deleted the fix_covar_crash branch January 4, 2018 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants