You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples.md
+118-1Lines changed: 118 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
###Example 1: Basic Readings
2
2
3
-
This first example just does some basic measurements to make sure everything is hooked up correctly. To find Example 1, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example01_BasicUsage**:
3
+
This first example just does some basic measurements to make sure everything is hooked up correctly. To find Example 1, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example1_BasicReadings**:
4
4
5
5
6
6
<figuremarkdown>
@@ -25,6 +25,18 @@ Make sure you've selected the correct board and port in the Tools menu and then
25
25
26
26
###Example 2: SetUnits
27
27
28
+
This example sets the desired units for linear and angular measurements. Can be either meters or inches for linear, and radians or degrees for angular. If not set, the default is inches and degrees. Note that this setting is not stored in the sensor, it's part of the library, so you need to set at the start of all your programs.
29
+
30
+
To find Example 2, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example2_SetUnits**:
31
+
32
+
33
+
<figuremarkdown>
34
+
[{ width="90%" }](assets/imgs/Example2_Menu.jpg"Click to enlarge")
35
+
<figcaptionmarkdown>Finding Example 2</figcaption>
36
+
</figure>
37
+
38
+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
39
+
28
40
<!--
29
41
30
42
??? "Example 2 Arduino Code"
@@ -35,6 +47,18 @@ Make sure you've selected the correct board and port in the Tools menu and then
35
47
36
48
###Example 3: Calibration
37
49
50
+
The IMU on the OTOS includes a gyroscope and accelerometer, which could have an offset. The OTOS performs a quick calibration when it powers up, but it is recommended to perform a more thorough calibration at the start of all your programs.
51
+
52
+
To find Example 3, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example3_Calibration**:
53
+
54
+
55
+
<figuremarkdown>
56
+
[{ width="90%" }](assets/imgs/Example3_Menu.jpg"Click to enlarge")
57
+
<figcaptionmarkdown>Finding Example 3</figcaption>
58
+
</figure>
59
+
60
+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
61
+
38
62
<!--
39
63
40
64
??? "Example 3 Arduino Code"
@@ -46,10 +70,103 @@ Make sure you've selected the correct board and port in the Tools menu and then
46
70
47
71
###Example 4: SetOffsetAndPosition
48
72
73
+
This example shows how to set the offset for the sensor relative to the center of the robot. The units default to inches and degrees, but if you want to use different units, make sure you specify them before setting the offset.
74
+
75
+
!!! warning
76
+
77
+
Note that as of firmware version 1.0, these values will be lost after a power cycle, so you will need to set them each time you power up the sensor.
78
+
79
+
80
+
To find Example 4, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example4_SetOffsetAndPositione**:
81
+
82
+
83
+
<figuremarkdown>
84
+
[{ width="90%" }](assets/imgs/Example4_Menu.jpg"Click to enlarge")
85
+
<figcaptionmarkdown>Finding Example 4</figcaption>
86
+
</figure>
87
+
88
+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
89
+
49
90
<!--
50
91
51
92
??? "Example 4 Arduino Code"
52
93
```
53
94
--8<-- ""
54
95
```
96
+
-->
97
+
98
+
###Example 5: VelocityAndAcceleration
99
+
100
+
This example prints out the velocity and acceleration of the bot as it moves.
101
+
102
+
103
+
To find Example 5, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example5_VelocityAndAcceleration**:
104
+
105
+
106
+
<figuremarkdown>
107
+
[{ width="90%" }](assets/imgs/Example5_Menu.jpg"Click to enlarge")
108
+
<figcaptionmarkdown>Finding Example 5</figcaption>
109
+
</figure>
110
+
111
+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
112
+
113
+
<!--
114
+
115
+
??? "Example 5 Arduino Code"
116
+
```
117
+
--8<-- ""
118
+
```
119
+
-->
120
+
121
+
###Example 6: StandardDeviation
122
+
123
+
This example reads the standard deviation of the tracking. Note that these values are just the square root of the diagonal elements of the covariance matrices of the Kalman filters used in the firmware of the OTOS and not actual tracking error data.
124
+
125
+
!!! warning
126
+
127
+
THESE VALUES DO NOT REPRESENT THE ACTUAL TRACKING ERROR! These are statistical quantities that assume a correct model of the system, but there could be unmodelled error sources that cause the physical error to become larger than these statistical error (eg. improper calibration, or rotating the OTOS to not be flat against the tracking surface). These are provided primarily for anyone wanting to perform sensor fusion with additional sensors, but they can be used to at least "get an idea" of the quality of the accuracy.
128
+
129
+
130
+
131
+
To find Example 6, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example6_StandardDeviation**:
132
+
133
+
134
+
<figuremarkdown>
135
+
[{ width="90%" }](assets/imgs/Example6_Menu.jpg"Click to enlarge")
136
+
<figcaptionmarkdown>Finding Example 6</figcaption>
137
+
</figure>
138
+
139
+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
140
+
141
+
<!--
142
+
143
+
??? "Example 6 Arduino Code"
144
+
```
145
+
--8<-- ""
146
+
```
147
+
-->
148
+
149
+
150
+
151
+
###Example 7: GetVersion
152
+
153
+
This should be fairly self explanatory. This example gets the current hardware and firmware version of the board.
154
+
155
+
156
+
To find Example 7, go to **File** > **Examples** > **SparkFun Qwiic OTOS** > **Example7_GetVersion**:
157
+
158
+
159
+
<figuremarkdown>
160
+
[{ width="90%" }](assets/imgs/Example7_Menu.jpg"Click to enlarge")
161
+
<figcaptionmarkdown>Finding Example 7</figcaption>
162
+
</figure>
163
+
164
+
Alternatively, you can expand the link below and copy and paste the code into a shiny new Arduino sketch:
The SparkFun Optical Tracking Odometry Sensor needs to be rigidly mounted to a robot chassis and oriented flat to the floor. We've designed a few 3D printing models you can use, but you may need to design your own mount for this board, depending on your use case.
7
-
6
+
The SparkFun Optical Tracking Odometry Sensor needs to be rigidly mounted to a robot chassis and oriented flat to the floor. We've designed a few 3D printing models you can use, but you may need to design your own mount for this board, depending on your use case. Accurate readings really require that the sensor is mounted correctly; attempting to move the sensor by hand can work, but tracking accuracy will suffer.
8
7
9
8
10
9
<figuremarkdown>
@@ -14,10 +13,7 @@ The SparkFun Optical Tracking Odometry Sensor needs to be rigidly mounted to a r
14
13
15
14
16
15
!!! attention
17
-
Reminder - make sure you peel off the yellow kapton tape before using this!
18
-
19
-
16
+
Reminder - make sure you peel off the yellow kapton tape!
20
17
21
18
22
19
23
-
the sensor really needs to be rigidly mounted to a robot chassis, and oriented flat to the floor. I'm planning on providing a couple 3D printable mount designs that folks can use, but they may need to design their own mount. Also emphasize that the examples really require the sensor to be mounted correctly; attempting to move the sensor by hand can work, but tracking accuracy may be terrible.
0 commit comments