Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210910794
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210910794
Commits
19b844b5
Unverified
Commit
19b844b5
authored
Feb 15, 2020
by
Steven Macenski
Committed by
GitHub
Feb 15, 2020
Browse files
Options
Downloads
Patches
Plain Diff
fixing nightly builds with exception handling (#1527)
parent
cc28e8a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
nav2_system_tests/src/system/tester_node.py
+2
-2
2 additions, 2 deletions
nav2_system_tests/src/system/tester_node.py
nav2_system_tests/src/waypoint_follower/tester.py
+13
-5
13 additions, 5 deletions
nav2_system_tests/src/waypoint_follower/tester.py
with
15 additions
and
7 deletions
nav2_system_tests/src/system/tester_node.py
+
2
−
2
View file @
19b844b5
...
@@ -178,8 +178,8 @@ class NavTester(Node):
...
@@ -178,8 +178,8 @@ class NavTester(Node):
req
=
ManageLifecycleNodes
.
Request
()
req
=
ManageLifecycleNodes
.
Request
()
req
.
command
=
ManageLifecycleNodes
.
Request
().
SHUTDOWN
req
.
command
=
ManageLifecycleNodes
.
Request
().
SHUTDOWN
future
=
mgr_client
.
call_async
(
req
)
future
=
mgr_client
.
call_async
(
req
)
rclpy
.
spin_until_future_complete
(
self
,
future
)
try
:
try
:
rclpy
.
spin_until_future_complete
(
self
,
future
)
future
.
result
()
future
.
result
()
except
Exception
as
e
:
except
Exception
as
e
:
self
.
error_msg
(
'
Service call failed %r
'
%
(
e
,))
self
.
error_msg
(
'
Service call failed %r
'
%
(
e
,))
...
@@ -191,8 +191,8 @@ class NavTester(Node):
...
@@ -191,8 +191,8 @@ class NavTester(Node):
req
=
ManageLifecycleNodes
.
Request
()
req
=
ManageLifecycleNodes
.
Request
()
req
.
command
=
ManageLifecycleNodes
.
Request
().
SHUTDOWN
req
.
command
=
ManageLifecycleNodes
.
Request
().
SHUTDOWN
future
=
mgr_client
.
call_async
(
req
)
future
=
mgr_client
.
call_async
(
req
)
rclpy
.
spin_until_future_complete
(
self
,
future
)
try
:
try
:
rclpy
.
spin_until_future_complete
(
self
,
future
)
future
.
result
()
future
.
result
()
except
Exception
as
e
:
except
Exception
as
e
:
self
.
error_msg
(
'
Service call failed %r
'
%
(
e
,))
self
.
error_msg
(
'
Service call failed %r
'
%
(
e
,))
...
...
This diff is collapsed.
Click to expand it.
nav2_system_tests/src/waypoint_follower/tester.py
+
13
−
5
View file @
19b844b5
...
@@ -84,8 +84,12 @@ class WaypointFollowerTest(Node):
...
@@ -84,8 +84,12 @@ class WaypointFollowerTest(Node):
self
.
info_msg
(
'
Sending goal request...
'
)
self
.
info_msg
(
'
Sending goal request...
'
)
send_goal_future
=
self
.
action_client
.
send_goal_async
(
action_request
)
send_goal_future
=
self
.
action_client
.
send_goal_async
(
action_request
)
try
:
rclpy
.
spin_until_future_complete
(
self
,
send_goal_future
)
rclpy
.
spin_until_future_complete
(
self
,
send_goal_future
)
goal_handle
=
send_goal_future
.
result
()
goal_handle
=
send_goal_future
.
result
()
except
Exception
as
e
:
self
.
error_msg
(
'
Service call failed %r
'
%
(
e
,))
if
not
goal_handle
.
accepted
:
if
not
goal_handle
.
accepted
:
self
.
error_msg
(
'
Goal rejected
'
)
self
.
error_msg
(
'
Goal rejected
'
)
return
False
return
False
...
@@ -94,9 +98,13 @@ class WaypointFollowerTest(Node):
...
@@ -94,9 +98,13 @@ class WaypointFollowerTest(Node):
get_result_future
=
goal_handle
.
get_result_async
()
get_result_future
=
goal_handle
.
get_result_async
()
self
.
info_msg
(
"
Waiting for
'
FollowWaypoints
'
action to complete
"
)
self
.
info_msg
(
"
Waiting for
'
FollowWaypoints
'
action to complete
"
)
try
:
rclpy
.
spin_until_future_complete
(
self
,
get_result_future
)
rclpy
.
spin_until_future_complete
(
self
,
get_result_future
)
status
=
get_result_future
.
result
().
status
status
=
get_result_future
.
result
().
status
result
=
get_result_future
.
result
().
result
result
=
get_result_future
.
result
().
result
except
Exception
as
e
:
self
.
error_msg
(
'
Service call failed %r
'
%
(
e
,))
if
status
!=
GoalStatus
.
STATUS_SUCCEEDED
:
if
status
!=
GoalStatus
.
STATUS_SUCCEEDED
:
self
.
info_msg
(
'
Goal failed with status code: {0}
'
.
format
(
status
))
self
.
info_msg
(
'
Goal failed with status code: {0}
'
.
format
(
status
))
return
False
return
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment