From fb42e2f2dbf063d7ee15a86a061c35c9770a6bd8 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Thu, 16 Sep 2021 16:59:03 +0900 Subject: [PATCH] fix python 'or' syntax --- .../scripts/odometry_transformer.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/jsk_fetch_robot/jsk_fetch_startup/scripts/odometry_transformer.py b/jsk_fetch_robot/jsk_fetch_startup/scripts/odometry_transformer.py index 2686d678bc..93991eea69 100755 --- a/jsk_fetch_robot/jsk_fetch_startup/scripts/odometry_transformer.py +++ b/jsk_fetch_robot/jsk_fetch_startup/scripts/odometry_transformer.py @@ -80,17 +80,17 @@ def __init__(self): def cb_odometry(self, msg): # Nan check - if math.isnan( msg.pose.pose.position.x ) or - math.isnan( msg.pose.pose.position.y ) or - math.isnan( msg.pose.pose.position.z ) or - math.isnan( msg.pose.pose.orientation.x ) or - math.isnan( msg.pose.pose.orientation.y ) or - math.isnan( msg.pose.pose.orientation.z ) or - math.isnan( msg.twist.twist.linear.x ) or - math.isnan( msg.twist.twist.linear.y ) or - math.isnan( msg.twist.twist.linear.z ) or - math.isnan( msg.twist.twist.angular.x ) or - math.isnan( msg.twist.twist.angular.y ) or + if math.isnan( msg.pose.pose.position.x ) or \ + math.isnan( msg.pose.pose.position.y ) or \ + math.isnan( msg.pose.pose.position.z ) or \ + math.isnan( msg.pose.pose.orientation.x ) or \ + math.isnan( msg.pose.pose.orientation.y ) or \ + math.isnan( msg.pose.pose.orientation.z ) or \ + math.isnan( msg.twist.twist.linear.x ) or \ + math.isnan( msg.twist.twist.linear.y ) or \ + math.isnan( msg.twist.twist.linear.z ) or \ + math.isnan( msg.twist.twist.angular.x ) or \ + math.isnan( msg.twist.twist.angular.y ) or \ math.isnan( msg.twist.twist.angular.z ): rospy.logwarn('Recieved an odom message with nan values') return