Skip to content

Commit

Permalink
addressed Dave's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Jan 3, 2018
1 parent 3dc2e74 commit 76e3a52
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rviz/default_plugin/covariance_visual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void CovarianceVisual::setCovariance( const geometry_msgs::PoseWithCovariance& p
// store orientation in Ogre structure
Ogre::Quaternion ori;
if (!normalizeQuaternion(pose.pose.orientation, ori))
ROS_WARN("invalid quaternion (zero length)");
ROS_WARN("Invalid quaternion (zero length)");

// 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ bool InteractiveMarker::processMessage( const visualization_msgs::InteractiveMar
message.pose.position.z );

if (!normalizeQuaternion(message.pose.orientation, orientation_))
ROS_WARN("invalid quaternion (zero length)");
ROS_WARN("Invalid quaternion (zero length)");

pose_changed_ =false;
time_since_last_feedback_ = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/rviz/default_plugin/pose_array_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace
{
Ogre::Quaternion q;
if (!normalizeQuaternion(quaternion, q))
ROS_WARN("invalid quaternion (zero length)");
ROS_WARN("Invalid quaternion (zero length)");
return q;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/rviz/validate_quaternions.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ inline double quaternionNorm2(double w, double x, double y, double z)

inline bool validateQuaternion(double w, double x, double y, double z)
{
// use same threshold as in tf
return std::abs(quaternionNorm2(w, x, y, z) - 1.0) < 10e-3;
}

Expand Down

0 comments on commit 76e3a52

Please sign in to comment.