def publish_obstacles(timer_event):
"""Requests and publishes obstacles.
Args:
timer_event: ROS TimerEvent.
"""
try:
moving_obstacles, stationary_obstacles = client.get_obstacles(
frame, lifetime)
except (ConnectionError, Timeout) as e:
rospy.logwarn(e)
return
except (ValueError, HTTPError) as e:
rospy.logerr(e)
return
except Exception as e:
rospy.logfatal(e)
return
moving_pub.publish(moving_obstacles)
stationary_pub.publish(stationary_obstacles)
评论列表
文章目录