Skip to content

Commit 28d2ed8

Browse files
authored
Add Metric Equivalents (#963)
* metric changes * used latex for ^2 * missed 2 ^2 * Added ~ for approximations * addressed PR comments * found a few more conversions * anderson and spacing Co-authored-by: jasondaming <[email protected]>
1 parent 3f82f7c commit 28d2ed8

File tree

4 files changed

+49
-49
lines changed

4 files changed

+49
-49
lines changed

source/docs/software/sensors/ultrasonics-software.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Other ultrasonic sensors offered by third-parties may use more complicated commu
5454
Using ultrasonics in code
5555
-------------------------
5656

57-
Ultrasonic sensors are very useful for determining spacing during autonomous routines. For example, the following code will drive the robot forward until the ultrasonic measures a distance of 12 inches to the nearest object, and then stop:
57+
Ultrasonic sensors are very useful for determining spacing during autonomous routines. For example, the following code will drive the robot forward until the ultrasonic measures a distance of 12 inches (~30 cm) to the nearest object, and then stop:
5858

5959
.. tabs::
6060

source/docs/software/vision-processing/axis-camera/camera-settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Resolution
3131

3232
Image sizes shared by the supported cameras are 160x120, 320x240, and 640x480. The M1011 and 1013 have additional sizes, but they aren’t built into WPILib. The largest image size has four times as many pixels that are one-fourth the size of the middle size image. The large image has sixteen times as many pixels as the small image.
3333

34-
The tape used on the target is 4 inches wide, and for good processing, you will want that 4 inch feature to be at least two pixels wide. Using the distance equations above, we can see that a medium size image should be fine up to the point where the field of view is around 640 inches, a little over 53 feet, which is nearly double the width of the FRC field. This occurs at around 60 feet away, longer than the length of the field. The small image size should be usable for processing to a distance of about 30 feet or a little over mid-field.
34+
The tape used on the target is 4 inches (~10 cm) wide, and for good processing, you will want that 4 inch (~10 cm) feature to be at least two pixels wide. Using the distance equations above, we can see that a medium size image should be fine up to the point where the field of view is around 640 inches (~16 m), a little over 53 feet (~16 m), which is nearly double the width of the FRC field. This occurs at around 60 feet (~18 m) away, longer than the length of the field. The small image size should be usable for processing to a distance of about 30 feet (~9 m) or a little over mid-field.
3535

3636
Image size also impacts the time to decode and to process. Smaller images will be roughly four times faster than the next size up. If the robot or target is moving, it is quite important to minimize image processing time since this will add to the delay between the target location and perceived location. If both robot and target are stationary, processing time is typically less important.
3737

source/docs/software/vision-processing/introduction/identifying-and-processing-the-targets.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ After the masking operation, a particle report operation is used to examine the
4545
Coverage Area
4646
^^^^^^^^^^^^^
4747

48-
The Area score is calculated by comparing the area of the particle compared to the area of the bounding box drawn around the particle. The area of the retroreflective strips is 80 square inches. The area of the rectangle that contains the target is 240 square inches. This means that the ideal ratio between area and bounding box area is 1/3. Area ratios close to 1/3 will produce a score near 100, as the ratio diverges from 1/3 the score will approach 0.
48+
The Area score is calculated by comparing the area of the particle compared to the area of the bounding box drawn around the particle. The area of the retroreflective strips is 80 square inches (~516 :math:`cm^2`). The area of the rectangle that contains the target is 240 square inches (~0.15 :math:`m^2`). This means that the ideal ratio between area and bounding box area is 1/3. Area ratios close to 1/3 will produce a score near 100, as the ratio diverges from 1/3 the score will approach 0.
4949

5050
Aspect Ratio
5151
^^^^^^^^^^^^
5252

5353
The aspect ratio score is based on (Particle Width / Particle Height). The width and height of the particle are determined using something called the "equivalent rectangle". The equivalent rectangle is the rectangle with side lengths :math:`x` and :math:`y` where :math:`2x+2y` equals the particle perimeter and :math:`x \cdot y` equals the particle area. The equivalent rectangle is used for the aspect ratio calculation as it is less affected by skewing of the rectangle than using the bounding box. When using the bounding box rectangle for aspect ratio, as the rectangle is skewed the height increases and the width decreases.
5454

55-
The target is 20" wide by 12" tall, for a ratio of 1.6. The detected aspect ratio is compared to this ideal ratio. The aspect ratio score is normalized to return 100 when the ratio matches the target ratio and drops linearly as the ratio varies below or above.
55+
The target is 20" (508 mm) wide by 12" (304.8 mm) tall, for a ratio of 1.6. The detected aspect ratio is compared to this ideal ratio. The aspect ratio score is normalized to return 100 when the ratio matches the target ratio and drops linearly as the ratio varies below or above.
5656

5757
Moment
5858
^^^^^^

source/docs/zero-to-robot/step-1/how-to-wire-a-robot.rst

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,34 @@ Locate the following control system components and tools
3333
- 2x PWM y-cables
3434
- 120A Circuit breaker
3535
- 4x 40A Circuit breaker
36-
- 6 AWG Red wire
37-
- 10 AWG Red/Black wire
38-
- 18 AWG Red/Black wire
39-
- 22AWG yellow/green twisted CAN cable
40-
- 16x 10-12 AWG (yellow) ring terminals
36+
- 6 AWG (16 :math:`mm^2`) Red wire
37+
- 10 AWG (6 :math:`mm^2`) Red/Black wire
38+
- 18 AWG (1 :math:`mm^2`) Red/Black wire
39+
- 22 AWG (0.5 :math:`mm^2`) Yellow/Green twisted CAN cable
40+
- 16x 10-12 AWG (4 - 6 :math:`mm^2`) (Yellow) ring terminals
4141
(8x quick disconnect pairs if using integrated wire controllers)
42-
- 2x Andersen SB50 battery connectors
43-
- 6AWG Terminal lugs
42+
- 2x Anderson SB50 battery connectors
43+
- 6 AWG (16 :math:`mm^2`) Terminal lugs
4444
- 12V Battery
4545
- Red/Black Electrical tape
4646
- Dual Lock material or fasteners
4747
- Zip ties
48-
- 1/4" or 1/2" plywood
48+
- 1/4" or 1/2" (6-12 mm) plywood
4949

5050
- Tools Required:
5151

5252
- Wago Tool or small flat-head screwdriver
5353
- Very small flat head screwdriver (eyeglass repair size)
5454
- Philips head screw driver
55-
- 5mm Hex key (3/16" may work if metric is unavailable)
55+
- 5 mm Hex key (3/16" may work if metric is unavailable)
5656
- 1/16" Hex key
5757
- Wire cutters, strippers, and crimpers
58-
- 7/16” box end wrench or nut driver
58+
- 7/16” (11 mm may work if imperial is unavailable) box end wrench or nut driver
5959

6060
Create the Base for the Control System
6161
--------------------------------------
6262

63-
For a benchtop test board, cut piece of 1/4” or 1/2" material (wood or plastic) approximately 24" x 16". For a Robot Quick Build control board see the supporting documentation for the proper size board for the chosen chassis configuration.
63+
For a benchtop test board, cut piece of 1/4” or 1/2" (6-12 mm) material (wood or plastic) approximately 24" x 16" (60 x 40 cm). For a Robot Quick Build control board see the supporting documentation for the proper size board for the chosen chassis configuration.
6464

6565
Layout the Core Control System Components
6666
-----------------------------------------
@@ -83,29 +83,29 @@ Attach Battery Connector to PDP
8383

8484
.. image:: images/how-to-wire-a-robot/image3.jpg
8585

86-
Requires: Battery Connector, 6AWG terminal lugs, 1/16" Allen, 5mm Allen,
87-
7/16" Box end
86+
Requires: Battery Connector, 6 AWG (16 :math:`mm^2`) terminal lugs, 1/16" Allen, 5 mm Allen,
87+
7/16" (11 mm) Box end
8888

8989

9090
Attach terminal lugs to battery connector:
9191

9292
1. Using a 1/16" Allen wrench, remove the two screws securing the PDP terminal cover.
93-
2. Using a 5mm Allen wrench (3/16" will work if metric is not available), remove the negative (-) bolt and washer from the PDP and fasten the negative terminal of the battery connector.
94-
3. Using a 7/16" box end wrench, remove the nut on the "Batt" side of the main breaker and secure the positive terminal of the battery connector
93+
2. Using a 5 mm Allen wrench (3/16"), remove the negative (-) bolt and washer from the PDP and fasten the negative terminal of the battery connector.
94+
3. Using a 7/16" (11 mm) box end wrench, remove the nut on the "Batt" side of the main breaker and secure the positive terminal of the battery connector
9595

9696
Wire Breaker to PDP
9797
-------------------
9898

9999
.. image:: images/how-to-wire-a-robot/image4.jpg
100100

101101

102-
Requires: 6AWG red wire, 2x 6AWG terminal lugs, 5mm Allen, 7/16" box end
102+
Requires: 6 AWG (16 :math:`mm^2`) red wire, 2x 6 AWG (16 :math:`mm^2`) terminal lugs, 5 mm Allen, 7/16" (11 mm) box end
103103

104-
Secure one terminal lug to the end of the 6AWG red wire. Using the 7/16" box end, remove the nut from the “AUX” side of the 120A main breaker and place the terminal over the stud. Loosely secure the nut (you may wish to remove it shortly to cut, strip, and crimp the other end of the wire). Measure out the length of wire required to reach the positive terminal of the PDP.
104+
Secure one terminal lug to the end of the 6 AWG (16 :math:`mm^2`) red wire. Using the 7/16" (11 mm) box end, remove the nut from the “AUX” side of the 120A main breaker and place the terminal over the stud. Loosely secure the nut (you may wish to remove it shortly to cut, strip, and crimp the other end of the wire). Measure out the length of wire required to reach the positive terminal of the PDP.
105105

106-
1. Cut, strip, and crimp the terminal to the 2nd end of the red 6AWG wire.
107-
2. Using the 7/16" box end, secure the wire to the "AUX" side of the 120A main breaker.
108-
3. Using the 5mm, secure the other end to the PDP positive terminal.
106+
1. Cut, strip, and crimp the terminal to the 2nd end of the red 6 AWG (16 :math:`mm^2`) wire.
107+
2. Using the 7/16" (11 mm) box end, secure the wire to the "AUX" side of the 120A main breaker.
108+
3. Using the 5 mm Allen wrench, secure the other end to the PDP positive terminal.
109109

110110
Insulate PDP connections
111111
------------------------
@@ -128,8 +128,8 @@ Wago connectors
128128

129129
The next step will involve using the Wago connectors on the PDP. To use the Wago connectors, insert a small flat blade screwdriver into the rectangular hole at a shallow angle then angle the screwdriver upwards as you continue to press in to actuate the lever, opening the terminal. Two sizes of Wago connector are found on the PDP:
130130

131-
- Small Wago connector: Accepts 10AWG-24AWG, strip 11-12mm (~7/16")
132-
- Large Wago connector: Accepts 6AWG-12AWG, strip 12-13mm(~1/2")
131+
- Small Wago connector: Accepts 10 - 24 AWG (0.25 - 6 :math:`mm^2`), strip 11-12 mm (~7/16")
132+
- Large Wago connector: Accepts 6 - 12 AWG (4 - 16 :math:`mm^2`), strip 12-13 mm (~1/2")
133133

134134
To maximize pullout force and minimize connection resistance wires should not be tinned (and ideally not twisted) before inserting into the Wago connector.
135135

@@ -140,7 +140,7 @@ Motor Controller Power
140140

141141
.. image:: images/how-to-wire-a-robot/image7.jpg
142142

143-
Requires: Wire Stripper, Small Flat Screwdriver, 10 or 12 AWG wire, 10 or 12 AWG fork/ring terminals (terminal controllers only), wire crimper
143+
Requires: Wire Stripper, Small Flat Screwdriver, 10 or 12 AWG (4 - 6 :math:`mm^2`) wire, 10 or 12 AWG (4 - 6 :math:`mm^2`) fork/ring terminals (terminal controllers only), wire crimper
144144

145145
For Victor SPX or other wire integrated motor controllers (top image):
146146

@@ -163,12 +163,12 @@ Weidmuller Connectors
163163
</div>
164164

165165

166-
.. warning:: The correct strip length is ~5/16" (8mm), not the 5/8" mentioned in the video.
166+
.. warning:: The correct strip length is ~5/16" (~8 mm), not the 5/8" (~16 mm) mentioned in the video.
167167

168168
A number of the CAN and power connectors in the system use a Weidmuller LSF series wire-to-board connector. There are a few things to keep in mind when using this connector for best results:
169169

170-
- Wire should be 16AWG to 24AWG (consult rules to verify required gauge for power wiring)
171-
- Wire ends should be stripped approximately 5/16"
170+
- Wire should be 16 AWG (1.5 :math:`mm^2`) to 24 AWG (0.25 :math:`mm^2`) (consult rules to verify required gauge for power wiring)
171+
- Wire ends should be stripped approximately 5/16 (~8 mm)"
172172
- To insert or remove the wire, press down on the corresponding "button" to open the terminal
173173

174174
After making the connection check to be sure that it is clean and secure:
@@ -181,10 +181,10 @@ roboRIO Power
181181

182182
.. image:: images/how-to-wire-a-robot/image8.jpg
183183

184-
Requires: 10A/20A mini fuses, Wire stripper, very small flat screwdriver, 18AWG Red and Black
184+
Requires: 10A/20A mini fuses, Wire stripper, very small flat screwdriver, 18 AWG (1 :math:`mm^2`) Red and Black
185185

186186
1. Insert the 10A and 20A mini fuses in the PDP in the locations shown on the silk screen (and in the image above)
187-
2. Strip ~5/16" on both the red and black 18AWG wire and connect to the "Vbat Controller PWR" terminals on the PDB
187+
2. Strip ~5/16" (~8 mm) on both the red and black 18 AWG (1 :math:`mm^2`) wire and connect to the "Vbat Controller PWR" terminals on the PDB
188188
3. Measure the required length to reach the power input on the roboRIO. Take care to leave enough length to route the wires around any other components such as the battery and to allow for any strain relief or cable management.
189189
4. Cut and strip the wire.
190190
5. Using a very small flat screwdriver connect the wires to the power input connector of the roboRIO (red to V, black to C). Also make sure that the power connector is screwed down securely to the roboRIO.
@@ -194,27 +194,27 @@ Voltage Regulator Module Power
194194

195195
.. image:: images/how-to-wire-a-robot/image11.jpg
196196

197-
Requires: Wire stripper, small flat screwdriver (optional), 18AWG red and black wire:
197+
Requires: Wire stripper, small flat screwdriver (optional), 18 AWG (1 :math:`mm^2`) red and black wire:
198198

199-
1. Strip ~5/16" on the end of the red and black 18AWG wire.
199+
1. Strip ~5/16" (~8 mm) on the end of the red and black 18 AWG (1 :math:`mm^2`) wire.
200200
2. Connect the wire to one of the two terminal pairs labeled "Vbat VRM PCM PWR" on the PDP.
201201
3. Measure the length required to reach the "12Vin" terminals on the VRM. Take care to leave enough length to route the wires around any other components such as the battery and to allow for any strain relief or cable management.
202-
4. Cut and strip ~5/16" from the end of the wire.
202+
4. Cut and strip ~5/16" (~8 mm) from the end of the wire.
203203
5. Connect the wire to the VRM 12Vin terminals.
204204

205205
Pneumatics Control Module Power (Optional)
206206
------------------------------------------
207207

208208
.. image:: images/how-to-wire-a-robot/image12.jpg
209209

210-
Requires: Wire stripper, small flat screwdriver (optional), 18AWG red and black wire
210+
Requires: Wire stripper, small flat screwdriver (optional), 18 AWG (1 :math:`mm^2`) red and black wire
211211

212212
.. note: The PCM is an optional component used for controlling pneumatics on the robot.
213213
214-
1. Strip ~5/16" on the end of the red and black 18AWG wire.
214+
1. Strip ~5/16" (~8 mm) on the end of the red and black 18 AWG (1 :math:`mm^2`) wire.
215215
2. Connect the wire to one of the two terminal pairs labeled "Vbat VRM PCM PWR" on the PDP.
216216
3. Measure the length required to reach the "Vin" terminals on the PCM. Take care to leave enough length to route the wires around any other components such as the battery and to allow for any strain relief or cable management.
217-
4. Cut and strip ~5/16" from the end of the wire.
217+
4. Cut and strip ~5/16" (~8 mm) from the end of the wire.
218218
5. Connect the wire to the PCM 12Vin terminals.
219219

220220
Radio Power and Ethernet
@@ -248,11 +248,11 @@ roboRIO to PCM CAN
248248

249249
Requires: Wire stripper, small flat screwdriver (optional), yellow/green twisted CAN cable
250250

251-
.. note: The PCM is an optional component used for controlling pneumatics on the robot. If you are not using the PCM, wire the CAN connection directly from the roboRIO (shown in this step) to the PDP (show in the next step).
251+
.. note: The PCM is an optional component used for controlling pneumatics on the robot. If you are not using the PCM, wire the CAN connection directly from the roboRIO (shown in this step) to the PDP (shown in the next step).
252252
253-
1. Strip ~5/16" off of each of the CAN wires.
253+
1. Strip ~5/16" (~8 mm) off of each of the CAN wires.
254254
2. Insert the wires into the appropriate CAN terminals on the roboRIO (Yellow->YEL, Green->GRN).
255-
3. Measure the length required to reach the CAN terminals of the PCM (either of the two available pairs). Cut and strip ~5/16" off this end of the wires.
255+
3. Measure the length required to reach the CAN terminals of the PCM (either of the two available pairs). Cut and strip ~5/16" (~8 mm) off this end of the wires.
256256
4. Insert the wires into the appropriate color coded CAN terminals on the PCM. You may use either of the Yellow/Green terminal pairs on the PCM, there is no defined in or out.
257257

258258
PCM to PDP CAN
@@ -262,11 +262,11 @@ PCM to PDP CAN
262262

263263
Requires: Wire stripper, small flat screwdriver (optional), yellow/green twisted CAN cable
264264

265-
.. note: The PCM is an optional component used for controlling pneumatics on the robot. If you are not using the PCM, wire the CAN connection directly from the roboRIO (shown in the above step) to the PDP (show in this step).
265+
.. note: The PCM is an optional component used for controlling pneumatics on the robot. If you are not using the PCM, wire the CAN connection directly from the roboRIO (shown in the above step) to the PDP (shown in this step).
266266
267-
1. Strip ~5/16" off of each of the CAN wires.
267+
1. Strip ~5/16" (~8 mm) off of each of the CAN wires.
268268
2. Insert the wires into the appropriate CAN terminals on the PCM.
269-
3. Measure the length required to reach the CAN terminals of the PDP (either of the two available pairs). Cut and strip ~5/16" off this end of the wires.
269+
3. Measure the length required to reach the CAN terminals of the PDP (either of the two available pairs). Cut and strip ~5/16" (~8 mm) off this end of the wires.
270270
4. Insert the wires into the appropriate color coded CAN terminals on the PDP. You may use either of the Yellow/Green terminal pairs on the PDP, there is no defined in or out.
271271

272272
.. note: The PDP ships with the CAN bus terminating resistor jumper in the “ON” position. It is recommended to leave the jumper in this position and place any additional CAN nodes between the roboRIO and the PDP (leaving the PDP as the end of the bus). If you wish to place the PDP in the middle of the bus (utilizing both pairs of PDP CAN terminals) move the jumper to the “OFF” position and place your own 120 ohm terminating resistor at the end of your CAN bus chain.
@@ -292,13 +292,13 @@ Robot Signal Light
292292

293293
.. image:: images/how-to-wire-a-robot/image18.jpg
294294

295-
Requires: Wire stripper, 2 pin cable, Robot Signal Light, 18AWG red wire, very small flat screwdriver
295+
Requires: Wire stripper, 2 pin cable, Robot Signal Light, 18 AWG (1 :math:`mm^2`) red wire, very small flat screwdriver
296296

297297
1. Cut one end off of the 2 pin cable and strip both wires
298298
2. Insert the black wire into the center, "N" terminal and tighten the terminal.
299-
3. Strip the 18AWG red wire and insert into the "La" terminal and tighten the terminal.
300-
4. Cut and strip the other end of the 18AWG wire to insert into the "Lb" terminal
301-
5. Insert the red wire from the two pin cable into the "Lb" terminal with the 18AWG red wire and tighten the terminal.
299+
3. Strip the 18 AWG (1 :math:`mm^2`) red wire and insert into the "La" terminal and tighten the terminal.
300+
4. Cut and strip the other end of the 18 AWG (1 :math:`mm^2`) wire to insert into the "Lb" terminal
301+
5. Insert the red wire from the two pin cable into the "Lb" terminal with the 18 AWG (1 :math:`mm^2`) red wire and tighten the terminal.
302302
6. Connect the two-pin connector to the RSL port on the roboRIO. The black wire should be closest to the outside of the roboRIO.
303303

304304
.. tip:: You may wish to temporarily secure the RSL to the control board using cable ties or Dual Lock (it is recommended to move the RSL to a more visible location as the robot is being constructed)
@@ -364,6 +364,6 @@ Requires: Zip ties
364364
Connect Battery
365365
---------------
366366

367-
Connect the battery to the robot side of the Andersen connector. Power on the robot by moving the lever on the top of the 120A main breaker into the ridge on the top of the housing.
367+
Connect the battery to the robot side of the Anderson connector. Power on the robot by moving the lever on the top of the 120A main breaker into the ridge on the top of the housing.
368368

369369
If stuff blinks, you probably did it right. From here, you should connect to the roboRIO and try uploading your code!

0 commit comments

Comments
 (0)