Compare commits

..

443 Commits

Author SHA1 Message Date
Zhengyu Peng 1a4ba3b896 Update path_generator.py 2022-03-13 14:38:30 -04:00
Zhengyu Peng cc56c9c0ef Update config.json 2022-03-12 20:49:56 -05:00
Zhengyu Peng 3292fd8a30 Update path_generator.py 2022-03-12 18:54:16 -05:00
Zhengyu Peng 848a866491 Update path_generator.py 2022-03-12 16:27:04 -05:00
Zhengyu Peng 465253434e Update path_generator.py 2022-03-12 16:25:46 -05:00
Zhengyu Peng b420396896 Update path_generator.py 2022-03-12 16:22:48 -05:00
Zhengyu Peng 9af5f221e7 Update path_generator.py 2022-03-12 16:16:30 -05:00
Zhengyu Peng c7b13c1e66 Update path_generator.py 2022-03-12 16:14:55 -05:00
Zhengyu Peng 26968a0cc2 Update hexapod.py 2022-03-12 16:02:26 -05:00
Zhengyu Peng 3f6fc6b1e5 Update hexapod.py 2022-03-11 18:44:54 -05:00
Zhengyu Peng 68ea437305 Update hexapod.py 2022-03-07 22:49:16 -05:00
Zhengyu Peng b16a91f3d4 Update hexapod.py 2022-03-07 22:41:10 -05:00
Zhengyu Peng 65370b01a8 Update hexapod.py 2022-03-07 22:40:22 -05:00
Zhengyu Peng 46ab42e8c0 Update hexapod.py 2022-03-07 22:35:42 -05:00
Zhengyu Peng aecc14dfc2 Update hexapod.py 2022-03-06 22:09:50 -05:00
Zhengyu Peng 9f5b78f6ff Update hexapod.py 2022-03-06 20:28:37 -05:00
Zhengyu Peng fd249860de Update hexapod.py 2022-03-06 20:25:55 -05:00
Zhengyu Peng de05c6bcff adding scale 2022-03-06 13:38:42 -05:00
Zhengyu Peng 615b8b3e89 get calibration data from config 2022-03-06 13:38:30 -05:00
Zhengyu Peng 52d9b0c9ef Update config.json 2022-03-05 22:24:49 -05:00
Zhengyu Peng fdc6706dc1 Update README.md 2022-03-04 22:20:39 -05:00
Zhengyu Peng 276e953c4b Update README.md 2022-03-04 22:20:04 -05:00
Zhengyu Peng 84fd7aa6f4 Update pc_interface.jpg 2022-03-04 22:20:02 -05:00
Zhengyu Peng f957cb8205 shortcut support 2022-03-04 21:50:53 -05:00
Zhengyu Peng 1c07896b2f Update mainwindow.ui 2022-03-04 21:21:45 -05:00
Zhengyu Peng 13091317f3 Update hexapod.py 2022-03-04 21:21:42 -05:00
Zhengyu Peng f16890d5d3 Update hexapod.py 2022-03-04 20:20:09 -05:00
Zhengyu Peng 4313143f18 Update hexapod.py 2022-03-04 20:11:55 -05:00
Zhengyu Peng 8d3347dc2f Update hexapod.py 2022-03-04 16:57:18 -05:00
Zhengyu Peng 6f9043a8e4 Create btclient.py 2022-03-04 16:57:07 -05:00
Zhengyu Peng e5e0306ca4 Update mainwindow.ui 2022-03-04 16:47:35 -05:00
Zhengyu Peng b32d04c529 Update hexapod.py 2022-03-04 16:47:31 -05:00
Zhengyu Peng 6508a0c246 Update mainwindow.ui 2022-03-04 16:41:25 -05:00
Zhengyu Peng 2b421c6f6b Update hexapod.py 2022-03-04 16:41:19 -05:00
Zhengyu Peng a8c416eacc Update hexapod.py 2022-03-04 16:09:06 -05:00
Zhengyu Peng 93bed7edc6 update GUI 2022-03-04 16:08:54 -05:00
Zhengyu Peng e2ebf32698 Update hexapod.py 2022-02-27 21:57:06 -05:00
Zhengyu Peng c74f9b1078 Update hexapod.py 2022-02-27 19:31:07 -05:00
Zhengyu Peng 73e1d8825f Update hexapod.py 2022-02-27 18:31:30 -05:00
Zhengyu Peng 708d8c5a71 Update hexapod.py 2022-02-27 18:26:12 -05:00
Zhengyu Peng 36bd9ae674 Update hexapod.py 2022-02-27 18:22:57 -05:00
Zhengyu Peng b682bb8e19 Update hexapod.py 2022-02-27 18:16:52 -05:00
Zhengyu Peng d27a9d81a3 Update hexapod.py 2022-02-27 15:52:47 -05:00
Zhengyu Peng 83c6621482 update control logic 2022-02-27 11:40:58 -05:00
Zhengyu Peng e75a1c983d Update README.md 2022-02-24 12:55:06 -05:00
Zhengyu Peng aba81a02c1 update screenshots 2022-02-24 12:46:21 -05:00
Zhengyu Peng 12798c8588 check bluetooth enabled 2022-02-24 10:07:50 -05:00
Zhengyu Peng 22a375a2ee clean 2022-02-24 09:30:59 -05:00
Zhengyu Peng 93757eeb2f check if Bluetooth is enabled 2022-02-24 09:30:45 -05:00
Zhengyu Peng 1919e6291f Delete Constants.kt 2022-02-24 09:30:25 -05:00
Zhengyu Peng 5b076f81a8 Delete BluetoothService.kt 2022-02-24 09:30:22 -05:00
Zhengyu Peng 0b0d9a837c adjust GUI 2022-02-24 08:18:13 -05:00
Zhengyu Peng 16c746ad2d adjust control circle 2022-02-24 08:02:44 -05:00
Zhengyu Peng 8830f7e2ef clean 2022-02-23 22:08:52 -05:00
Zhengyu Peng fcfcfe4c7c Update build.gradle 2022-02-23 21:37:33 -05:00
Zhengyu Peng 5172a24509 Update build.gradle 2022-02-23 19:55:20 -05:00
Zhengyu Peng 0764e76ddb Update ControlActivity.kt 2022-02-23 19:55:05 -05:00
Zhengyu Peng cf470109e7 rename 2022-02-23 19:20:27 -05:00
Zhengyu Peng 5cc6613a3e update 2022-02-23 19:06:04 -05:00
Zhengyu Peng 7a88ffbfa7 Merge branch 'main' of https://github.com/rookiepeng/hexapod 2022-02-23 18:49:38 -05:00
Zhengyu Peng 40fcbbf578 update 2022-02-23 18:49:35 -05:00
Zhengyu Peng 78f8edcecf Update README.md 2022-02-23 16:02:46 -05:00
Zhengyu Peng df93fcbdc0 clean 2022-02-23 15:59:43 -05:00
Zhengyu Peng 75bfa63a22 update 2022-02-23 15:55:58 -05:00
Zhengyu Peng 7dd9b5a490 update 2022-02-23 15:45:24 -05:00
Zhengyu Peng 1b111e5547 update 2022-02-23 15:13:49 -05:00
Zhengyu Peng 92c2947c95 Update path_generator.py 2022-02-23 15:13:01 -05:00
Zhengyu Peng af1032f8ca update 2022-02-23 15:12:42 -05:00
Zhengyu Peng ac3c6e1715 Update path_generator.py 2022-02-23 14:17:52 -05:00
Zhengyu Peng d09aac119c Update hexapod.py 2022-02-23 13:12:00 -05:00
Zhengyu Peng 38dfafc141 Update ControlActivity.kt 2022-02-23 13:09:19 -05:00
Zhengyu Peng 33a3bf1d68 Update hexapod.py 2022-02-23 13:06:48 -05:00
Zhengyu Peng 3ced88ec84 Update tcpserver.py 2022-02-23 13:03:35 -05:00
Zhengyu Peng 499682c1f2 Update btserver.py 2022-02-23 13:03:33 -05:00
Zhengyu Peng 8bc2d51af0 Update hexapod.py 2022-02-23 13:01:11 -05:00
Zhengyu Peng e200898015 Update btserver.py 2022-02-23 12:58:58 -05:00
Zhengyu Peng 78e95f3650 Update btserver.py 2022-02-23 12:57:07 -05:00
Zhengyu Peng 5d38bdccda Update hexapod.py 2022-02-23 12:53:33 -05:00
Zhengyu Peng bc1deab1e9 Update hexapod.py 2022-02-23 12:51:43 -05:00
Zhengyu Peng b3525a8185 Update hexapod.py 2022-02-23 12:49:52 -05:00
Zhengyu Peng f55ad94ec6 Update path_generator.py 2022-02-23 12:35:41 -05:00
Zhengyu Peng e14084b13f Update hexapod.py 2022-02-23 12:35:34 -05:00
Zhengyu Peng 105c8911ac Update hexapod.py 2022-02-23 12:23:38 -05:00
Zhengyu Peng 3a6473f278 Update path_generator.py 2022-02-23 12:23:35 -05:00
Zhengyu Peng 3c95662453 Update hexapod.py 2022-02-23 12:17:50 -05:00
Zhengyu Peng cd70b150b0 Update path_generator.py 2022-02-23 12:17:45 -05:00
Zhengyu Peng 6fb91723bb Update hexapod.py 2022-02-23 11:36:32 -05:00
Zhengyu Peng cdb0d7de26 Update path_generator.py 2022-02-23 11:36:22 -05:00
Zhengyu Peng 0c59db3d1c Update hexapod.py 2022-02-23 11:31:12 -05:00
Zhengyu Peng 54915d6dc6 Update path_generator.py 2022-02-23 11:31:01 -05:00
Zhengyu Peng c8b632ea68 Update hexapod.py 2022-02-23 11:17:59 -05:00
Zhengyu Peng 1e7bd49677 Update tcpserver.py 2022-02-23 11:01:52 -05:00
Zhengyu Peng 19264b0232 Update btserver.py 2022-02-23 11:01:49 -05:00
Zhengyu Peng efc02342e6 Update hexapod.py 2022-02-23 11:01:44 -05:00
Zhengyu Peng 0e142f4e66 Update MainActivity.kt 2022-02-22 23:32:13 -05:00
Zhengyu Peng ceffff46b8 Update MainActivity.kt 2022-02-22 23:32:03 -05:00
Zhengyu Peng c2cec9b95d Update MainActivity.kt 2022-02-22 22:58:28 -05:00
Zhengyu Peng 07a301bc84 Update MainActivity.kt 2022-02-22 22:28:09 -05:00
Zhengyu Peng e1bc98509d update 2022-02-22 22:18:39 -05:00
Zhengyu Peng de5cf41385 Update MainActivity.kt 2022-02-22 22:10:24 -05:00
Zhengyu Peng 763bae7791 update GUI 2022-02-22 22:05:36 -05:00
Zhengyu Peng 6e2f471b5a Update activity_main.xml 2022-02-22 21:42:32 -05:00
Zhengyu Peng b04f2ad8e2 Update build.gradle 2022-02-22 21:15:48 -05:00
Zhengyu Peng 54a05bf06e Update tcpserver.py 2022-02-22 20:06:05 -05:00
Zhengyu Peng ce9329f20e Update btserver.py 2022-02-22 20:06:03 -05:00
Zhengyu Peng 2f22bd0316 Update ControlActivity.kt 2022-02-22 19:15:06 -05:00
Zhengyu Peng 227c1988f7 Update btserver.py 2022-02-22 19:15:04 -05:00
Zhengyu Peng edbb314ca6 Merge branch 'main' of https://github.com/rookiepeng/hexapod 2022-02-22 18:32:17 -05:00
Zhengyu Peng 55598ae10a Update build.gradle 2022-02-22 18:32:14 -05:00
Zhengyu Peng e7af22b776 Create BluetoothClient.kt 2022-02-22 18:32:10 -05:00
Zhengyu Peng e2cfa3aa20 Update ControlActivity.kt 2022-02-22 18:32:08 -05:00
Zhengyu Peng 23764e4a36 start bt server 2022-02-22 17:15:47 -05:00
Zhengyu Peng c64b4cfb43 update 2022-02-22 17:14:03 -05:00
Zhengyu Peng 316a067f56 update 2022-02-22 17:12:50 -05:00
Zhengyu Peng 47d918d633 get bluetooth MAC 2022-02-22 17:10:26 -05:00
Zhengyu Peng 621676c85e Merge branch 'main' of https://github.com/rookiepeng/hexapod 2022-02-22 16:50:51 -05:00
Zhengyu Peng 5d4d762b9b update 2022-02-22 16:50:41 -05:00
Zhengyu Peng c9e0eef4b8 Update btserver.py 2022-02-22 16:49:27 -05:00
Zhengyu Peng 9ef2705543 update 2022-02-22 14:16:59 -05:00
Zhengyu Peng 017199f318 Update MainActivity.kt 2022-02-22 12:21:52 -05:00
Zhengyu Peng 7136a33f63 update UI 2022-02-22 12:07:52 -05:00
Zhengyu Peng 2c0db0169c add bluetooth 2022-02-22 11:32:11 -05:00
Zhengyu Peng 14a63d584d Update Constants.kt 2022-02-21 22:42:42 -05:00
Zhengyu Peng 52b93fd4da Update BluetoothService.kt 2022-02-21 22:42:39 -05:00
Zhengyu Peng af008e165c update 2022-02-21 21:18:57 -05:00
Zhengyu Peng eceac6ca6d update 2022-02-21 15:03:14 -05:00
Zhengyu Peng f7a3c0ec27 Update misc.xml 2022-02-21 14:56:06 -05:00
Zhengyu Peng 39a449d818 update 2022-02-21 14:56:02 -05:00
Zhengyu Peng e7bebcb07b update 2022-02-21 14:51:07 -05:00
Zhengyu Peng 4c4f7c8af4 update 2022-02-21 12:46:10 -05:00
Zhengyu Peng 8020d862e3 update 2022-02-20 22:33:07 -05:00
Zhengyu Peng 5046eb26dd Update windows_app.svg 2022-02-20 15:18:50 -05:00
Zhengyu Peng 7a64390310 linux 2022-02-20 15:16:38 -05:00
Zhengyu Peng 4b7c4ff93f Update README.md 2022-02-20 15:07:48 -05:00
Zhengyu Peng ec7ac820cd windows badge 2022-02-20 15:07:15 -05:00
Zhengyu Peng a7ada08b15 Update README.md 2022-02-20 14:50:02 -05:00
Zhengyu Peng 57a07815a2 Update README.md 2022-02-20 14:46:42 -05:00
Zhengyu Peng cda6ab93a0 add google play 2022-02-20 14:45:14 -05:00
Zhengyu Peng edeeb9463f adding bluetooth 2022-02-19 22:43:01 -05:00
Zhengyu Peng 3d04e90d37 Update activity_main.xml 2022-02-19 22:42:51 -05:00
Zhengyu Peng 96b8da01da Update hexapod.py 2022-02-16 22:28:50 -05:00
Zhengyu Peng 894809401c Update leg.py 2022-02-16 22:23:28 -05:00
Zhengyu Peng 8c368adf02 Update hexapod.py 2022-02-16 22:15:37 -05:00
Zhengyu Peng d4dc5812a6 Update hexapod.py 2022-02-16 22:14:58 -05:00
Zhengyu Peng 05671eb309 Update hexapod.service 2022-02-16 21:51:54 -05:00
Zhengyu Peng ca27877268 Update hexapod.service 2022-02-16 21:50:05 -05:00
Zhengyu Peng 781be047fa Update hexapod.service 2022-02-16 21:47:26 -05:00
Zhengyu Peng bcc7aa2869 Update tcpserver.py 2022-02-16 21:42:56 -05:00
Zhengyu Peng 13026df615 update 2022-02-16 21:41:39 -05:00
Zhengyu Peng cba8a071bc Update hexapod.py 2022-02-16 21:25:52 -05:00
Zhengyu Peng a4287d64a3 Update hexapod.py 2022-02-16 21:19:07 -05:00
Zhengyu Peng e7e4a9950b Update hexapod.py 2022-02-16 21:17:15 -05:00
Zhengyu Peng 60e8be3ba5 Update hexapod.py 2022-02-16 21:16:16 -05:00
Zhengyu Peng 129e31b7a2 Update hexapod.py 2022-02-16 21:14:41 -05:00
Zhengyu Peng 9c3dfbbbbf Update hexapod.py 2022-02-16 21:10:30 -05:00
Zhengyu Peng 82e3148975 Update hexapod.py 2022-02-16 21:07:36 -05:00
Zhengyu Peng d374248ca5 Update hexapod.py 2022-02-16 21:05:49 -05:00
Zhengyu Peng 7bf1646d1e Update hexapod.py 2022-02-16 21:04:52 -05:00
Zhengyu Peng a02d71eb93 Update hexapod.py 2022-02-16 21:03:50 -05:00
Zhengyu Peng 810701ef1f Update hexapod.py 2022-02-16 20:59:57 -05:00
Zhengyu Peng b2b64ca5c2 Update hexapod.py 2022-02-16 20:56:58 -05:00
Zhengyu Peng bcd8cd35a5 Update hexapod.py 2022-02-16 20:55:45 -05:00
Zhengyu Peng a7a1fb61b4 Update hexapod.py 2022-02-16 20:39:36 -05:00
Zhengyu Peng ff5b584d9c Update path_generator.py 2022-02-16 20:34:51 -05:00
Zhengyu Peng bfc1fedbde Update hexapod.py 2022-02-16 20:34:49 -05:00
Zhengyu Peng af52445efa Update activity_main.xml 2022-02-15 22:37:34 -05:00
Zhengyu Peng 449873950c Update .gitignore 2022-02-15 21:44:31 -05:00
Zhengyu Peng 022d98be9c Update ControlActivity.kt 2022-02-15 20:22:08 -05:00
Zhengyu Peng 318088797d Create ic_baseline_error_24.xml 2022-02-15 20:22:04 -05:00
Zhengyu Peng 6c88f3a9cc Update screenshot_connect.png 2022-02-15 20:21:55 -05:00
Zhengyu Peng 3e1c20ba08 Update MainActivity.kt 2022-02-15 17:42:55 -05:00
Zhengyu Peng 14defb2e10 update 2022-02-15 16:47:50 -05:00
Zhengyu Peng 91a8020659 Update README.md 2022-02-15 16:09:27 -05:00
Zhengyu Peng c474a182ea Merge branch 'main' of https://github.com/rookiepeng/hexapod 2022-02-15 16:06:35 -05:00
Zhengyu Peng 09ee7127dc Update README.md 2022-02-15 16:06:31 -05:00
Zhengyu Peng 8e2620dae0 Update README.md 2022-02-15 16:05:59 -05:00
Zhengyu Peng 1b360d8c89 add android screenshots 2022-02-15 16:00:42 -05:00
Zhengyu Peng e4f6e8b2b8 update 2022-02-15 14:08:55 -05:00
Zhengyu Peng 8e392679c1 update icons 2022-02-15 14:08:46 -05:00
Zhengyu Peng 0e7d01edbd control circles 2022-02-15 12:28:41 -05:00
Zhengyu Peng 8f3e4250fe Update TCPClient.kt 2022-02-15 07:53:05 -05:00
Zhengyu Peng db25d6553a Update TCPClient.kt 2022-02-15 07:46:18 -05:00
Zhengyu Peng 86d63d4460 update 2022-02-14 23:06:07 -05:00
Zhengyu Peng 50518c5035 update 2022-02-14 21:18:29 -05:00
Zhengyu Peng d75a8bb2b2 update 2022-02-14 19:58:41 -05:00
Zhengyu Peng 927b11e2bf update 2022-02-14 16:47:57 -05:00
Zhengyu Peng 3f618711bd update 2022-02-14 14:56:18 -05:00
Zhengyu Peng 5c2d042211 update 2022-02-14 11:42:02 -05:00
Zhengyu Peng 1a9279e152 update 2022-02-14 09:03:58 -05:00
Zhengyu Peng a356870ac1 update 2022-02-13 22:51:40 -05:00
Zhengyu Peng 457983cff0 update 2022-02-13 22:05:45 -05:00
Zhengyu Peng 34622c5efe update 2022-02-13 21:14:46 -05:00
Zhengyu Peng 7f5d34a405 update 2022-02-13 09:50:26 -05:00
Zhengyu Peng 3fa3669f34 update 2022-02-10 21:26:34 -05:00
Zhengyu Peng 901c49017b Update activity_main.xml 2022-02-09 21:14:04 -05:00
Zhengyu Peng 17c73e06f3 update 2022-02-09 11:14:21 -05:00
Zhengyu Peng 2c1bb808fd update battery box stl 2022-02-03 14:12:06 -05:00
Zhengyu Peng 34f1a2c15b Update hexapod.py 2022-01-17 22:22:22 -05:00
Zhengyu Peng e8c53a6fed Delete README.md 2022-01-09 15:49:54 -05:00
Zhengyu Peng 8589485e8f Update README.md 2022-01-08 13:03:33 -05:00
Zhengyu Peng ff77541f12 Update README.md 2022-01-08 13:02:46 -05:00
Zhengyu Peng 33e7a0b919 Update README.md 2022-01-08 09:54:25 -05:00
Zhengyu Peng 1d60de2ec8 Update README.md 2022-01-08 09:31:04 -05:00
Zhengyu Peng e892f998d4 Merge branch 'main' of https://github.com/rookiepeng/hexapod 2022-01-08 09:30:07 -05:00
Zhengyu Peng f9d3ecfbdc Delete animation_3.gif 2022-01-08 09:30:04 -05:00
Zhengyu Peng 3603732b51 Delete animation_2.gif 2022-01-08 09:30:02 -05:00
Zhengyu Peng 337338f5c8 Delete animation_1.gif 2022-01-08 09:29:57 -05:00
Zhengyu Peng 894ef7f081 Update README.md 2022-01-08 09:18:02 -05:00
Zhengyu Peng c27fabee9b Update README.md 2022-01-07 22:16:03 -05:00
Zhengyu Peng b20b01d770 Create animation_3.gif 2022-01-07 22:15:52 -05:00
Zhengyu Peng 0348ba0da9 Create animation_2.gif 2022-01-07 22:15:36 -05:00
Zhengyu Peng 26d36c7dd8 Update README.md 2022-01-07 22:10:11 -05:00
Zhengyu Peng 0e84e0abe5 Create animation_1.gif 2022-01-07 22:09:50 -05:00
Zhengyu Peng 789eb7434b Update README.md 2022-01-07 16:14:22 -05:00
Zhengyu Peng 502a1996b4 Update README.md 2022-01-07 15:59:48 -05:00
Zhengyu Peng 0656f81f0b Update README.md 2022-01-07 15:57:11 -05:00
Zhengyu Peng 14cc8a79e4 Create pc_interface.jpg 2022-01-07 15:57:09 -05:00
Zhengyu Peng 88156ae02d Update README.md 2022-01-07 15:33:09 -05:00
Zhengyu Peng f2a8564cae Update README.md 2022-01-07 15:18:16 -05:00
Zhengyu Peng 57eac1e589 Update README.md 2022-01-07 15:17:20 -05:00
Zhengyu Peng be956d5d4f Update README.md 2022-01-07 15:01:02 -05:00
Zhengyu Peng 1a3d79334f Update README.md 2022-01-07 14:59:31 -05:00
Zhengyu Peng a02d2768f5 Update build_pc_client_windows.yml 2022-01-06 16:10:14 -05:00
Zhengyu Peng 51a4bcb237 Update build_pc_client_linux.yml 2022-01-06 16:10:07 -05:00
Zhengyu Peng 7193f5796e Create servo_horn_j3.f3d 2022-01-06 11:37:59 -05:00
Zhengyu Peng a26271b4c9 Delete servo_horn_j3.blend 2022-01-06 11:37:56 -05:00
Zhengyu Peng 3048518868 rename folders 2022-01-06 11:25:06 -05:00
Zhengyu Peng a605bbafaf Create servo_horn_j1j2.f3d 2022-01-06 10:44:23 -05:00
Zhengyu Peng f87cc98664 Delete servo_horn_j1j2.blend 2022-01-06 10:44:21 -05:00
Zhengyu Peng 3d1e5e27fc fix a typo 2022-01-05 09:33:18 -05:00
Zhengyu Peng c360292302 Update README.md 2022-01-05 07:54:41 -05:00
Zhengyu Peng 3fd79a43ec update readme 2022-01-05 07:52:07 -05:00
Zhengyu Peng 58a928b4a1 Update diagram.svg 2022-01-04 22:53:58 -05:00
Zhengyu Peng 3037f62d96 Update README.md 2022-01-04 22:48:49 -05:00
Zhengyu Peng 8a5e6179f4 Update diagram.svg 2022-01-04 22:48:23 -05:00
Zhengyu Peng 5d3c948219 Update README.md 2022-01-04 20:04:13 -05:00
Zhengyu Peng 9812e9bcde Update README.md 2022-01-04 20:04:11 -05:00
Zhengyu Peng 4583d9c6b8 Create diagram.svg 2022-01-04 20:04:09 -05:00
Zhengyu Peng 588b4b29f0 Update README.md 2022-01-04 19:38:50 -05:00
Zhengyu Peng 7662dabc77 Create XL4005.jpg 2022-01-04 19:38:47 -05:00
Zhengyu Peng 561b5899d3 Create toggle_switch.jpg 2022-01-04 19:38:46 -05:00
Zhengyu Peng 856eeacf6b Create PCA9685.jpg 2022-01-04 19:38:44 -05:00
Zhengyu Peng 9414bbf1d2 Create mini360.jpg 2022-01-04 19:38:42 -05:00
Zhengyu Peng 47d07157cd Update README.md 2022-01-04 19:16:52 -05:00
Zhengyu Peng dd4484d205 Create zero2-close-up.webp 2022-01-04 19:16:50 -05:00
Zhengyu Peng 3454dd6e82 Update README.md 2022-01-04 16:24:56 -05:00
Zhengyu Peng ca92c0ca48 Create battery_holder.jpg 2022-01-04 16:24:54 -05:00
Zhengyu Peng 385844c14f Create battery_box.jpg 2022-01-04 16:24:51 -05:00
Zhengyu Peng e7bcc797af Update README.md 2022-01-04 16:21:34 -05:00
Zhengyu Peng 1baf80741f Create servo_horn_j3.jpg 2022-01-04 16:21:32 -05:00
Zhengyu Peng 93b35031e6 Create servo_horn_j1j2.jpg 2022-01-04 16:21:30 -05:00
Zhengyu Peng 38188a1e45 Update README.md 2022-01-04 16:17:49 -05:00
Zhengyu Peng 88193364fa Update README.md 2022-01-04 16:14:18 -05:00
Zhengyu Peng df51b1c47b Update README.md 2022-01-04 16:12:50 -05:00
Zhengyu Peng 883b441ee1 Update README.md 2022-01-04 16:11:54 -05:00
Zhengyu Peng 541bdb52dc Update README.md 2022-01-04 16:08:46 -05:00
Zhengyu Peng d97bd08048 Update README.md 2022-01-04 16:06:51 -05:00
Zhengyu Peng 50e48f437a Update README.md 2022-01-04 16:05:09 -05:00
Zhengyu Peng c2bcd0d0ce Delete mech_body.png 2022-01-04 16:05:07 -05:00
Zhengyu Peng 305d6b9fae Update README.md 2022-01-04 16:00:15 -05:00
Zhengyu Peng d09d246467 Update leg_top.jpg 2022-01-04 16:00:13 -05:00
Zhengyu Peng 8af65974f7 Update leg_bottom.jpg 2022-01-04 16:00:11 -05:00
Zhengyu Peng 7bd64ec88e Update joint_top.jpg 2022-01-04 16:00:09 -05:00
Zhengyu Peng 0c6d0cf2c5 Update joint_cross.jpg 2022-01-04 16:00:07 -05:00
Zhengyu Peng 6851b406c3 Update joint_bottom.jpg 2022-01-04 16:00:04 -05:00
Zhengyu Peng 394849b642 Update foot_top.jpg 2022-01-04 16:00:01 -05:00
Zhengyu Peng 5f217d62ee Update foot_tip.jpg 2022-01-04 15:59:59 -05:00
Zhengyu Peng 3744d262a4 Update foot_ground.jpg 2022-01-04 15:59:57 -05:00
Zhengyu Peng e5642e505f Update foot_bottom.jpg 2022-01-04 15:59:55 -05:00
Zhengyu Peng a316b71311 Update README.md 2022-01-04 15:51:29 -05:00
Zhengyu Peng bab537caca Merge branch 'master' of https://github.com/rookiepeng/hexapod 2022-01-04 15:50:59 -05:00
Zhengyu Peng 11847a31d0 Update thigh_top.jpg 2022-01-04 15:41:32 -05:00
Zhengyu Peng 87b985ba95 Update thigh_bottom.jpg 2022-01-04 15:41:29 -05:00
Zhengyu Peng 77e00a61cd Update README.md 2022-01-04 13:36:39 -05:00
Zhengyu Peng b5351677fe Update README.md 2022-01-04 13:06:14 -05:00
Zhengyu Peng 49da5b8ef5 Update README.md 2022-01-04 13:04:34 -05:00
Zhengyu Peng 742ea6d617 Update body_top.jpg 2022-01-04 13:04:32 -05:00
Zhengyu Peng 22f39e6523 Update body_side_wall.jpg 2022-01-04 13:04:31 -05:00
Zhengyu Peng a28eb8d69f Update body_bottom.jpg 2022-01-04 13:04:29 -05:00
Zhengyu Peng 5aa0faec1e Update body_back_wall.jpg 2022-01-04 13:04:27 -05:00
Zhengyu Peng b29b03b5f5 Update body_back_wall.jpg 2022-01-03 22:29:11 -05:00
Zhengyu Peng 09230ea09f Update body_side_wall.jpg 2022-01-03 22:16:53 -05:00
Zhengyu Peng 93b3ad36e9 Delete tools_mount.jpg 2022-01-03 10:52:07 -05:00
Zhengyu Peng d8534ee312 Delete battery_lock.jpg 2022-01-03 10:52:05 -05:00
Zhengyu Peng 0112032a1e Update body_top.jpg 2022-01-03 10:50:15 -05:00
Zhengyu Peng cca6126d2c update 2022-01-03 10:48:29 -05:00
Zhengyu Peng ad0ac8ac90 Update README.md 2022-01-03 09:49:55 -05:00
Zhengyu Peng d481f98640 Delete body_top.blend 2022-01-02 22:05:02 -05:00
Zhengyu Peng 7cfd9f70f2 Delete body_bottom.blend 2022-01-02 22:05:00 -05:00
Zhengyu Peng c486309ff2 Create body_top.f3d 2022-01-02 22:02:54 -05:00
Zhengyu Peng b0a1756cc9 Create body_bottom.f3d 2022-01-02 20:50:01 -05:00
Zhengyu Peng 4a0fad6dee Create body_back_wall.f3d 2022-01-02 18:58:28 -05:00
Zhengyu Peng 5668320faf Update README.md 2022-01-01 20:43:20 -05:00
Zhengyu Peng f1ab1a7118 Update README.md 2022-01-01 20:42:25 -05:00
Zhengyu Peng 6c0f1985ba Update README.md 2022-01-01 20:30:19 -05:00
Zhengyu Peng 17f700caee clean 2022-01-01 20:26:18 -05:00
Zhengyu Peng 59d708acd7 Update README.md 2022-01-01 20:22:51 -05:00
Zhengyu Peng 999d73da21 update mechanism documentation 2022-01-01 20:22:21 -05:00
Zhengyu Peng 27063979a3 Update README.md 2022-01-01 20:18:23 -05:00
Zhengyu Peng a71066166a Merge branch 'master' of https://github.com/rookiepeng/hexapod 2021-12-31 20:47:31 -05:00
Zhengyu Peng 7df142a508 Update hexapod.py 2021-12-31 20:47:28 -05:00
Zhengyu Peng c3132a6aad Update README.md 2021-12-31 17:17:16 -05:00
Zhengyu Peng 4d6be4de65 update 2021-12-31 17:09:08 -05:00
Zhengyu Peng 8c3a1e8ccf update 2021-12-31 17:05:03 -05:00
Zhengyu Peng 3d604121fe Update README.md 2021-12-31 17:04:29 -05:00
Zhengyu Peng 83ca3b65f9 Update README.md 2021-12-31 17:01:42 -05:00
Zhengyu Peng 6269b56e06 Update README.md 2021-12-31 17:00:54 -05:00
Zhengyu Peng 92c210458a Update README.md 2021-12-31 16:58:21 -05:00
Zhengyu Peng d496697297 Update README.md 2021-12-31 16:53:00 -05:00
Zhengyu Peng 44aba9ba2a update 2021-12-31 16:51:19 -05:00
Zhengyu Peng 8e10d22da4 Update README.md 2021-12-31 16:43:08 -05:00
Zhengyu Peng 8258e663b6 Update README.md 2021-12-31 16:25:59 -05:00
Zhengyu Peng c3e81029e8 update calibration 2021-12-31 11:34:08 -05:00
Zhengyu Peng 2c04933596 delete old files 2021-12-30 10:51:15 -05:00
Zhengyu Peng 567641b3cf delete electronics files 2021-12-30 10:50:01 -05:00
Zhengyu Peng 352a86eac1 Delete body_center.stl 2021-12-30 10:48:45 -05:00
Zhengyu Peng acc3c11151 Delete battery_lock.stl 2021-12-30 10:48:42 -05:00
Zhengyu Peng 801d49565c delete files folder 2021-12-30 10:46:33 -05:00
Zhengyu Peng 4bf4183e43 Update README.md 2021-12-30 10:45:12 -05:00
Zhengyu Peng c9ee7d8eb9 add banner 2021-12-30 10:43:16 -05:00
Zhengyu Peng 21079fdc85 Update README.md 2021-12-30 10:40:37 -05:00
Zhengyu Peng 553e431989 update 2021-12-30 10:39:55 -05:00
Zhengyu Peng 48ffc8c5f4 Update mainwindow.ui 2021-12-30 09:47:13 -05:00
Zhengyu Peng 55bbdcacde use keyboard to control robot 2021-12-29 23:20:32 -05:00
Zhengyu Peng 2292603d6d update 2021-12-29 21:32:37 -05:00
Zhengyu Peng 788f1e460c update 2021-12-29 20:34:14 -05:00
Zhengyu Peng 0b825533c8 add battery holder 2021-12-29 11:53:35 -05:00
Zhengyu Peng 4467ebcd1b Update hexapod.jpg 2021-12-28 21:58:25 -05:00
Zhengyu Peng e5f8657ed6 new photo 2021-12-27 21:45:44 -05:00
Zhengyu Peng 6763d5d29d Update mainwindow.ui 2021-12-25 09:06:41 -05:00
Zhengyu Peng 60b64d988b Update hexapod.py 2021-12-24 21:30:07 -05:00
Zhengyu Peng e6df3e487e update 2021-12-24 14:57:54 -05:00
Zhengyu Peng 9a37a0a0f0 Create build_pc_client_linux.yml 2021-12-24 14:56:23 -05:00
Zhengyu Peng 5992430f1c Update hexapod.spec 2021-12-24 14:52:59 -05:00
Zhengyu Peng b407486fcc Update build_pc_client_windows.yml 2021-12-24 14:51:04 -05:00
Zhengyu Peng 5858c62bb5 Update build_pc_client_windows.yml 2021-12-24 14:49:02 -05:00
Zhengyu Peng e760e2f579 update 2021-12-24 14:46:13 -05:00
Zhengyu Peng 402f6a2b6a Update build_pc_client_windows.yml 2021-12-24 14:40:49 -05:00
Zhengyu Peng 601b9cf0c2 Update build_pc_client_windows.yml 2021-12-24 14:36:40 -05:00
Zhengyu Peng 1bdc4a03b1 update 2021-12-24 14:33:13 -05:00
Zhengyu Peng e87e5c1118 Create build_pc_client_windows.yml 2021-12-24 14:32:50 -05:00
Zhengyu Peng 25a94a3b1a update 2021-12-24 14:29:26 -05:00
Zhengyu Peng 26050ae306 add github action to build pc client 2021-12-24 14:28:08 -05:00
Zhengyu Peng a6188b8bdf update 2021-12-24 10:09:10 -05:00
Zhengyu Peng e1e63f7dde update 2021-12-23 23:17:17 -05:00
Zhengyu Peng d0a310b881 hexapod pc client 2021-12-23 23:05:46 -05:00
Zhengyu Peng 4ca00d7369 ui for pc controller 2021-12-23 10:45:05 -05:00
Zhengyu Peng aedd240b34 logo for hexapod 2021-12-23 10:44:47 -05:00
Zhengyu Peng f248f68e82 Merge branch 'master' of github.com:rookiepeng/hexapod 2021-12-22 20:44:33 -05:00
Zhengyu Peng 1d60c29789 update 2021-12-22 20:44:22 -05:00
Zhengyu Peng a9bae06334 add servo horn models 2021-12-19 22:27:22 -05:00
Zhengyu Peng aca385f5b0 update 2021-12-18 20:11:15 -05:00
Zhengyu Peng f4f657c701 Update leg.py 2021-12-17 07:56:01 -05:00
Zhengyu Peng 8a26705d7a add android project 2021-12-14 16:04:17 -05:00
Zhengyu Peng 766131ecfe Update hexapod.py 2021-12-11 22:04:19 -05:00
Zhengyu Peng b1f5478eb9 Merge branch 'master' of github.com:rookiepeng/hexapod 2021-12-11 22:02:57 -05:00
Zhengyu Peng 78c7a9ef40 control through TCP 2021-12-11 22:02:53 -05:00
Zhengyu Peng 8457f3ac8f Update path_generator.py 2021-12-11 15:27:10 -05:00
Zhengyu Peng 65c9d11296 Update README.md 2021-12-11 15:23:58 -05:00
Zhengyu Peng db3808bd09 clean 2021-12-11 11:45:43 -05:00
Zhengyu Peng 4c32a4fcb4 add header banner 2021-12-11 11:43:56 -05:00
Zhengyu Peng f82931da06 Update README.md 2021-12-11 10:13:24 -05:00
Zhengyu Peng c3dc17bca0 clean 2021-12-11 10:09:53 -05:00
Zhengyu Peng c53d0ee4df update 2021-12-11 10:04:27 -05:00
Zhengyu Peng 299750d47e clean 2021-12-10 23:19:27 -05:00
Zhengyu Peng 8375e95360 update 2021-12-10 23:18:45 -05:00
Zhengyu Peng 8625c80c71 Update lib.py 2021-12-10 23:16:53 -05:00
Zhengyu Peng 5a4a6336cc Update path_generator.py 2021-12-10 23:16:49 -05:00
Zhengyu Peng b12e6f33d9 simplify calculation 2021-12-10 23:15:09 -05:00
Zhengyu Peng e0af5124a7 use matrix to simplify calculation 2021-12-10 23:07:33 -05:00
Zhengyu Peng b526fdcd60 merge 2021-12-10 22:52:04 -05:00
Zhengyu Peng a7fef5ba7d Merge branch 'master' of github.com:rookiepeng/hexapod 2021-12-10 22:50:32 -05:00
Zhengyu Peng 58f9cec145 update 2021-12-10 22:49:37 -05:00
Zhengyu Peng e812db544c use matrix calculation 2021-12-10 22:10:00 -05:00
Zhengyu Peng 17d87ef422 Update path_generator.py 2021-12-10 17:04:17 -05:00
Zhengyu Peng 246f7a22cd Update path_generator.py 2021-12-10 16:55:00 -05:00
Zhengyu Peng 90fc510a21 update 2021-12-10 16:51:08 -05:00
Zhengyu Peng b03528530c update 2021-12-10 16:40:20 -05:00
Zhengyu Peng 21feba0141 Update path_generator.py 2021-12-10 16:29:43 -05:00
Zhengyu Peng 937c23f2be update 2021-12-10 15:32:53 -05:00
Zhengyu Peng b53c68bb7a twist 2021-12-10 15:03:00 -05:00
Zhengyu Peng f312acddc8 rotate z 2021-12-10 14:26:41 -05:00
Zhengyu Peng 5012ad8ad7 rotate y 2021-12-10 13:40:19 -05:00
Zhengyu Peng bee5b3a67d rotate x 2021-12-10 13:33:14 -05:00
Zhengyu Peng 578b390b72 climb 2021-12-09 22:56:58 -05:00
Zhengyu Peng 9640f03e2e shift left and right 2021-12-09 22:32:45 -05:00
Zhengyu Peng 536d3d731c add right turn 2021-12-09 21:59:32 -05:00
Zhengyu Peng 93d0994725 add left turn 2021-12-09 21:54:12 -05:00
Zhengyu Peng 118769b2c5 update 2021-12-09 21:38:53 -05:00
Zhengyu Peng 147356b1ae fast walk 2021-12-09 21:35:50 -05:00
Zhengyu Peng e06c9c2979 update 2021-12-09 21:14:32 -05:00
Zhengyu Peng 9eed4f8a21 increase limitation 2021-12-09 20:51:04 -05:00
Zhengyu Peng 0a83d5e7fb add backward move 2021-12-09 09:40:50 -05:00
Zhengyu Peng cf6fc30a19 update 2021-12-09 09:35:55 -05:00
Zhengyu Peng 7bc4e5acb8 update 2021-12-09 09:28:06 -05:00
Zhengyu Peng 836d80e9b6 use numpy array 2021-12-09 08:53:12 -05:00
Zhengyu Peng 1f8b6a7826 Update lib.py 2021-12-09 07:56:55 -05:00
Zhengyu Peng 8f5b49859c update 2021-12-08 23:04:23 -05:00
Zhengyu Peng d79593d1da update 2021-12-08 22:39:53 -05:00
Zhengyu Peng b78fd06342 update 2021-12-08 21:29:37 -05:00
Zhengyu Peng 400c15dd7d update 2021-12-08 20:20:13 -05:00
Zhengyu Peng db64d2e2c0 update 2021-12-08 13:00:13 -05:00
Zhengyu Peng c5b4af9657 Update hexapod.py 2021-12-08 11:28:39 -05:00
Zhengyu Peng 1514939a58 WIP 2021-12-08 11:11:50 -05:00
Zhengyu Peng f2e21205f0 add configuration file 2021-12-08 09:40:00 -05:00
Zhengyu Peng 0d49699b16 update calibration 2021-12-07 21:45:49 -05:00
Zhengyu Peng 4795ec01e4 calibrate legs 2021-12-07 21:31:09 -05:00
Zhengyu Peng ab96e2cf41 Merge branch 'master' of github.com:rookiepeng/hexapod 2021-12-07 13:23:48 -05:00
Zhengyu Peng 4da41acc2c flip front and back 2021-12-07 13:23:41 -05:00
Zhengyu Peng 788f06d011 update stl 2021-12-06 08:22:12 -05:00
Zhengyu Peng 94f7f78bba update design 2021-12-06 08:04:54 -05:00
Zhengyu Peng f5331b9e47 battery box 2021-11-30 11:34:22 -05:00
Zhengyu Peng 79509ac6d4 Create back.stl 2021-11-26 23:11:36 -05:00
Zhengyu Peng e76cd3c238 add Leg and Hexapod classes 2021-11-26 22:15:07 -05:00
Zhengyu Peng 5e870a1760 Create hexapod.py 2021-11-15 13:28:20 -05:00
rookiepeng 458a13746d tweak stl models 2021-11-04 16:35:18 -04:00
Smallp Tsai 32d53914d9 update video link 2019-06-15 14:14:44 +08:00
Smallp Tsai 4baedab71e update README 2019-06-15 11:16:55 +08:00
Smallp Tsai 0a63e9f9df Merge pull request #5 from khenderick/master
Added fixed joint_cross.stl
2019-06-15 09:48:54 +08:00
Kenneth Henderick 0f4ee99f05 Fixed leg_bottom.stl 2019-05-15 18:58:56 +02:00
Kenneth Henderick ae849589eb Added fixed joint_cross.stl by jmfinn9 2019-05-15 07:29:09 +02:00
Smallp Tsai a5ecfe614b update web url 2019-03-24 18:18:08 +08:00
Smallp Tsai 7ffc0536cb add more google search verification 2019-03-24 00:45:57 +08:00
Smallp Tsai 6fe2baa57a add google search verification 2019-03-24 00:42:58 +08:00
Smallp Tsai 16cfe7aceb update web content (portrait support, metas) 2019-03-23 23:08:39 +08:00
Smallp Tsai 239692a729 update web content 2019-03-23 20:41:35 +08:00
Smallp Tsai d920ea0690 add zhTw readme & update some manual 2019-01-24 20:39:10 +08:00
Smallp Tsai cd33393885 add more docs 2019-01-10 21:48:22 +08:00
Smallp Tsai 37321cc36d update to lock-based joint 2018-12-09 11:31:06 +08:00
Smallp Tsai 052f533912 modify README 2018-10-14 11:31:07 +08:00
Smallp Tsai 52256e07da add docs folder 2018-10-14 11:28:37 +08:00
Smallp Tsai 77d3f76e60 add UI screenshot 2018-10-10 21:52:57 +08:00
Smallp Tsai 87d3ac8c82 add run/climb movement 2018-10-10 21:42:27 +08:00
Smallp Tsai 8a95de44f9 add leg assemble instruction 2018-10-08 23:56:42 +08:00
Smallp Tsai 4d4daa5180 add stl part 2018-10-07 20:26:18 +08:00
Smallp Tsai 3bd0b81836 update README 2018-10-06 22:03:51 +08:00
Smallp Tsai fd6701a0e6 add sch and src 2018-10-06 22:01:37 +08:00
Smallp Tsai a0968f46bc add more BOM images 2018-09-23 15:57:53 +08:00
Smallp Tsai 2fcedb0223 add more parts 2018-09-22 01:10:49 +08:00
Smallp Tsai 84de8fb2a0 add more thumbnail 2018-09-22 00:01:51 +08:00
Smallp Tsai 6370d24f99 add screw part 2018-09-21 23:58:21 +08:00
Smallp Tsai 790c0a2188 mechanism part documentation 2018-09-21 00:20:31 +08:00
Smallp Tsai d6f4f8cb54 Initial commit 2018-09-19 22:33:42 +08:00
27 changed files with 187 additions and 685 deletions
@@ -0,0 +1,37 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build PC Client on Linux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PySide6 psutil pyinstaller
- name: PyInstaller
run: |
cd ./software/pc
pyinstaller hexapod.spec
cp mainwindow.ui ./dist/hexapod/
- name: Archive built module
uses: actions/upload-artifact@v2
if: success()
with:
name: hexapod_linux
path: ./software/pc/dist/hexapod
@@ -0,0 +1,37 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build PC Client on Windows
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PySide6 psutil pyinstaller
- name: PyInstaller
run: |
cd software\pc
pyinstaller hexapod.spec
copy mainwindow.ui .\dist\hexapod\
- name: Archive built module
uses: actions/upload-artifact@v2
if: success()
with:
name: hexapod_windows
path: .\software\pc\dist\hexapod
-2
View File
@@ -25,8 +25,6 @@ The table below shows the difference between this project and the original one.
https://user-images.githubusercontent.com/471808/148647807-02e3e901-6181-4473-8ac4-3b5998fa8d17.mp4 https://user-images.githubusercontent.com/471808/148647807-02e3e901-6181-4473-8ac4-3b5998fa8d17.mp4
https://user-images.githubusercontent.com/471808/158099495-1caeb903-a2e6-4e8d-9f13-54728d7d255a.mp4
## Software ## Software
### Raspberry Pi ### Raspberry Pi
Binary file not shown.
-123
View File
@@ -1,123 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>
-5
View File
@@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" /> <bytecodeTargetLevel target="11" />
</component> </component>
</project> </project>
+1 -1
View File
@@ -7,13 +7,13 @@
<option name="testRunner" value="GRADLE" /> <option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="Embedded JDK" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" /> <option value="$PROJECT_DIR$/app" />
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.6.21" />
</component>
</project>
+1 -4
View File
@@ -29,13 +29,10 @@
</map> </map>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
<option name="id" value="Android" /> <option name="id" value="Android" />
</component> </component>
<component name="SuppressKotlinCodeStyleNotification">
<option name="disableForAll" value="true" />
</component>
</project> </project>
+3 -4
View File
@@ -4,12 +4,12 @@ plugins {
} }
android { android {
compileSdk 32 compileSdk 31
defaultConfig { defaultConfig {
applicationId "com.rookiedev.hexapod" applicationId "com.rookiedev.hexapod"
minSdk 30 minSdk 30
targetSdk 32 targetSdk 31
versionCode 3 versionCode 3
versionName "1.2" versionName "1.2"
@@ -29,14 +29,13 @@ android {
kotlinOptions { kotlinOptions {
jvmTarget = '1.8' jvmTarget = '1.8'
} }
namespace 'com.rookiedev.hexapod'
} }
dependencies { dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0'
implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0' implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.3'
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rookiedev.hexapod">
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
@@ -13,19 +13,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black" android:orientation="vertical"
android:orientation="vertical"> >
<TextView <TextView
android:id="@+id/title_paired_devices" android:id="@+id/title_paired_devices"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/black"
android:padding="24dp" android:padding="24dp"
android:text="Select a Device"
android:textAppearance="?attr/textAppearanceHeadline6" android:textAppearance="?attr/textAppearanceHeadline6"
android:textColor="@color/white" android:text="Select a Device"
android:visibility="visible" /> android:visibility="visible"
/>
<View <View
android:id="@+id/divider" android:id="@+id/divider"
@@ -37,9 +36,8 @@
android:id="@+id/paired_devices" android:id="@+id/paired_devices"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/black" android:stackFromBottom="false"
android:listSelector="@color/grey_800" />
android:stackFromBottom="false" />
<View <View
android:id="@+id/divider1" android:id="@+id/divider1"
@@ -51,13 +49,14 @@
android:id="@+id/cancel_picker" android:id="@+id/cancel_picker"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground" android:padding="24dp"
android:textAppearance="?attr/textAppearanceButton"
android:gravity="center_horizontal"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:gravity="center_horizontal" android:background="?attr/selectableItemBackground"
android:padding="24dp"
android:text="Cancel" android:text="Cancel"
android:textAppearance="?attr/textAppearanceButton" android:visibility="visible"
android:visibility="visible" /> />
</LinearLayout> </LinearLayout>
@@ -18,12 +18,11 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/white"
android:elevation="8dp"
android:forceDarkAllowed="false"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp"> android:paddingEnd="16dp"
android:elevation="8dp">
<ImageView <ImageView
android:id="@+id/hexapod_logo" android:id="@+id/hexapod_logo"
@@ -51,16 +50,12 @@
android:id="@+id/wifi_tab" android:id="@+id/wifi_tab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white"
android:forceDarkAllowed="false"
android:text="WiFi" /> android:text="WiFi" />
<com.google.android.material.tabs.TabItem <com.google.android.material.tabs.TabItem
android:id="@+id/bluetooth_tab" android:id="@+id/bluetooth_tab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white"
android:forceDarkAllowed="false"
android:text="Bluetooth" /> android:text="Bluetooth" />
</com.google.android.material.tabs.TabLayout> </com.google.android.material.tabs.TabLayout>
@@ -83,8 +78,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/grey_500"
android:forceDarkAllowed="false"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
@@ -92,10 +85,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:background="@color/grey_500"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:paddingTop="16dp"
android:visibility="visible" android:visibility="visible"
app:errorEnabled="true" app:errorEnabled="true"
app:layout_constraintBottom_toTopOf="@id/port_input_layout" app:layout_constraintBottom_toTopOf="@id/port_input_layout"
@@ -107,23 +99,20 @@
android:id="@+id/ip_input" android:id="@+id/ip_input"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/grey_500"
android:digits="0123456789." android:digits="0123456789."
android:forceDarkAllowed="false" android:backgroundTint="@color/grey_100"
android:hint="IP" android:hint="IP"
android:inputType="number|numberDecimal" android:inputType="number|numberDecimal"
android:text="192.168.1.127" android:text="192.168.1.127" />
android:textColor="@android:color/primary_text_light" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/port_input_layout" android:id="@+id/port_input_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:background="@color/grey_500"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:layout_marginBottom="4dp"
android:visibility="visible" android:visibility="visible"
app:errorEnabled="true" app:errorEnabled="true"
app:layout_constraintBottom_toTopOf="@id/paired_devices" app:layout_constraintBottom_toTopOf="@id/paired_devices"
@@ -135,12 +124,10 @@
android:id="@+id/port_input" android:id="@+id/port_input"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/grey_500" android:backgroundTint="@color/grey_100"
android:forceDarkAllowed="false"
android:hint="Port" android:hint="Port"
android:inputType="number" android:inputType="number"
android:text="1234" android:text="1234" />
android:textColor="@android:color/primary_text_light" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@@ -4,10 +4,9 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/grey_500"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:forceDarkAllowed="false" android:background="?android:attr/selectableItemBackground"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp"> android:paddingBottom="16dp">
@@ -17,17 +16,17 @@
android:layout_height="64dp" android:layout_height="64dp"
android:padding="16dp" android:padding="16dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView_device_name"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView_device_name"
app:srcCompat="@drawable/ic_baseline_bluetooth_24" /> app:srcCompat="@drawable/ic_baseline_bluetooth_24" />
<TextView <TextView
android:id="@+id/textView_device_name" android:id="@+id/textView_device_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="TextView"
android:textAppearance="?attr/textAppearanceBody1" android:textAppearance="?attr/textAppearanceBody1"
android:text="TextView"
app:layout_constraintBottom_toTopOf="@+id/textView_device_mac" app:layout_constraintBottom_toTopOf="@+id/textView_device_mac"
app:layout_constraintStart_toEndOf="@+id/imageView" app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@@ -37,8 +36,8 @@
android:id="@+id/textView_device_mac" android:id="@+id/textView_device_mac"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="TextView"
android:textAppearance="?attr/textAppearanceCaption" android:textAppearance="?attr/textAppearanceCaption"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView" app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/textView_device_name" /> app:layout_constraintTop_toBottomOf="@+id/textView_device_name" />
+2 -2
View File
@@ -5,8 +5,8 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.2.0' classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
+1 -1
View File
@@ -1,6 +1,6 @@
#Wed Feb 09 11:03:31 EST 2022 #Wed Feb 09 11:03:31 EST 2022
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
+5 -3
View File
@@ -1,8 +1,10 @@
## This file must *NOT* be checked into Version Control Systems, ## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration. # as it contains information specific to your local configuration.
# #
# Location of the SDK. This is only used by Gradle. # Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the # For customization when using a Version Control System, please read the
# header note. # header note.
#Fri Oct 21 23:04:27 CDT 2022 sdk.dir=C\:\\Users\\rooki\\AppData\\Local\\Android\\Sdk
sdk.dir=/home/cole/Android/Sdk
-206
View File
@@ -1,206 +0,0 @@
# SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
#
# MODIFIED to use pololu motor drivers, but compatible with adafruit_servokit driver layout
# by Amelia Deck
# Based on adafruit_motor.py as well
"""
`adafruit_servokit`
====================================================
CircuitPython helper library for the PWM/Servo FeatherWing, Shield and Pi HAT and Bonnet kits.
* Author(s): Kattni Rembor
Implementation Notes
--------------------
**Hardware:**
* `8-Channel PWM or Servo FeatherWing <https://www.adafruit.com/product/2928>`_
* `Adafruit 16-Channel 12-bit PWM/Servo Shield <https://www.adafruit.com/product/1411>`_
* `Adafruit 16-Channel PWM/Servo HAT for Raspberry Pi <https://www.adafruit.com/product/2327>`_
* `Adafruit 16-Channel PWM/Servo Bonnet for Raspberry Pi <https://www.adafruit.com/product/3416>`_
**Software and Dependencies:**
* Adafruit CircuitPython firmware for the supported boards:
https://github.com/adafruit/circuitpython/releases
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
* Adafruit's PCA9685 library: https://github.com/adafruit/Adafruit_CircuitPython_PCA9685
* Adafruit's Motor library: https://github.com/adafruit/Adafruit_CircuitPython_Motor
"""
#import board
#from adafruit_pca9685 import PCA9685
try:
from typing import Optional
import maestro
import time
#from busio import I2C
#from adafruit_motor.servo import Servo, ContinuousServo
except ImportError:
pass
__version__ = "0.0.0+auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ServoKit.git"
pca = None
class ServoKit:
"""Class representing an Adafruit PWM/Servo FeatherWing, Shield or Pi HAT and Bonnet kits.
Automatically uses the I2C bus on a Feather, Metro or Raspberry Pi.
Initialise the PCA9685 chip at ``address``.
The internal reference clock is 25MHz but may vary slightly with environmental conditions and
manufacturing variances. Providing a more precise ``reference_clock_speed`` can improve the
accuracy of the frequency and duty_cycle computations. See the ``calibration.py`` example in
the `PCA9685 GitHub repo <https://github.com/adafruit/Adafruit_CircuitPython_PCA9685>`_ for
how to derive this value by measuring the resulting pulse widths.
:param int channels: The number of servo channels available. Must be 8 or 16. The FeatherWing
has 8 channels. The Shield, HAT, and Bonnet have 16 channels.
:param ~I2C i2c: The I2C bus to use. If not provided, it will use generate the default I2C
bus singleton ``busio.I2C()`` and use that.
:param int address: The I2C address of the PCA9685. Default address is ``0x40``.
:param int reference_clock_speed: The frequency of the internal reference clock in Hertz.
Default reference clock speed is ``25000000``.
:param int frequency: The overall PWM frequency of the PCA9685 in Hertz.
Default frequency is ``50``.
"""
def __init__(
self,
*,
channels: int,
#i2c: Optional[I2C] = None,
address: str = "/dev/ttyACM0",
reference_clock_speed: int = 25000000,
frequency: int = 50 # actually, device ID over serial pololu protocol. using existing var names for full compatibility!
) -> None:
if channels not in [6, 12, 18, 24]:
raise ValueError("servo_channels must be 6, 12, 18, 24!")
self._items = [None] * channels
self._channels = channels
#if i2c is None:
# i2c = board.I2C()
#self._pca = PCA9685(
# i2c, address=address, reference_clock_speed=reference_clock_speed
#)
#self._pca.frequency = frequency
global pca
self._pca = maestro.Controller(ttyStr=address,device=frequency)
pca = self._pca
self._servo = _Servo(self)
@property
def servo(self) -> "_Servo":
""":class:`~adafruit_motor.servo.Servo` controls for standard servos.
This FeatherWing example rotates a servo on channel ``0`` to ``180`` degrees for one second,
and then returns it to ``0`` degrees.
.. code-block:: python
import time
from adafruit_servokit import ServoKit
kit = ServoKit(channels=8)
kit.servo[0].angle = 180
time.sleep(1)
kit.servo[0].angle = 0
"""
return self._servo
class _Servo:
# pylint: disable=protected-access
def __init__(self, kit: ServoKit) -> None:
self.kit = kit
def __getitem__(self, servo_channel: int):
#import adafruit_motor.servo # pylint: disable=import-outside-toplevel
num_channels = self.kit._channels
if servo_channel >= num_channels or servo_channel < 0:
raise ValueError("servo must be 0-{}!".format(num_channels - 1))
servo = pololuservo(servo_channel)
return servo
raise ValueError("Channel {} is already in use.".format(servo_channel))
def __len__(self) -> int:
return len(self.kit._items)
class pololuservo:
def __init__(self, ch, actuation_range: int = 180, min_pulse: int = 1600, max_pulse: int = 9900):
self.ch = ch
self.actuation_range = actuation_range
self._min_duty = min_pulse
self._max_duty = max_pulse
self._duty_range = max_pulse - min_pulse
self.duty_cycle = 0
print("init servo", ch)
pca.setAccel(ch, 15)
pca.setTarget(ch, int((max_pulse-min_pulse)/2 + min_pulse)) # set midpoint
time.sleep(0.1)
pca.setAccel(ch, 0)
@property
def angle(self) -> Optional[float]:
"""The servo angle in degrees. Must be in the range ``0`` to ``actuation_range``.
Is None when servo is disabled."""
if self.fraction is None: # special case for disabled servos
return None
return self.actuation_range * self.fraction
@angle.setter
def angle(self, new_angle: Optional[float]) -> None:
if new_angle is None: # disable the servo by sending 0 signal
self.fraction = None
return
if new_angle < 0 or new_angle > self.actuation_range:
raise ValueError("Angle out of range")
self.fraction = new_angle / self.actuation_range
@property
def fraction(self) -> Optional[float]:
"""Pulse width expressed as fraction between 0.0 (`min_pulse`) and 1.0 (`max_pulse`).
For conventional servos, corresponds to the servo position as a fraction
of the actuation range. Is None when servo is diabled (pulsewidth of 0ms).
"""
if self.duty_cycle == 0: # Special case for disabled servos
return None
return (self.duty_cycle - self._min_duty) / self._duty_range
@fraction.setter
def fraction(self, value: Optional[float]) -> None:
if value is None:
#self._pwm_out.duty_cycle = 0 # disable the motor
return
if not 0.0 <= value <= 1.0:
raise ValueError("Must be 0.0 to 1.0")
#if self.ch > 2 and self.ch < 6:
# valuetmp = 1.0 - value
# self.duty_cycle = self._min_duty + int(valuetmp * self._duty_range)
#else:
self.duty_cycle = self._min_duty + int(value * self._duty_range)
#print(self.ch)
#if self.ch == 0:
#print(value)
pca.setTarget(self.ch,int(self.duty_cycle))
time.sleep(0.002)
#self._pwm_out.duty_cycle = duty_cycle
+15 -22
View File
@@ -49,32 +49,28 @@ class BluetoothServer(Thread):
self.cmd_queue = out_cmd_queue self.cmd_queue = out_cmd_queue
with open('config.json', 'r') as read_file: with open('/home/pi/hexapod/software/raspberry pi/config.json', 'r') as read_file:
self.config = json.load(read_file) self.config = json.load(read_file)
try:
stream = os.popen('hciconfig hci0') stream = os.popen('hciconfig hci0')
output = stream.read() output = stream.read()
device_id = "hci0" device_id = "hci0"
bt_mac = output.split("{}:".format(device_id))[1].split( bt_mac = output.split("{}:".format(device_id))[1].split(
"BD Address: ")[1].split(" ")[0].strip() "BD Address: ")[1].split(" ")[0].strip()
self.mac = bt_mac self.mac = bt_mac
self.port = 10 self.port = 10
self.bt_socket = socket.socket( self.bt_socket = socket.socket(
socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM)
self.signal = self.SIG_NORMAL
except:
pass
self.signal = self.SIG_NORMAL
def run(self): def run(self):
try: try:
self.bt_socket.bind((self.mac, self.port)) self.bt_socket.bind((self.mac, self.port))
self.bt_socket.listen(1) self.bt_socket.listen(1)
print('TCP listening') print('TCP listening')
except: # OSError as err: except OSError as err:
# print('emit tcp server error') # print('emit tcp server error')
# self.status.emit(self.STOP, '') # self.status.emit(self.STOP, '')
pass pass
@@ -108,9 +104,6 @@ class BluetoothServer(Thread):
break break
finally: finally:
try: self.bt_socket.close()
self.bt_socket.close() self.cmd_queue.put('standby:')
self.cmd_queue.put('standby:') print('exit')
print('exit')
except:
pass
+25 -32
View File
@@ -38,39 +38,39 @@
"movementInterval": 5, "movementInterval": 5,
"movementSwitchDuration": 150, "movementSwitchDuration": 150,
"leg0Offset": [ "leg0Offset": [
10, 4.0,
10, 6.0,
30 2
], ],
"leg0Scale": [ "leg0Scale": [
1, 1,
-1, 1,
-1 1
], ],
"leg1Offset": [ "leg1Offset": [
15, -1.0,
-20, 8,
35 -6
], ],
"leg1Scale": [ "leg1Scale": [
1, 1,
-1, 1,
-1 1
], ],
"leg2Offset": [ "leg2Offset": [
-3, 1.0,
10, 12.0,
20 1.0
], ],
"leg2Scale": [ "leg2Scale": [
1, 1,
-1, 1,
-1 1
], ],
"leg3Offset": [ "leg3Offset": [
7, -3,
15, 12.0,
-10 -6.0
], ],
"leg3Scale": [ "leg3Scale": [
1, 1,
@@ -78,9 +78,9 @@
1 1
], ],
"leg4Offset": [ "leg4Offset": [
15, -6,
10, 2,
5 -6.0
], ],
"leg4Scale": [ "leg4Scale": [
1, 1,
@@ -88,20 +88,13 @@
1 1
], ],
"leg5Offset": [ "leg5Offset": [
-7, 0,
10, 4.0,
-30 -10
], ],
"leg5Scale": [ "leg5Scale": [
1, 1,
1, 1,
1 1
], ]
"leg0Laser": 17,
"leg1Laser": 27,
"leg2Laser": 22,
"leg3Laser": 10,
"leg4Laser": 9,
"leg5Laser": 11
} }
+27 -28
View File
@@ -1,4 +1,4 @@
#!/usr/bin/python3 #!python
# #
# 2021 - PRESENT Zhengyu Peng # 2021 - PRESENT Zhengyu Peng
# Website: https://zpeng.me # Website: https://zpeng.me
@@ -28,7 +28,6 @@
# https://circuitpython.readthedocs.io/projects/servokit/en/latest/ # https://circuitpython.readthedocs.io/projects/servokit/en/latest/
from audioop import reverse from audioop import reverse
from adafruit_servokit import ServoKit from adafruit_servokit import ServoKit
import maestro
from leg import Leg from leg import Leg
@@ -93,7 +92,7 @@ class Hexapod(Thread):
self.calibration_mode = False self.calibration_mode = False
with open('config.json', 'r') as read_file: with open('/home/pi/hexapod/software/raspberry pi/config.json', 'r') as read_file:
self.config = json.load(read_file) self.config = json.load(read_file)
# legs' coordinates # legs' coordinates
@@ -116,40 +115,40 @@ class Hexapod(Thread):
self.mount_position[:, 1] = self.mount_y self.mount_position[:, 1] = self.mount_y
# Objects # Objects
self.pca_right = ServoKit(channels=18, address="/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0", frequency=0x0c) self.pca_right = ServoKit(channels=16, address=0x40, frequency=120)
self.pca_left = ServoKit(channels=18, address="/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0", frequency=0x0d) self.pca_left = ServoKit(channels=16, address=0x41, frequency=120)
#self.pca_left = self.pca_right
self.legs = [ self.legs = [
# front right # front right
Leg(0, Leg(0,
[self.pca_left.servo[0], self.pca_left.servo[1], [self.pca_left.servo[15], self.pca_left.servo[14],
self.pca_left.servo[2]], self.pca_left.servo[13]],
correction=self.config.get('leg0Offset', [0, 0, 0]), scale=self.config.get('leg0Scale', [1, 1, 1])), correction=self.config.get('leg0Offset', [0, 0, 0])),
# center right # center right
Leg(1, Leg(1,
[self.pca_left.servo[3], self.pca_left.servo[4], [self.pca_left.servo[8], self.pca_left.servo[4],
self.pca_left.servo[5]], self.pca_left.servo[11]],
correction=self.config.get('leg1Offset', [0, 0, 0]), scale=self.config.get('leg1Scale', [1, 1, 1])), correction=self.config.get('leg1Offset', [0, 0, 0])),
# rear right # rear right
Leg(2, Leg(2,
[self.pca_left.servo[6], self.pca_left.servo[7], [self.pca_left.servo[0], self.pca_left.servo[1],
self.pca_left.servo[8]], self.pca_left.servo[2]],
correction=self.config.get('leg2Offset', [0, 0, 0]), scale=self.config.get('leg2Scale', [1, 1, 1])), correction=self.config.get('leg2Offset', [0, 0, 0])),
# rear left # rear left
Leg(3, Leg(3,
[self.pca_right.servo[6], self.pca_right.servo[7], [self.pca_right.servo[15], self.pca_right.servo[14],
self.pca_right.servo[8]], self.pca_right.servo[13]],
correction=self.config.get('leg3Offset', [0, 0, 0]), scale=self.config.get('leg3Scale', [1, 1, 1])), correction=self.config.get('leg3Offset', [0, 0, 0])),
# center left # center left
Leg(4, Leg(4,
[self.pca_right.servo[3], self.pca_right.servo[4], [self.pca_right.servo[7], self.pca_right.servo[11],
self.pca_right.servo[5]], self.pca_right.servo[6]],
correction=self.config.get('leg4Offset', [0, 0, 0]), scale=self.config.get('leg4Scale', [1, 1, 1])), correction=self.config.get('leg4Offset', [0, 0, 0])),
# front left # front left
Leg(5, Leg(5,
[self.pca_right.servo[0], self.pca_right.servo[1], [self.pca_right.servo[0], self.pca_right.servo[2],
self.pca_right.servo[2]], self.pca_right.servo[5]],
correction=self.config.get('leg5Offset', [0, 0, 0]), scale=self.config.get('leg5Scale', [1, 1, 1]))] correction=self.config.get('leg5Offset', [0, 0, 0]))]
# self.leg_0.reset(True) # self.leg_0.reset(True)
# self.leg_1.reset(True) # self.leg_1.reset(True)
@@ -263,7 +262,7 @@ class Hexapod(Thread):
try: try:
cmd_string = self.cmd_queue.get(block=False) cmd_string = self.cmd_queue.get(block=False)
print('interrupt') print('interrput')
except Empty: except Empty:
# time.sleep(self.interval) # time.sleep(self.interval)
pass pass
@@ -300,6 +299,7 @@ class Hexapod(Thread):
angles[:, 1] = 90-((ar + a1) * 180 / np.pi) angles[:, 1] = 90-((ar + a1) * 180 / np.pi)
angles[:, 2] = (90 - ((a1 + a2) * 180 / np.pi))+90 angles[:, 2] = (90 - ((a1 + a2) * 180 / np.pi))+90
return angles return angles
def cmd_handler(self, cmd_string): def cmd_handler(self, cmd_string):
@@ -350,8 +350,7 @@ class Hexapod(Thread):
def save_config(self): def save_config(self):
try: try:
json.dump(self.config, open( json.dump(self.config, open('/home/pi/hexapod/software/raspberry pi/config.json', 'w+'), indent=4)
'/home/amelia/hexapod/software/raspberry pi/config2.json', 'w+'), indent=4)
except PermissionError as err: except PermissionError as err:
pass pass
@@ -361,7 +360,7 @@ class Hexapod(Thread):
try: try:
cmd_string = self.cmd_queue.get(block=False) cmd_string = self.cmd_queue.get(block=False)
except Empty: except Empty:
#time.sleep(self.interval) # time.sleep(self.interval)
pass pass
else: else:
self.cmd_handler(cmd_string) self.cmd_handler(cmd_string)
+3 -15
View File
@@ -38,7 +38,6 @@ class Leg:
self.junction_servos = junction_servos self.junction_servos = junction_servos
self.correction = correction self.correction = correction
self.constraint = constraint self.constraint = constraint
self.scale = scale
def set_angle(self, junction, angle): def set_angle(self, junction, angle):
set_angle = np.min( set_angle = np.min(
@@ -51,20 +50,9 @@ class Leg:
self.junction_servos[junction].angle = angle self.junction_servos[junction].angle = angle
def move_junctions(self, angles): def move_junctions(self, angles):
if self.scale[0] < 0: self.set_angle(0, angles[0])
self.set_angle(0, self.constraint[0][1] + self.constraint[0][0] - angles[0]) self.set_angle(1, angles[1])
#print(self.scale, self.constraint[0][1] + self.constraint[0][0] - angles[0]) self.set_angle(2, angles[2])
else:
self.set_angle(0, angles[0])
#print(self.scale, angles[0])
if self.scale[1] < 0:
self.set_angle(1, self.constraint[1][1] + self.constraint[1][0] - angles[1])
else:
self.set_angle(1, angles[1])
if self.scale[2] < 0:
self.set_angle(2, self.constraint[2][1] + self.constraint[2][0] - angles[2])
else:
self.set_angle(2, angles[2])
def reset(self, calibrated=False): def reset(self, calibrated=False):
if calibrated: if calibrated:
-169
View File
@@ -1,169 +0,0 @@
import serial
from sys import version_info
PY2 = version_info[0] == 2 #Running Python 2.x?
#
#---------------------------
# Maestro Servo Controller
#---------------------------
#
# Support for the Pololu Maestro line of servo controllers
#
# Steven Jacobs -- Aug 2013
# https://github.com/FRC4564/Maestro/
#
# These functions provide access to many of the Maestro's capabilities using the
# Pololu serial protocol
#
class Controller:
# When connected via USB, the Maestro creates two virtual serial ports
# /dev/ttyACM0 for commands and /dev/ttyACM1 for communications.
# Be sure the Maestro is configured for "USB Dual Port" serial mode.
# "USB Chained Mode" may work as well, but hasn't been tested.
#
# Pololu protocol allows for multiple Maestros to be connected to a single
# serial port. Each connected device is then indexed by number.
# This device number defaults to 0x0C (or 12 in decimal), which this module
# assumes. If two or more controllers are connected to different serial
# ports, or you are using a Windows OS, you can provide the tty port. For
# example, '/dev/ttyACM2' or for Windows, something like 'COM3'.
def __init__(self,ttyStr='/dev/ttyACM0',device=0x0c):
# Open the command port
self.usb = serial.Serial(ttyStr)
# Command lead-in and device number are sent for each Pololu serial command.
self.PololuCmd = chr(0xaa) + chr(device)
# Track target position for each servo. The function isMoving() will
# use the Target vs Current servo position to determine if movement is
# occuring. Upto 24 servos on a Maestro, (0-23). Targets start at 0.
self.Targets = [0] * 24
# Servo minimum and maximum targets can be restricted to protect components.
self.Mins = [0] * 24
self.Maxs = [0] * 24
# Cleanup by closing USB serial port
def close(self):
self.usb.close()
# Send a Pololu command out the serial port
def sendCmd(self, cmd):
cmdStr = self.PololuCmd + cmd
if PY2:
self.usb.write(cmdStr)
else:
self.usb.write(bytes(cmdStr,'latin-1'))
# Set channels min and max value range. Use this as a safety to protect
# from accidentally moving outside known safe parameters. A setting of 0
# allows unrestricted movement.
#
# ***Note that the Maestro itself is configured to limit the range of servo travel
# which has precedence over these values. Use the Maestro Control Center to configure
# ranges that are saved to the controller. Use setRange for software controllable ranges.
def setRange(self, chan, min, max):
self.Mins[chan] = min
self.Maxs[chan] = max
# Return Minimum channel range value
def getMin(self, chan):
return self.Mins[chan]
# Return Maximum channel range value
def getMax(self, chan):
return self.Maxs[chan]
# Set channel to a specified target value. Servo will begin moving based
# on Speed and Acceleration parameters previously set.
# Target values will be constrained within Min and Max range, if set.
# For servos, target represents the pulse width in of quarter-microseconds
# Servo center is at 1500 microseconds, or 6000 quarter-microseconds
# Typcially valid servo range is 3000 to 9000 quarter-microseconds
# If channel is configured for digital output, values < 6000 = Low ouput
def setTarget(self, chan, target):
# if Min is defined and Target is below, force to Min
if self.Mins[chan] > 0 and target < self.Mins[chan]:
target = self.Mins[chan]
# if Max is defined and Target is above, force to Max
if self.Maxs[chan] > 0 and target > self.Maxs[chan]:
target = self.Maxs[chan]
#
lsb = target & 0x7f #7 bits for least significant byte
msb = (target >> 7) & 0x7f #shift 7 and take next 7 bits for msb
cmd = chr(0x04) + chr(chan) + chr(lsb) + chr(msb)
self.sendCmd(cmd)
# Record Target value
self.Targets[chan] = target
# Set speed of channel
# Speed is measured as 0.25microseconds/10milliseconds
# For the standard 1ms pulse width change to move a servo between extremes, a speed
# of 1 will take 1 minute, and a speed of 60 would take 1 second.
# Speed of 0 is unrestricted.
def setSpeed(self, chan, speed):
lsb = speed & 0x7f #7 bits for least significant byte
msb = (speed >> 7) & 0x7f #shift 7 and take next 7 bits for msb
cmd = chr(0x07) + chr(chan) + chr(lsb) + chr(msb)
self.sendCmd(cmd)
# Set acceleration of channel
# This provide soft starts and finishes when servo moves to target position.
# Valid values are from 0 to 255. 0=unrestricted, 1 is slowest start.
# A value of 1 will take the servo about 3s to move between 1ms to 2ms range.
def setAccel(self, chan, accel):
lsb = accel & 0x7f #7 bits for least significant byte
msb = (accel >> 7) & 0x7f #shift 7 and take next 7 bits for msb
cmd = chr(0x09) + chr(chan) + chr(lsb) + chr(msb)
self.sendCmd(cmd)
# Get the current position of the device on the specified channel
# The result is returned in a measure of quarter-microseconds, which mirrors
# the Target parameter of setTarget.
# This is not reading the true servo position, but the last target position sent
# to the servo. If the Speed is set to below the top speed of the servo, then
# the position result will align well with the acutal servo position, assuming
# it is not stalled or slowed.
def getPosition(self, chan):
cmd = chr(0x10) + chr(chan)
self.sendCmd(cmd)
lsb = ord(self.usb.read())
msb = ord(self.usb.read())
return (msb << 8) + lsb
# Test to see if a servo has reached the set target position. This only provides
# useful results if the Speed parameter is set slower than the maximum speed of
# the servo. Servo range must be defined first using setRange. See setRange comment.
#
# ***Note if target position goes outside of Maestro's allowable range for the
# channel, then the target can never be reached, so it will appear to always be
# moving to the target.
def isMoving(self, chan):
if self.Targets[chan] > 0:
if self.getPosition(chan) != self.Targets[chan]:
return True
return False
# Have all servo outputs reached their targets? This is useful only if Speed and/or
# Acceleration have been set on one or more of the channels. Returns True or False.
# Not available with Micro Maestro.
def getMovingState(self):
cmd = chr(0x13)
self.sendCmd(cmd)
if self.usb.read() == chr(0):
return False
else:
return True
# Run a Maestro Script subroutine in the currently active script. Scripts can
# have multiple subroutines, which get numbered sequentially from 0 on up. Code your
# Maestro subroutine to either infinitely loop, or just end (return is not valid).
def runScriptSub(self, subNumber):
cmd = chr(0x27) + chr(subNumber)
# can pass a param with command 0x28
# cmd = chr(0x28) + chr(subNumber) + chr(lsb) + chr(msb)
self.sendCmd(cmd)
# Stop the current Maestro Script
def stopScript(self):
cmd = chr(0x24)
self.sendCmd(cmd)
-2
View File
@@ -1,2 +0,0 @@
pyserial
numpy
+2 -2
View File
@@ -47,10 +47,10 @@ class TCPServer(Thread):
self.cmd_queue = out_cmd_queue self.cmd_queue = out_cmd_queue
with open('config.json', 'r') as read_file: with open('/home/pi/hexapod/software/raspberry pi/config.json', 'r') as read_file:
self.config = json.load(read_file) self.config = json.load(read_file)
self.ip = '0.0.0.0' self.ip = '192.168.1.127'
self.port = 1234 self.port = 1234
self.tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-16
View File
@@ -1,16 +0,0 @@
import maestro
servo = maestro.Controller()
import time
print("1")
for i in range(18):
servo.setAccel(i,10) #set servo 0 acceleration to 4
servo.setSpeed(i,50) #set speed of servo 1
servo.setTarget(i,6000) #set servo to move to center position
time.sleep(1)
#servo.setTarget(0,6000)
#x = servo.getPosition(1) #get the current position of servo 1
print("5")
#servo.close()
print("6")