-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAPI.html
More file actions
1271 lines (807 loc) · 50.5 KB
/
API.html
File metadata and controls
1271 lines (807 loc) · 50.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html xmlns:tomboy="http://beatniksoftware.com/tomboy" xmlns:link="http://beatniksoftware.com/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>ROS Phidgets API</title><style type="text/css">
body { }
h1 { font-size: xx-large;
font-weight: bold;
border-bottom: 1px solid black; }
div.note {
position: relative;
display: block;
padding: 5pt;
margin: 5pt;
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */ }
</style></head><body><div class="note" id="ROS Phidgets API"><a name="ros phidgets api"></a><h1>ROS Phidgets API</h1>
<span style="font-size:large">Phidgets Devices</span>
<a style="color:#204A87" href="#accelerometer">Accelerometer</a>
<a style="color:#204A87" href="#advanced servo controller">Advanced Servo Controller</a>
<a style="color:#204A87" href="#high speed encoder">High Speed Encoder</a>
<a style="color:#204A87" href="#interface kit">Interface Kit</a>
<a style="color:#204A87" href="#ir">IR</a>
<a style="color:#204A87" href="#led">LED</a>
<a style="color:#204A87" href="#motor control hc">Motor Control HC</a>
<a style="color:#204A87" href="#ph sensor">PH Sensor</a>
<a style="color:#204A87" href="#rfid">RFID</a>
<a style="color:#204A87" href="#spatial">Spatial</a>
<a style="color:#204A87" href="#stepper controller">Stepper Controller</a>
<a style="color:#204A87" href="#text lcd display">Text LCD Display</a>
<span style="font-size:large">Virtual Devices</span>
<a style="color:#204A87" href="#odometry">Odometry</a>
<a style="color:#204A87" href="#joystick">Joystick</a>
<a style="color:#204A87" href="#joystick motor control">Joystick Motor Control</a>
<a style="color:#204A87" href="#joystick servo control">Joystick Servo Control</a>
<a style="color:#204A87" href="#servo glimpse">Servo Glimpse</a>
<span style="font-size:large">Message Formats</span>
<a style="color:#204A87" href="#accelerometer_params">accelerometer_params</a>
<a style="color:#204A87" href="#encoder_params">encoder_params</a>
<a style="color:#204A87" href="#interface_kit_params">interface_kit_params</a>
<a style="color:#204A87" href="#ir_params">ir_params</a>
<a style="color:#204A87" href="#joystick_params">joystick_params</a>
<a style="color:#204A87" href="#led_params">led_params</a>
<a style="color:#204A87" href="#motor_params">motor_params</a>
<a style="color:#204A87" href="#phsensor_params">phsensor_params</a>
<a style="color:#204A87" href="#rfid_params">rfid_params</a>
<a style="color:#204A87" href="#servo_params">servo_params</a>
<a style="color:#204A87" href="#spatial_params">spatial_params</a>
<a style="color:#204A87" href="#stepper_params">stepper_params</a>
<a style="color:#204A87" href="#textlcd_params">textlcd_params</a>
</div>
<div class="note" id="Accelerometer"><a name="accelerometer"></a><h1>Accelerometer</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=5&product_id=1059">http://www.phidgets.com/products.php?category=5&product_id=1059</a>
<b>Source File:</b> accelerometer.cpp
<b>Example:</b> accelerometer_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
Default topic:
<b><i>phidgets/accelerometer</i></b> <<a style="color:#204A87" href="#accelerometer_params">accelerometer_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "accelerometer")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><i>sensitivity (float, default: 0.0)</i></b>
This is the amount that an acceleration value must change to trigger an event and publish new data to the topic. The default of 0.0 generates events and publishes to the topic as fast as the hardware can trigger events (our tests show ~62HZ)
<b><i>x_axis_id (int, default: 0)</i></b>
The accelerometer hardware provides values for axes that are indexed 0-2. Depending on how the device is mounted, the x,y,z mapping can change. Use this parameter to specify the x-axis.
<b><i>y_axis_id (int, default: 1)</i></b>
The accelerometer hardware provides values for axes that are indexed 0-2. Depending on how the device is mounted, the x,y,z mapping can change. Use this parameter to specify the y-axis.
<b><i>z_axis_id (int, default: 2)</i></b>
The accelerometer hardware provides values for axes that are indexed 0-2. Depending on how the device is mounted, the x,y,z mapping can change. Use this parameter to specify the z-axis.
</div>
<div class="note" id="Advanced Servo Controller"><a name="advanced servo controller"></a><h1>Advanced Servo Controller</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=11&product_id=1061">http://www.phidgets.com/products.php?category=11&product_id=1061</a>
<b>Source File:</b> advanced_servo.cpp
<b>Example:</b> advanced_servo_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/servos</i></b> <<a style="color:#204A87" href="#servo_params">servo_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "servos")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><span style="font-size:large">Service Format</span></b>
Commands are sent to servos in the following format. The units for position, speed and acceleration are as given in the specification.
<b><i>int32 index</i></b>
Index number of the servo.
<b><i>bool engage</i></b>
Whether to engage/energise the servo.
<b><i>float32 position</i></b>
The desired reference position for the servo.
<b><i>float32 speed</i></b>
The speed at which the servo should move.
<b><i>float32 acceleration</i></b>
The acceleration at which the servo should move.
</div>
<div class="note" id="High Speed Encoder"><a name="high speed encoder"></a><h1>High Speed Encoder</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=1&product_id=1057">http://www.phidgets.com/products.php?category=1&product_id=1057</a>
<b>Source File:</b> high_speed_encoder.cpp
<b>Example:</b> high_speed_encoder_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/encoder</i></b> <<a style="color:#204A87" href="#encoder_params">encoder_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")</i></b>
This sets the topic path for the device
<b><i>name (str, default: "encoder")</i></b>
An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><span style="font-size:large">Message Format</span></b>
<b><i>Header header</i></b>
Message header.
<b><i>int32 index</i></b>
Index number of the encoder.
<b><i>int32 count</i></b>
Returned count from the encoder.
<b><i>int32 count_change</i></b>
Change in encoder count between this and the previous value.
<b><i>int32 time</i></b>
Time when the encoder count was taken.</div>
<div class="note" id="Interface Kit"><a name="interface kit"></a><h1>Interface Kit</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=0&product_id=1018">http://www.phidgets.com/products.php?category=0&product_id=1018</a>
<b>Source File:</b> interface_kit.cpp
<b>Example:</b> interface_kit_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/</i></b><b>interface_kit</b> <<a style="color:#204A87" href="#interface_kit_params">interface_kit_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "interface_kit")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><span style="font-size:large">Service Format</span></b>
Digital output states or the trigger levels for analogue inputs are set using the following format.
<b><i>int32 index</i></b>
Index number of the digital output or analogue input.
<b><i>int32 value_type</i></b>
Type of value being set.
1 = Digital output.
2 = Analogue sensor trigger level.
<b><i>int32 value</i></b>
Value to be set.
<b><span style="font-size:large">Message Format</span></b>
Values for inputs are received in the following format.
<b><i>Header header</i></b>
Message header.
<b><i>int32 index</i></b>
Index number of the input or output.
<b><i>int32 value_type</i></b>
Value type of the input.
1 = Digital input.
2 = Digital Output.
3 = Analogue input.
<b><i>int32 value</i></b>
Returned value of the input or output.</div>
<div class="note" id="IR"><a name="ir"></a><h1>IR</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=27&product_id=1055">http://www.phidgets.com/products.php?category=27&product_id=1055</a>
<b>Source File:</b> ir.cpp
<b>Example:</b> ir_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/ir</i></b> <<a style="color:#204A87" href="#ir_params">ir_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "ir")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
</div>
<div class="note" id="LED"><a name="led"></a><h1>LED</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=15&product_id=1031">http://www.phidgets.com/products.php?category=15&product_id=1031</a>
<b>Source File:</b> led.cpp
<b>Example:</b> led_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/led</i></b> <<a style="color:#204A87" href="#led_params">led_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "led")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><span style="font-size:large">Service Format</span></b>
byte[] brightness
sets the brightness value for each LED, in the range 0-100.</div>
<div class="note" id="Motor Control HC"><a name="motor control hc"></a><h1>Motor Control HC</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=12&product_id=1064">http://www.phidgets.com/products.php?category=12&product_id=1064</a>
<b>Source File:</b> motor_control_hc.cpp
<b>Example:</b> motor_control_hc_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is:
<b><i>phidgets/motorcontrol</i></b> <<a style="color:#204A87" href="#motor_params">motor_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "motorcontrol")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><i>timeout (int, default: 2)</i></b>
This sets a timeout period in seconds after which if a motor control command has not been received then the motors will be halted. This is a safety feature to ensure that the motors don't keep spinning if higher level systems have crashed or hung.
<b><span style="font-size:large">Subscriptions</span></b>
<b><i>cmd_vel</i></b>
This is a message of type <i>geometry_msgs::Twist</i> used to by other systems to request motor movement in a particular direction. The <i>linear.x</i> property of this message is used to set the angular speed and <i>linear.y</i> is used to set the forward speed.
</div>
<div class="note" id="PH Sensor"><a name="ph sensor"></a><h1>PH Sensor</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=19&product_id=1058">http://www.phidgets.com/products.php?category=19&product_id=1058</a>
<b>Source File:</b> phsensor.cpp
<b>Example:</b> phsensor_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/phsensor</i></b> <<a style="color:#204A87" href="#phsensor_params">phsensor_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "phsensor")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
</div>
<div class="note" id="RFID"><a name="rfid"></a><h1>RFID</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=14&product_id=1023">http://www.phidgets.com/products.php?category=14&product_id=1023</a>
<b>Source File:</b> rfid.cpp
<b>Example:</b> rfid_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/rfid</i></b> <<a style="color:#204A87" href="#rfid_params">rfid_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "rfid")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
</div>
<div class="note" id="Spatial"><a name="spatial"></a><h1>Spatial</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=5&product_id=1056">http://www.phidgets.com/products.php?category=5&product_id=1056</a>
<b>Source File:</b> spatial.cpp
<b>Example:</b> spatial_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is:
<b><i>phidgets/spatial</i></b> <<a style="color:#204A87" href="#spatial_params">spatial_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "spatial")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
</div>
<div class="note" id="Stepper Controller"><a name="stepper controller"></a><h1>Stepper Controller</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=13&product_id=1062">http://www.phidgets.com/products.php?category=13&product_id=1062</a>
<b>Source File:</b> stepper.cpp
<b>Example:</b> stepper_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/stepper</i></b> <<a style="color:#204A87" href="#stepper_params">stepper_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "stepper")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
<b><span style="font-size:large">Service Format</span></b>
Commands are sent to the stepper motors in the following format:
<b><i>int32 index</i></b>
Index number of the motor.
<b><i>bool engage</i></b>
Whether to engage/energise the motor.
<b><i>float32 velocity</i></b>
Reference velocity for the motor.
<b><i>float32 acceleration</i></b>
Reference acceleration for the motor.
<b><i>int64 position</i></b>
Reference position for the motor.
<b><i>bool reset_position</i></b>
Resets the position count.
</div>
<div class="note" id="Text LCD Display"><a name="text lcd display"></a><h1>Text LCD Display</h1>
Specification: <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=15&product_id=1203">http://www.phidgets.com/products.php?category=15&product_id=1203</a>
<b>Source File:</b> textlcd.cpp
<b>Example:</b> textlcd_client.cpp
<b><span style="font-size:large">Published Topics</span></b>
The default topic is
<b><i>phidgets/textlcd</i></b> <<a style="color:#204A87" href="#textlcd_params">textlcd_params</a>>
This can also be altered by specifying <i>topic_path</i>, <i>name</i> and <i>serial_number</i> as parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the device
<b><i>
name (str, default: "textlcd")
</i></b> An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>serial_number (int, default: -1)</i></b>
The serial number for the device. A value of -1 indicates that any serial number is acceptable. Use this with caution as there is no guarantee of which device gets connected if there is more than one device connected.
</div>
<div class="note" id="Odometry"><a name="odometry"></a><h1>Odometry</h1>
<b>Source File:</b> odometry.cpp
This uses the Phidgets <a style="color:#204A87" href="#high speed encoder">high speed encoder</a> devices to create an odometry frame for a two wheel/track differential drive system.
<b><span style="font-size:large">Published Topics</span></b>
The default topic is:
<b><i>odom</i></b> <<i>nav_msgs::Odometry</i>>
This can also be altered using the <i>name</i> parameter.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>name (str, default: "odom")
</i></b> Published topic name.
<b><i>encodername (str, default: "encoder")</i></b>
Name of the encoders.
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for the encoder devices.
<b><i>serialleft (int)</i></b>
Serial number of the left encoder.
<b><i>serialright (int)</i></b>
Serial number of the right encoder.
<b><i>encoderindexleft (int, default: -1)</i></b>
If the Phidget device has two or more encoders this specifies the index of the left encoder.
<b><i>encoderindexright (int, default: -1)</i></b>
If the Phidget device has two or more encoders this specifies the index of the right encoder.
<b><i>base_link (str, default: "base_link")</i></b>
Base frame.
<b><i>frame_id (str, default: "odom")</i></b>
Odometry frame.
<b><i>wheelbase (int, default: 400)</i></b>
The distance between wheels in millimetres.
<b><i>countspermmleft (int, default: 1000)</i></b>
The number of encoder counts per millimetre of travel for the left wheel.
<b><i>countspermmright (int, default: 1000)</i></b>
The number of encoder counts per millimetre of travel for the right wheel.
<b><i>verbose (bool)</i></b>
Whether to report additional debugging information.
<b><span style="font-size:large">Example launch file</span></b>
<!--
Launcher for differential drive wheel odometry.
Change the encoder serial numbers as needed. The serial numbers can be viewed by running:
rosrun phidgets manager
This requires:
2 x Phidgets <a style="color:#204A87" href="#high speed encoder">high speed encoder</a>
A known number of encoder counts per millimetre of travel for each wheel
-->
<launch>
<!-- Machine settings. See <a style="color:#3465A4" href="http://www.ros.org/wiki/roslaunch/XML/machine">http://www.ros.org/wiki/roslaunch/XML/machine</a> -->
<machine name="local_alt" address="localhost" default="true" />
<!-- phidgets high speed encoders -->
<node pkg="phidgets" type="high_speed_encoder" name="encoder_left" respawn="true">
<!-- phidget device serial number for the left encoder -->
<param name="serial_number" value="52980" />
</node>
<node pkg="phidgets" type="high_speed_encoder" name="encoder_right" respawn="true">
<!-- phidget device serial number for the right encoder -->
<param name="serial_number" value="54104" />
</node>
<!-- odometry -->
<node pkg="phidgets" type="odometry" name="odometry" respawn="true" output="screen">
<!-- phidget device serial numbers for the left and right encoders -->
<param name="serialleft" value="52980" />
<param name="serialright" value="54104" />
<!-- separation between the two wheels in millimetres -->
<param name="wheelbase" value="400" />
<!-- number of encoder counts per millimetre for the left wheel -->
<param name="countspermmleft" value="100" />
<!-- number of encoder counts per millimetre for the right wheel -->
<param name="countspermmright" value="100" />
<!-- whether to show additional info -->
<param name="verbose" value="true" />
</node>
</launch>
</div>
<div class="note" id="Joystick"><a name="joystick"></a><h1>Joystick</h1>
<b>Specification:</b> <a style="color:#3465A4" href="http://www.phidgets.com/products.php?category=7&product_id=1113">http://www.phidgets.com/products.php?category=7&product_id=1113</a>
<b>Source File:</b> joystick.cpp
This is a virtual device, which uses the Mini Joystick Sensor (or any other similar device) and a Phidgets <a style="color:#204A87" href="#interface kit">interface kit</a>.
The joystick is disabled by default, but can be enabled by setting the <i>joystick/enable</i> parameter to true.
<b><span style="font-size:large">Published Topics</span></b>
The default topic is:
<b><i>phidgets/joystick</i></b> <<a style="color:#204A87" href="#joystick_params">joystick_params</a>>
This can also be altered using the <i>topic_path</i> and <i>name</i> parameters.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b>
This sets the topic path for the device
<b><i>name (str, default: "joystick")
</i></b>
An optional name for the device. The complete topic is given as the topic path plus the name.
<b><i>interfacekitname (str, default: "interface_kit")</i></b>
An optional name for the <a style="color:#204A87" href="#interface kit">interface kit</a>. The complete topic of the <a style="color:#204A87" href="#interface kit">interface kit</a> is given as the topic path plus this name.
<b><i>horizontalaxis (int, default: 1)</i></b>
Index number of the analogue input used for the horizontal (sideways) joystick axis.
<b><i>verticalaxis (int, default: 2)</i></b>
Index number of the analogue input used for the vertical (forwards) joystick axis.
<b><i>horizontaldirection (int, default: 1)</i></b>
Defines whether the signal from the horizontal (sideways) joystick axis should be reversed. To reverse the direction set this value to -1.
<b><i>verticaldirection (int, default: 1)</i></b>
Defines whether the signal from the vertical (forward) joystick axis should be reversed. To reverse the direction set this value to -1.
<b><i>buttoninput (int, default: -1)</i></b>
If not set to -1 this specifies the index number of the digital input on the <a style="color:#204A87" href="#interface kit">interface kit</a> to be used as the joystick button.
</div>
<div class="note" id="Joystick Motor Control"><a name="joystick motor control"></a><h1>Joystick Motor Control</h1>
<b>Source File:</b> <a style="color:#204A87" href="#joystick">joystick</a>_motor_control.cpp
This is a virtual device, which uses the Mini <a style="color:#204A87" href="#joystick">Joystick</a> Sensor, Phidgets <a style="color:#204A87" href="#interface kit">interface kit</a> and <a style="color:#204A87" href="#motor control hc">motor control HC</a> devices in order to enable <a style="color:#204A87" href="#joystick">joystick</a> control of a two wheel/track differential drive system.
This can be enabled or disabled by setting the <i><a style="color:#204A87" href="#joystick">joystick</a></i><i>/enable_motor_control</i> parameter.
<b><span style="font-size:large">Published Topics</span></b>
The default topic is:
<b><i> cmd_vel</i></b> <<i>geometry_msgs::Twist</i>>
This can be altered by setting the <i>name</i> parameter.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b>
This sets the topic path for the Phidgets devices
<b><i>name (str, default: "cmd_vel")</i></b>
Topic name of the velocity command to be published.
<b><i>joystickname (str, default: "<a style="color:#204A87" href="#joystick">joystick</a></i></b><b><i>")</i></b>
An optional name for the <a style="color:#204A87" href="#joystick">joystick</a> virtual device.
<b><i>motorcontrolname (str, default: "motorcontrol")</i></b>
An optional name for the <a style="color:#204A87" href="#motor control hc">motor control HC</a> device.
<b><i>interfacekitname (str, default: "interface_kit")</i></b>
An optional name for the <a style="color:#204A87" href="#interface kit">interface kit</a>. The complete topic of the <a style="color:#204A87" href="#interface kit">interface kit</a> is given as the topic path plus this name.
<b><i>startbutton (int, default: -1)</i></b>
If not set to -1 this specifies the index of a digital input on the <a style="color:#204A87" href="#interface kit">interface kit</a> to be used to start <a style="color:#204A87" href="#joystick">joystick</a> control of the motors.
<b><i>stopbutton (int, default: -1)</i></b>
If not set to -1 this specifies the index of a digital input on the <a style="color:#204A87" href="#interface kit">interface kit</a> to be used to stop <a style="color:#204A87" href="#joystick">joystick</a> control of the motors.
<b><i>enablesound (str, default: "<a style="color:#204A87" href="#joystick">Joystick</a></i></b><b><i> control enabled")</i></b>
Some text to be spoken via text-to-speech when <a style="color:#204A87" href="#joystick">joystick</a> motor control is initially enabled.
<b><i>startbuttonsound (str, default: "Started")</i></b>
Some text to be spoken via text-to-speech when <a style="color:#204A87" href="#joystick">joystick</a> motor control is started by pressing the start button.
<b><i>stopbuttonsound (str, default: "Stopped")</i></b>
Some text to be spoken via text-to-speech when <a style="color:#204A87" href="#joystick">joystick</a> motor control is stopped by pressing the stop button.
<b><i>speed (float, default: 20)</i></b>
Speed value sent to the motors.
<b><i>acceleration (float, default: 20)</i></b>
Acceleration value sent to the motors.
<b><i>deadband (float, default: 0.1)</i></b>
<a style="color:#204A87" href="#joystick">Joystick</a> deadband in the range 0-1. This helps to prevent continual speed changes being made if the <a style="color:#204A87" href="#joystick">joystick</a> moves by some small amount.
<b><span style="font-size:large">Example launch file</span></b>
<!--
Launcher for <a style="color:#204A87" href="#joystick">joystick</a> control of two motors.
This requires:
Phidgets <a style="color:#204A87" href="#motor control hc">motor control HC</a>
Phidgets 8/8/8 <a style="color:#204A87" href="#interface kit">interface kit</a>
Analog <a style="color:#204A87" href="#joystick">joystick</a> connected to sensors 1 and 2 on the <a style="color:#204A87" href="#interface kit">interface kit</a>
Start and stop buttons (normally off momentary switch) connected to digital inputs 0 and 1
-->
<launch>
<!-- Machine settings. See <a style="color:#3465A4" href="http://www.ros.org/wiki/roslaunch/XML/machine">http://www.ros.org/wiki/roslaunch/XML/machine</a> -->
<machine name="local_alt" address="localhost" default="true" />
<!-- phidgets <a style="color:#204A87" href="#motor control hc">motor control HC</a> -->
<node pkg="phidgets" type="motor_control_hc" name="motor_control_hc" respawn="true">
<!-- phidget device serial number -->
<param name="serial_number" value="-1" />
</node>
<!-- phidgets 8/8/8 <a style="color:#204A87" href="#interface kit">interface kit</a> -->
<node pkg="phidgets" type="interface_kit" name="interface_kit" respawn="true">
<!-- phidget device serial number -->
<param name="serial_number" value="-1" />
</node>
<!-- virtual <a style="color:#204A87" href="#joystick">joystick</a> -->
<node pkg="phidgets" type="<a style="color:#204A87" href="#joystick">joystick</a>" name="<a style="color:#204A87" href="#joystick">joystick</a>" respawn="true">
<!-- <a style="color:#204A87" href="#interface kit">interface kit</a> sensor index for the horizontal <a style="color:#204A87" href="#joystick">joystick</a> axis -->
<param name="horizontalaxis" value="1" />
<!-- <a style="color:#204A87" href="#interface kit">interface kit</a> sensor index for the vertical <a style="color:#204A87" href="#joystick">joystick</a> axis -->
<param name="verticalaxis" value="2" />
<!-- direction of the horizontal <a style="color:#204A87" href="#joystick">joystick</a> axis (1 or -1) -->
<param name="horizontaldirection" value="1" />
<!-- direction of the horizontal <a style="color:#204A87" href="#joystick">joystick</a> axis (1 or -1) -->
<param name="verticaldirection" value="1" />
</node>
<!-- speech synthesis -->
<node name="talker" pkg="sound_play" type="soundplay_node.py" />
<!-- <a style="color:#204A87" href="#joystick">joystick</a> control -->
<node pkg="phidgets" type="<a style="color:#204A87" href="#joystick">joystick</a>_motor_control" name="<a style="color:#204A87" href="#joystick">joystick</a>_motor_control" respawn="true">
<!-- whether <a style="color:#204A87" href="#joystick">joystick</a> control is enabled by default or waits to be enabled by some other system -->
<param name="enable" value="true" />
<!-- maximum speed value sent to the motor controller -->
<param name="speed" value="30" />
<!-- start button index of the digital input on the <a style="color:#204A87" href="#interface kit">interface kit</a> -->
<param name="startbutton" value="0" />
<!-- stop button index of the digital input on the <a style="color:#204A87" href="#interface kit">interface kit</a> -->
<param name="stopbutton" value="1" />
</node>
</launch>
</div>
<div class="note" id="Joystick Servo Control"><a name="joystick servo control"></a><h1>Joystick Servo Control</h1>
<b>Source File:</b> <a style="color:#204A87" href="#joystick">joystick</a>_servo_control.cpp
This is a virtual device, which uses the Mini <a style="color:#204A87" href="#joystick">Joystick</a> Sensor, Phidgets <a style="color:#204A87" href="#interface kit">interface kit</a> and <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a> devices in order to enable <a style="color:#204A87" href="#joystick">joystick</a> control of a pair of servos.
This can be enabled or disabled by setting the <i><a style="color:#204A87" href="#joystick">joystick</a></i><i>/enable_servo_control</i> parameter.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b>
This sets the topic path for the Phidgets devices
<b><i>joystickname (str, default: "<a style="color:#204A87" href="#joystick">joystick</a></i></b><b><i>")</i></b>
An optional name for the <a style="color:#204A87" href="#joystick">joystick</a> virtual device.
<b><i>servocontrolname (str, default: "servos")</i></b>
An optional name for the <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a> device.
<b><i>servoreference (str, default: "servo_reference")</i></b>
Service used to set servo positions.
<b><i>servoindex0 (int, default 0)</i></b>
Index number of the servo which will be controlled by the horizontal (sideways) <a style="color:#204A87" href="#joystick">joystick</a> axis.
<b><i>servoindex1 (int, default 1)</i></b>
Index number of the servo which will be controlled by the vertical (forward) <a style="color:#204A87" href="#joystick">joystick</a> axis.
<b><i>speed (float, default: 20)</i></b>
Speed value sent to the servos.
<b><i>acceleration (float, default: 50)</i></b>
Acceleration value sent to the servos.
<b><i>deadband (float, default: 0.01)</i></b>
<a style="color:#204A87" href="#joystick">Joystick</a> deadband in the range 0-1. This helps to prevent continual servo position changes being made if the <a style="color:#204A87" href="#joystick">joystick</a> moves by some small amount.
</div>
<div class="note" id="Servo Glimpse"><a name="servo glimpse"></a><h1>Servo Glimpse</h1>
<b>Source File:</b> servo_glimpse.cpp
This is a virtual device, which uses the Phidgets <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a> device to control pan and tilt axes and capture multiple views using a stereo camera or other ranging device.
<b><span style="font-size:large">Launch Parameters</span></b>
<b><i>topic_path (str, default: "phidgets/")
</i></b> This sets the topic path for Phidgets device topics.
<b><i>glimpsecommand (str, default: "")</i></b>
The command to be run at each pan/tilt position.
<b><i>finalcommand (str, default: "")</i></b>
A final command to be run after all pan/tilt positions have been visited.
<b><i>glimpsecommans2 (str, default: "")</i></b>
An optional secondary command to be run at each pan/tilt position.
<b><i>finalcommand2 (str, default: "")</i></b>
An optional secondary final command to be run after all pan/tilt positions have been visited.
<b><i>outputdirectory (str, default: "")</i></b>
A directory where output files or images will be saved.
<b><i>forward (int, default: 0)</i></b>
Foward position of the ranging device from the centre of the pan axis. Typically this is in millimetres.
<b><i>vertical (int, default: 0)</i></b>
Vertical position of the ranging device from the centre of the pan axis. Typically this is in millimetres.
<b><i>baseline (int, default: 120)</i></b>
If a stereo camera is being used this value gives the baseline distance in millimetres.
<b><i>speed (float, default: 20)</i></b>
Speed value sent to the servo controller.
<b><i>acceleration (float, default: 50)</i></b>
Acceleration value sent to the servo controller
<b><i>servo0pos0 (float)</i></b>
Calibration starting pan position in servo coordinates.
<b><i>servo0angle0 (float)</i></b>
Calibration starting pan angle in degrees.
<b><i>servo0pos1 (float)</i></b>
Calibration ending pan position in servo coordinates.
<b><i>servo0angle1 (float)</i></b>
Calibration ending pan angle in degrees.
<b><i>servo1pos0 (float)</i></b>
Calibration starting tilt position in servo coordinates.
<b><i>servo1angle0 (float)</i></b>
Calibration starting tilt angle in degrees.
<b><i>servo1pos1 (float)</i></b>
Calibration ending tilt position in servo coordinates.
<b><i>servo1angle1 (float)</i></b>
Calibration ending tilt angle in degrees.
<b><i>servoindex0 (int, default: 0)</i></b>
Index number of the pan axis servo.
<b><i>servoindex1 (int, default: 1)</i></b>
Index number of the tilt axis servo.
<b><i>minpanangle (float)</i></b>
The starting pan angle for the glimpse in degrees.
<b><i>maxpanangle (float)</i></b>
The ending pan angle for the glimpse in degrees.
<b><i>mintiltangle (float)</i></b>
The starting tilt angle for the glimpse in degrees.
<b><i>maxtiltangle (float)</i></b>
The ending tilt angle for the glimpse in degrees.
<b><i>pansteps (int, default: 3)</i></b>
The number of pan steps to take between the minimum and maximum pan angles.
<b><i>tiltsteps (int, default: 3)</i></b>
The number of tilt steps to take between the minimum and maximum tilt angles.
<b><i>glimpsetime (int, default: 2)</i></b>
The time to dwell at each pan/tilt position in seconds.
<b><i>servoreference (str, default: "servo_reference")</i></b>
Service used by the <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a> to set servo positions.
<b><i>servocontrollername (str, default: "servos")</i></b>
Topic published by the <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a>.
<b><span style="font-size:large">Example launch file</span></b>
<!--
Launcher for servo glimpse
This requires:
Phidgets <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a>
Pan servo connected to servo 0
Tilt servo connected to servo 1
v4l2stereo and pcloud utilities installed
Stereo camera
-->
<launch>
<!-- Machine settings. See <a style="color:#3465A4" href="http://www.ros.org/wiki/roslaunch/XML/machine">http://www.ros.org/wiki/roslaunch/XML/machine</a> -->
<machine name="local_alt" address="localhost" default="true" />
<!-- phidgets <a style="color:#204A87" href="#advanced servo controller">advanced servo controller</a> -->
<node pkg="phidgets" type="advanced_servo" name="advanced_servo" respawn="true">
<!-- phidget device serial number -->
<param name="serial_number" value="-1" />
</node>
<!-- glimpse -->
<node pkg="phidgets" type="servo_glimpse" name="servo_glimpse" respawn="false" output="screen">
<!-- -->
<param name="enable" value="true" />
<!-- Speed of movement -->
<param name="speed" value="80" />
<!-- Acceleration of movement -->