Skip to content

Commit

Permalink
feat(route_client): print result (#99)
Browse files Browse the repository at this point in the history
* feat(route_client): print result

Signed-off-by: kosuke55 <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: kosuke55 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
kosuke55 and pre-commit-ci[bot] authored Aug 16, 2024
1 parent f630066 commit 36e0e88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,11 @@ 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 36e0e88

Please sign in to comment.