mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
docs: add snippet for using aruco_detect/enabled dynamic parameter
This commit is contained in:
@@ -359,3 +359,28 @@ calibrate_gyro()
|
||||
```
|
||||
|
||||
> **Note** In process of calibration the drone should not be moved.
|
||||
|
||||
<!-- markdownlint-disable MD044 -->
|
||||
|
||||
### # {#aruco-detect-enabled}
|
||||
|
||||
<!-- markdownlint-enable MD044 -->
|
||||
|
||||
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})
|
||||
```
|
||||
|
||||
@@ -377,3 +377,28 @@ calibrate_gyro()
|
||||
```
|
||||
|
||||
> **Note** В процессе калибровки гироскопов дрон нельзя двигать.
|
||||
|
||||
<!-- markdownlint-disable MD044 -->
|
||||
|
||||
### # {#aruco-detect-enabled}
|
||||
|
||||
<!-- markdownlint-enable MD044 -->
|
||||
|
||||
Динамически включать и отключать [распознавание 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})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user