10 from random
import random, choice
11 rospy.init_node(
"pictogram_all_sample")
12 p = rospy.Publisher(
"/pictogram_array", PictogramArray)
15 actions = [Pictogram.JUMP, Pictogram.JUMP_ONCE, Pictogram.ADD,
16 Pictogram.ROTATE_X, Pictogram.ROTATE_Y, Pictogram.ROTATE_Z]
17 pictograms = [
"phone",
226 "chevron-small-left",
227 "chevron-small-down",
229 "chevron-small-right",
233 "chevron-thin-right",
374 "fa-question-circle",
388 "fa-exclamation-circle",
394 "fa-exclamation-triangle",
408 "fa-facebook-square",
431 "fa-hand-point-right",
432 "fa-hand-point-left",
434 "fa-hand-point-down",
435 "fa-arrow-circle-left",
436 "fa-arrow-circle-right",
437 "fa-arrow-circle-up",
438 "fa-arrow-circle-down",
463 "fa-pinterest-square",
464 "fa-google-plus-square",
496 "fa-angle-double-left",
497 "fa-angle-double-right",
498 "fa-angle-double-up",
499 "fa-angle-double-down",
534 "fa-microphone-slash",
536 "fa-fire-extinguisher",
539 "fa-chevron-circle-left",
540 "fa-chevron-circle-right",
541 "fa-chevron-circle-up",
542 "fa-chevron-circle-down",
557 "fa-caret-square-down",
558 "fa-caret-square-up",
559 "fa-caret-square-right",
570 "fa-sort-alpha-down",
572 "fa-sort-amount-down",
574 "fa-sort-numeric-down",
575 "fa-sort-numeric-up",
609 "fa-caret-square-left",
616 "fa-envelope-square",
625 "fa-stumbleupon-circle",
655 "fa-file-powerpoint",
680 "fa-share-alt-square",
718 "fa-closed-captioning",
730 "fa-cart-arrow-down",
740 "fa-transgender-alt",
764 "fa-battery-three-quarters",
766 "fa-battery-quarter",
777 "fa-hourglass-start",
790 "fa-creative-commons",
795 "fa-odnoklassniki-square",
802 "fa-internet-explorer",
832 "fa-shopping-basket",
841 "fa-universal-access",
843 "fa-audio-description",
846 "fa-assistive-listening-systems",
847 "fa-american-sign-language-interpreting",
857 "fa-snapchat-square",
875 "fa-thermometer-full",
876 "fa-thermometer-three-quarters",
877 "fa-thermometer-half",
878 "fa-thermometer-quarter",
879 "fa-thermometer-empty",
883 "fa-window-maximize",
884 "fa-window-minimize",
911 "fa-long-arrow-alt-down",
912 "fa-long-arrow-alt-left",
913 "fa-long-arrow-alt-right",
914 "fa-long-arrow-alt-up",
915 "fa-expand-arrows-alt",
919 "fa-arrow-alt-circle-down",
920 "fa-arrow-alt-circle-left",
921 "fa-arrow-alt-circle-right",
922 "fa-arrow-alt-circle-up",
923 "fa-font-awesome-alt",
924 "fa-external-link-alt",
925 "fa-external-link-square-alt",
927 "fa-accessible-icon",
947 "fa-buromobelexperte",
949 "fa-cloud-download-alt",
950 "fa-cloud-upload-alt",
966 "fa-dribbble-square",
971 "fa-facebook-messenger",
974 "fa-fort-awesome-alt",
986 "fa-hacker-news-square",
1000 "fa-level-down-alt",
1006 "fa-map-marker-alt",
1010 "fa-microphone-alt",
1016 "fa-money-bill-alt",
1027 "fa-phoenix-framework",
1053 "fa-tachometer-alt",
1054 "fa-telegram-plane",
1066 "fa-whatsapp-square",
1069 "fa-wordpress-simple",
1072 "fa-yandex-international",
1088 "fa-font-awesome-flag",
1100 "fa-youtube-square",
1102 "fa-basketball-ball",
1123 "fa-volleyball-ball",
1128 "fa-briefcase-medical",
1131 "fa-clipboard-check",
1132 "fa-clipboard-list",
1138 "fa-file-medical-alt",
1141 "fa-hospital-symbol",
1146 "fa-prescription-bottle",
1147 "fa-prescription-bottle-alt",
1166 "fa-hand-holding-heart",
1167 "fa-hand-holding-usd",
1185 "fa-pied-piper-hat",
1186 "fa-font-awesome-logo-full",
1187 "fa-creative-commons-by",
1188 "fa-creative-commons-nc",
1189 "fa-creative-commons-nc-eu",
1190 "fa-creative-commons-nc-jp",
1191 "fa-creative-commons-nd",
1192 "fa-creative-commons-pd",
1193 "fa-creative-commons-pd-alt",
1194 "fa-creative-commons-remix",
1195 "fa-creative-commons-sa",
1196 "fa-creative-commons-sampling",
1197 "fa-creative-commons-sampling-plus",
1198 "fa-creative-commons-share",
1199 "fa-creative-commons-zero",
1206 "fa-user-alt-slash",
1207 "fa-user-astronaut",
1222 "fa-first-order-alt",
1224 "fa-galactic-republic",
1225 "fa-galactic-senate",
1229 "fa-phoenix-squadron",
1231 "fa-trade-federation",
1232 "fa-wolf-pack-battalion",
1233 "fa-balance-scale-left",
1234 "fa-balance-scale-right",
1237 "fa-broadcast-tower",
1240 "fa-chalkboard-teacher",
1262 "fa-greater-than-equal",
1267 "fa-less-than-equal",
1269 "fa-microphone-alt-slash",
1270 "fa-money-bill-wave",
1271 "fa-money-bill-wave-alt",
1273 "fa-money-check-alt",
1278 "fa-project-diagram",
1282 "fa-ruler-combined",
1283 "fa-ruler-horizontal",
1284 "fa-ruler-vertical",
1310 "fa-concierge-bell",
1314 "fa-digital-tachograph",
1316 "fa-drafting-compass",
1325 "fa-file-invoice-dollar",
1326 "fa-file-prescription",
1327 "fa-file-signature",
1335 "fa-glass-martini-alt",
1337 "fa-globe-americas",
1343 "fa-grin-beam-sweat",
1346 "fa-grin-squint-tears",
1350 "fa-grin-tongue-squint",
1351 "fa-grin-tongue-wink",
1353 "fa-grip-horizontal",
1355 "fa-headphones-alt",
1364 "fa-kiss-wink-heart",
1372 "fa-map-marked-alt",
1377 "fa-meh-rolling-eyes",
1387 "fa-plane-departure",
1403 "fa-suitcase-rolling",
1412 "fa-umbrella-beach",
1415 "fa-weight-hanging",
1416 "fa-wine-glass-alt",
1428 "fa-charging-station",
1456 "fa-comment-dollar",
1457 "fa-comments-dollar",
1460 "fa-envelope-open-text",
1468 "fa-journal-whills",
1476 "fa-pastafarianism",
1478 "fa-place-of-worship",
1485 "fa-search-location",
1487 "fa-square-root-alt",
1488 "fa-star-and-crescent",
1497 "fa-acquisitions-incorporated",
1506 "fa-d-and-d-beyond",
1512 "fa-drumstick-bite",
1514 "fa-fantasy-flight-games",
1534 "fa-skull-crossbones",
1543 "fa-wizards-of-the-coast",
1545 "fa-cloud-meatball",
1546 "fa-cloud-moon-rain",
1548 "fa-cloud-showers-heavy",
1549 "fa-cloud-sun-rain",
1559 "fa-temperature-high",
1560 "fa-temperature-low",
1572 "fa-canadian-maple-leaf",
1577 "fa-compress-arrows-alt",
1592 "fa-grip-lines-vertical",
1611 "fa-satellite-dish",
1638 "fa-clinic-medical",
1639 "fa-comment-medical",
1643 "fa-hand-middle-finger",
1647 "fa-laptop-medical",
1652 "fa-trash-restore-alt",
1676 "fa-phone-square-alt",
1679 "fa-sort-alpha-down-alt",
1680 "fa-sort-alpha-up-alt",
1681 "fa-sort-amount-down-alt",
1682 "fa-sort-amount-up-alt",
1683 "fa-sort-numeric-down-alt",
1684 "fa-sort-numeric-up-alt",
1690 "fa-hat-cowboy-side",
1698 "fa-firefox-browser",
1701 "fa-pied-piper-square",
1706 while not rospy.is_shutdown():
1707 initial_x = -int(math.sqrt(len(pictograms)))/2
1708 arr = PictogramArray()
1709 arr.header.frame_id =
"/base_link"
1710 arr.header.stamp = rospy.Time.now()
1711 prev_xyz = [initial_x, -10, 0]
1712 for character
in pictograms:
1714 msg.header.frame_id =
"/base_link"
1715 msg.action = choice(actions)
1716 msg.header.stamp = rospy.Time.now()
1717 msg.pose.position.x = prev_xyz[0] + 1
1718 msg.pose.position.y = prev_xyz[1]
1719 msg.pose.position.z = 0
1720 msg.pose.orientation.w = 0.7
1721 msg.pose.orientation.x = 0
1722 msg.pose.orientation.y = -0.7
1723 msg.pose.orientation.z = 0
1725 msg.color.r = 25 / 255.0
1726 msg.color.g = 255 / 255.0
1727 msg.color.b = 240 / 255.0
1729 msg.character = character
1730 arr.pictograms.append(msg)
1731 prev_xyz = [msg.pose.position.x, msg.pose.position.y, msg.pose.position.z]
1732 if prev_xyz[0] > -initial_x:
1733 prev_xyz[0] = initial_x
1734 prev_xyz[1] = prev_xyz[1] + 1
1737 counter = counter + 1
1738 if len(pictograms) == counter: