Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/user-guides/sbs_swarm_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ uris = {
'radio://0/20/2M/E7E7E7E703',
'radio://0/20/2M/E7E7E7E704',
# Add more URIs if you want more copters in the swarm
# URIs in a swarm using the same radio must also be on the same channel
}

if __name__ == '__main__':
Expand All @@ -39,7 +40,7 @@ if __name__ == '__main__':
with Swarm(uris, factory=factory) as swarm:
```

This will import all the necessary modules and open the necessary links for communication with all the Crazyflies of the swarm. `Swarm` is a wrapper class which facilitates the execution of functions given by the user for each copter and can execute them in parallel or sequentially. Each Crazyflie is treated as a `SyncCrazyflie` instance and as the first argument in swarm wide actions. There is no need to worry about threads since they are handled internally. To reduce connection time, the factory is chosen to be instance of the `CachedCfFactory` class that will cache the Crazyflie objects in the `./cache` directory.
This will import all the necessary modules and open the necessary links for communication with all the Crazyflies of the swarm. Note that the URIs in a swarm using the same radio must also be on the same channel. `Swarm` is a wrapper class which facilitates the execution of functions given by the user for each copter and can execute them in parallel or sequentially. Each Crazyflie is treated as a `SyncCrazyflie` instance and as the first argument in swarm wide actions. There is no need to worry about threads since they are handled internally. To reduce connection time, the factory is chosen to be instance of the `CachedCfFactory` class that will cache the Crazyflie objects in the `./cache` directory.

The radio addresses of the copters are defined in the `uris` list and you can add more if you want.

Expand Down Expand Up @@ -97,6 +98,7 @@ uris = {
'radio://0/20/2M/E7E7E7E703',
'radio://0/20/2M/E7E7E7E704',
# Add more URIs if you want more copters in the swarm
# URIs in a swarm using the same radio must also be on the same channel
}

if __name__ == '__main__':
Expand Down Expand Up @@ -189,6 +191,7 @@ uris = {
'radio://0/20/2M/E7E7E7E703',
'radio://0/20/2M/E7E7E7E704',
# Add more URIs if you want more copters in the swarm
# URIs in a swarm using the same radio must also be on the same channel
}

if __name__ == '__main__':
Expand Down Expand Up @@ -277,6 +280,7 @@ uris = {
'radio://0/20/2M/E7E7E7E703',
'radio://0/20/2M/E7E7E7E704',
# Add more URIs if you want more copters in the swarm
# URIs in a swarm using the same radio must also be on the same channel
}

if __name__ == '__main__':
Expand Down
Loading