Skip to content

Commit

Permalink
feat(route_client): print result
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Aug 16, 2024
1 parent f630066 commit 2d4df23
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion planning/autoware_route_client/scripts/route_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ def main(args=None):
rclpy.spin_once(client)
if client.future.done():
try:
client.get_logger().info("Service requested.")
response = client.future.result()
if response.status.success:
client.get_logger().info(
"Service succeeded: %s" % response.status.message
)
else:
client.get_logger().info(
"Service failed: %s" % response.status.message
)
except Exception as e:
client.get_logger().info("Error: %r" % (e,))
break
Expand Down

0 comments on commit 2d4df23

Please sign in to comment.