File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
getting_started/asyncio/system Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ async def main():
46
46
)
47
47
await rvr .sensor_control .start (interval = 1000 )
48
48
49
- print ('Initiate a drive command...' )
49
+ print ('Set the control system timeout to 10s and initiate a drive command...' )
50
+ await rvr .set_custom_control_system_timeout (command_timeout = 10000 )
50
51
await rvr .drive_with_yaw_normalized (
51
52
linear_velocity = 32 , # Valid linear_velocity values are in the range [-127..+127]
52
53
yaw_angle = 0 # Valid yaw values are traditionally [-179..+180], but will continue wrapping outside of that range
@@ -62,6 +63,9 @@ async def main():
62
63
# Delay to allow observation that notifications and active commands have been disabled
63
64
await asyncio .sleep (5 )
64
65
66
+ # Restore the default timeout (2 seconds)
67
+ await rvr .restore_default_control_system_timeout ()
68
+
65
69
await rvr .close ()
66
70
67
71
@@ -77,6 +81,8 @@ async def main():
77
81
loop .run_until_complete (
78
82
asyncio .gather (
79
83
rvr .disable_notifications_and_active_commands (),
84
+ # Restore the default timeout (2 seconds)
85
+ rvr .restore_default_control_system_timeout (),
80
86
rvr .close ()
81
87
)
82
88
)
You can’t perform that action at this time.
0 commit comments