Skip to content

Commit

Permalink
odom_estimator: warn on non-unit VelocityMeasurement::direction vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Forrest Voight committed Apr 19, 2024
1 parent fe3938d commit 934d7b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mil_common/gnc/odom_estimator/src/nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ class NodeImpl
for (unsigned int i = 0; i < msg.velocity_measurements.size(); i++)
{
mil_msgs::VelocityMeasurement const &vm = msg.velocity_measurements[i];
if (std::fabs(xyz2vec(vm.direction).norm() - 1) > 1e-3)
{
NODELET_ERROR("VelocityMeasurement::direction should always be a unit vector");
}
if (!std::isnan(vm.velocity))
{
good.push_back(vm);
Expand Down

0 comments on commit 934d7b4

Please sign in to comment.