Skip to content

Commit

Permalink
fix python 'or' syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Sep 16, 2021
1 parent 0a3f7f4 commit fb42e2f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions jsk_fetch_robot/jsk_fetch_startup/scripts/odometry_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb42e2f

Please sign in to comment.