Skip to content

Commit

Permalink
Merge pull request #14 from k-okada/jsk-fetch-melodic-master
Browse files Browse the repository at this point in the history
fix python 'or' syntax
  • Loading branch information
708yamaguchi authored Sep 16, 2021
2 parents 0a3f7f4 + fb42e2f commit 1a91fff
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 1a91fff

Please sign in to comment.