Skip to content

Commit

Permalink
improve check for valid pose in pos provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Micha Sende committed Feb 16, 2024
1 parent 2073daf commit ac522fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mavros_pos_provider/src/mavros_pos_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int main(int argc, char **argv)
// wait for valid position
ROS_DEBUG("POS_PROV - Delay startup by %.2f s", init_time);
Duration(init_time).sleep();
while (ok() && (pose.pose.position.x == 0 && pose.pose.position.y == 0 && pose.pose.position.z == 0)) {
while (ok() && (pose.pose.position.x == 0 && pose.pose.position.y == 0 && pose.pose.position.z == 0 && pose.header.stamp.isValid() == false)) {
ROS_DEBUG_THROTTLE(1, "POS_PROV - Waiting for valid pose");
spinOnce();
rate.sleep();
Expand Down

0 comments on commit ac522fb

Please sign in to comment.