mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 05:29:32 +00:00
docs: add 'optical_flow/enabled' parameter usage snippets + minor fixes
This commit is contained in:
@@ -358,15 +358,36 @@ Enable and disable [ArUco markers recognition](aruco_marker.md) dynamically (for
|
||||
import rospy
|
||||
import dynamic_reconfigure.client
|
||||
|
||||
client = dynamic_reconfigure.client.Client('aruco_detect')
|
||||
rospy.init_node('flight')
|
||||
aruco_client = dynamic_reconfigure.client.Client('aruco_detect')
|
||||
|
||||
# Turn markers recognition off
|
||||
client.update_configuration({'enabled': False})
|
||||
aruco_client.update_configuration({'enabled': False})
|
||||
|
||||
rospy.sleep(5)
|
||||
|
||||
# Turn markers recognition on
|
||||
client.update_configuration({'enabled': True})
|
||||
aruco_client.update_configuration({'enabled': True})
|
||||
```
|
||||
|
||||
### # {#optical-flow-enabled}
|
||||
|
||||
Enable and disable [Optical Flow](optical_flow.md) dynamically:
|
||||
|
||||
```python
|
||||
import rospy
|
||||
import dynamic_reconfigure.client
|
||||
|
||||
rospy.init_node('flight')
|
||||
flow_client = dynamic_reconfigure.client.Client('optical_flow')
|
||||
|
||||
# Turn Optical Flow off
|
||||
flow_client.update_configuration({'enabled': False})
|
||||
|
||||
rospy.sleep(5)
|
||||
|
||||
# Turn Optical Flow on
|
||||
flow_client.update_configuration({'enabled': True})
|
||||
```
|
||||
|
||||
### # {#wait-global-position}
|
||||
|
||||
@@ -369,15 +369,36 @@ calibrate_gyro()
|
||||
import rospy
|
||||
import dynamic_reconfigure.client
|
||||
|
||||
client = dynamic_reconfigure.client.Client('aruco_detect')
|
||||
rospy.init_node('flight')
|
||||
aruco_client = dynamic_reconfigure.client.Client('aruco_detect')
|
||||
|
||||
# Включить распознавание маркеров
|
||||
client.update_configuration({'enabled': False})
|
||||
# Выключить распознавание маркеров
|
||||
aruco_client.update_configuration({'enabled': False})
|
||||
|
||||
rospy.sleep(5)
|
||||
|
||||
# Выключить распознавание маркеров
|
||||
client.update_configuration({'enabled': True})
|
||||
# Включить распознавание маркеров
|
||||
aruco_client.update_configuration({'enabled': True})
|
||||
```
|
||||
|
||||
### # {#optical-flow-enabled}
|
||||
|
||||
Динамически включать и отключать [Optical Flow](optical_flow.md):
|
||||
|
||||
```python
|
||||
import rospy
|
||||
import dynamic_reconfigure.client
|
||||
|
||||
rospy.init_node('flight')
|
||||
flow_client = dynamic_reconfigure.client.Client('optical_flow')
|
||||
|
||||
# Выключить Optical Flow
|
||||
flow_client.update_configuration({'enabled': False})
|
||||
|
||||
rospy.sleep(5)
|
||||
|
||||
# Включить Optical Flow
|
||||
flow_client.update_configuration({'enabled': True})
|
||||
```
|
||||
|
||||
### # {#wait-global-position}
|
||||
|
||||
Reference in New Issue
Block a user