From cb88537ddc9a85220bda208c1adc19f2a1e19e82 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 20 Apr 2021 16:53:53 +0300 Subject: [PATCH] docs: add snippet for using aruco_detect/enabled dynamic parameter --- docs/en/snippets.md | 25 +++++++++++++++++++++++++ docs/ru/snippets.md | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/docs/en/snippets.md b/docs/en/snippets.md index 4772077b..b8fe6539 100644 --- a/docs/en/snippets.md +++ b/docs/en/snippets.md @@ -359,3 +359,28 @@ calibrate_gyro() ``` > **Note** In process of calibration the drone should not be moved. + + + +### # {#aruco-detect-enabled} + + + +Enable and disable [ArUco markers recognition](aruco_marker.md) dynamically (for example, for saving CPU resources): + +```python +import rospy +import dynamic_reconfigure.client + +# ... + +client = dynamic_reconfigure.client.Client('aruco_detect') + +# Turn markers recognition off +client.update_configuration({'enabled': False}) + +rospy.sleep(5) + +# Turn markers recognition on +client.update_configuration({'enabled': True}) +``` diff --git a/docs/ru/snippets.md b/docs/ru/snippets.md index adaabe5d..af71488f 100644 --- a/docs/ru/snippets.md +++ b/docs/ru/snippets.md @@ -377,3 +377,28 @@ calibrate_gyro() ``` > **Note** В процессе калибровки гироскопов дрон нельзя двигать. + + + +### # {#aruco-detect-enabled} + + + +Динамически включать и отключать [распознавание ArUco-маркеров](aruco_marker.md) (например, для экономии ресурсов процессора): + +```python +import rospy +import dynamic_reconfigure.client + +# ... + +client = dynamic_reconfigure.client.Client('aruco_detect') + +# Turn markers recognition off +client.update_configuration({'enabled': False}) + +rospy.sleep(5) + +# Turn markers recognition on +client.update_configuration({'enabled': True}) +```