From 789e09b7b99424bb0cbd3ec5c61495f4d61a02d5 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 7 Jun 2019 18:34:52 +0300 Subject: [PATCH] docs: fixes to flip snippet --- docs/ru/snippets.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/ru/snippets.md b/docs/ru/snippets.md index 340a4fb9..03a58c08 100644 --- a/docs/ru/snippets.md +++ b/docs/ru/snippets.md @@ -285,13 +285,17 @@ set_mode(custom_mode='STABILIZED') Флип по крену: ```python +import math + +# ... + def flip(): start = get_telemetry() # memorize starting position set_rates(thrust=1) # bump up rospy.sleep(0.2) - set_rates(roll_rate=20, thrust=0.2) # maximum roll rate + set_rates(roll_rate=30, thrust=0.2) # maximum roll rate while True: telem = get_telemetry() @@ -302,7 +306,7 @@ def flip(): rospy.loginfo('finish flip') set_position(x=start.x, y=start.y, z=start.z, yaw=start.yaw) # finish flip -print navigate(z=4, speed=1, auto_arm=True) # take off +print navigate(z=2, speed=1, frame_id='body', auto_arm=True) # take off rospy.sleep(10) rospy.loginfo('flip')