Skip to content

Commit 53c7c16

Browse files
authored
Merge pull request #569 from bitcraze/rik/example_fixes
Small example tweaks
2 parents 0a687ae + 06e23c7 commit 53c7c16

23 files changed

+14
-5
lines changed

docs/development/eeprom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ following steps:
1717

1818
<!-- -->
1919

20-
python3 write-eeprom.py
20+
python3 write_eeprom.py
2121

2222
This will find your first Crazyflie (which is the one you connected over
2323
USB) and write the default values to the EEPROM.

docs/development/wireshark.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ The de facto standard network packet capture format is libpcap (pcap), which is
3434
To tell the CFLIB to generate a PCAP file of what it thinks the CRTP traffic looks like you can go:
3535

3636
```bash
37-
$ CRTP_PCAP_LOG=filename.pcap python3 examples/swarm/hl-commander-swarm.py
37+
$ CRTP_PCAP_LOG=filename.pcap python3 examples/swarm/hl_commander_swarm.py
3838
$ wireshark filename.pcap
3939
```
4040
and on Windows based computers in a shell window:
4141

4242
```bash
4343
> set CRTP_PCAP_LOG=filename.pcap
44-
> python3 examples/swarm/hl-commander-swarm.py
44+
> python3 examples/swarm/hl_commander_swarm.py
4545
> wireshark filename.pcap
4646
```
4747
To generate a PCAP file and open it with Wireshark. You can also use the text based `tshark` tool, and you can add a filter, for instance, only shoow CRTP port 8 (Highlevel setpoint):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
(-0.5, -0.5, 1.2, 0),
5454
(0.0, 0.0, 1.2, 0),
5555
(0.0, 0.0, 0.4, 0),
56+
(0.0, 0.0, 0.0, 0),
5657
]
5758

5859

examples/autonomy/full_state_setpoint_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def run_sequence(scf):
103103
0.0, 0.0, 0.0)
104104
print('land')
105105
send_setpoint(cf, 2.0,
106-
[0.0, 0.0, 0.2],
106+
[0.0, 0.0, 0.1],
107107
[0.0, 0.0, 0.0],
108108
[0.0, 0.0, 0.0],
109109
quaternion_from_euler(0.0, 0.0, 0.0),

examples/cfbridge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
@author: Dennis Shtatnov ([email protected])
1111
12-
Based off example code from crazyflie-lib-python/examples/read-eeprom.py
12+
Based off example code from crazyflie-lib-python/examples/read_eeprom.py
1313
"""
1414
# import struct
1515
import logging

examples/lighthouse/multi_bs_geometry_estimation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
This script is a temporary implementation until similar functionality has been
3636
added to the client.
3737
38+
REQUIREMENTS:
39+
- Lighthouse v2 base stations are required for this example. The Lighthouse deck
40+
will be set to Lighthouse v2 mode automatically.
41+
3842
Prerequisites:
3943
1. The base station calibration data must have been
4044
received by the Crazyflie before this script is executed.
@@ -354,6 +358,10 @@ def connect_and_estimate(uri: str, file_name: str | None = None):
354358
print(f'Step 1. Connecting to the Crazyflie on uri {uri}...')
355359
with SyncCrazyflie(uri, cf=Crazyflie(rw_cache='./cache')) as scf:
356360
print(' Connected')
361+
362+
print(' Setting lighthouse deck to v2 mode...')
363+
scf.cf.param.set_value('lighthouse.systemType', 2)
364+
print(' Lighthouse deck set to v2 mode')
357365
print('')
358366
print('In the 3 following steps we will define the coordinate system.')
359367

0 commit comments

Comments
 (0)