Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Jun 29, 2020
1 parent 325adc8 commit 6364f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/ROS/ros2_parsers/quaternion_msg.h
Expand Up @@ -28,7 +28,7 @@ class QuaternionMsgParser : public BuiltinMessageParser<geometry_msgs::msg::Quat

//-----------------------------
auto q = msg;
double quat_norm2 = q.w * q.w + q.x * q.x * q.y * q.y + q.z * q.z;
double quat_norm2 = (q.w * q.w) + (q.x * q.x) + (q.y * q.y) + (q.z * q.z);
if (std::abs(quat_norm2 - 1.0) > std::numeric_limits<double>::epsilon())
{
double mult = 1.0 / std::sqrt(quat_norm2);
Expand Down

0 comments on commit 6364f73

Please sign in to comment.