Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MATH
Page 1 of 2 | |||||
Author | Message | ||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Hi, I work on a program to control a 3-DOF 6 legged robot. This means to make heavy use of the MATH functions. What I am missing are functions to add or multiply arrays. Something like "MATH ADD v2, v1", with v1 and v2 being 1-dimensional arrays and, for instance, v2=v2+v1. Something similar would be useful multiplying the individual elements of two 1-D arrays. Or is there some functionality that I missed? Thanks! |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
P.S.: For illustration, I am using PicoMiteVGA running on matherp's v1.0a board (great!) to graphically debug the robot software |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I had a go at 6 leg robot but I never finished it. https://www.youtube.com/watch?v=YtKqmKKk4gk |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Cool! Mine is also already a long-term project. I had it running but was not happy with it's response time - it was very sluggish. Therefore, I want to make another attempt ... https://www.youtube.com/watch?v=Nta-bDtqCa4 |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
That is serious! There's no 4 leg insects but 6 is common. I started with PCA9385 and 6 leg , 3 servo each leg but psu batteries and I lost interest but would like to finish the walker. It was on 8 bit not mmbasic. |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
It has 6 legs with 3 servos each |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
True, oops :( . very impressive video and hardware. |
||||
NPHighview Senior Member Joined: 02/09/2020 Location: United StatesPosts: 200 |
Karlelch - Very nice! Are you trying to do Jacobians for coordinate transformation, error correction, and force feedback with the matrix math? HP Basic circa 1980 had statements like MAT C = B*A, where all A, B, and C were matrices. Would love to see that in MMBasic. Here's what I was helping with in 1978-9 while in grad school: the Ohio State University hexapod robot. The brains were a Digital Equipment Corporation PDP-11/45, where the A-to-D and D-to-A converters were in Unibus boards that I wire-wrapped by hand. I also wrote FORTRAN libraries for the converters in PDP-11 Assembler. The Pico significantly outclasses the PDP-11 in speed, but the A/D converter is not so wonderful. Edited 2023-11-09 05:53 by NPHighview Live in the Future. It's Just Starting Now! |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6099 |
HP Basic circa 1980 had statements like MAT C = B*A, where all A, B, and C were matrices. Would love to see that in MMBasic. Like this? Multiply the arrays in1() and in2() and put the answer in out()c. All arrays must be 2D but need not be square. If not square then the arrays must be dimensioned in1(m,n) in2(p,m) ,out(p,n) MMBasic has that already but the MATH suite of functions/commands is missing a few more basic functions such as the one mentioned here. They are easy to do in Basic but the extra speed of a built-in function would be very nice. Jim VK7JH MMedit MMBasic Help |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
"MATH ADD v2, v1", with v1 and v2 being 1-dimensional arrays and, for instance, v2=v2+v Can't see it in the manual but rc version maybe.. else do by hand,loop. With a 6 leg walker you keep 3 legs on the ground and move the other 3 legs then repeat for the other side which over simplifies things. robots with wheels are less bother :) |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Doesn't it matter which 3 legs you move at the same time? 3-legged stool kind of thing? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 571 |
@NPHighview I to got to play with the PDP-11/45. Every Xmass break the head of the computer department would give me sole access. Being the only one I could have multiple FORTRAN programs running weather prediction. I got done in the week and a half of break that would have taken most of the semester to do. I miss Collage. Was a very FUN time. Quazee137 Edited 2023-11-09 10:11 by Quazee137 |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 865 |
I miss Collage. Was a very FUN time. Quazee137 LOL...With that typo, it would make a good t-shirt |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 571 |
Was long day and I didn't check my speech to text like I regularly do. I'm surprised that there wasn't more typos. I normally have to correct a few before posting. I just talked and posted. Quazee137 college it got it right this time. LOL |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Thanks. It uses some simplified inverse kinematics. I derived the code from an example implementation. If you mean by force feedback sensing servo load: yes, I implemented that for a subset of the servo channels. But this sensor information is not yet used. Nice! I use an external A/D converter via I2C. Best Thomas |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Yes, a few more basic MATH commands/functions would be great, especially, where for-loops can be avoided. Best Thomas |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Doesn't it matter which 3 legs you move at the same time? 3-legged stool kind of thing? middle leg left and front and rear right legs on ground. lets you move right middle leg and front and rear left leg.. needs least 3 legs to stand on :) There's arduino code but I don't do c++, python for rpi but same. |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 339 |
I miss Collage. Was a very FUN time. Quazee137 LOL...With that typo, it would make a good t-shirt He never said he was an English major! Edited 2023-11-11 11:49 by toml_12953 |
||||
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 393 |
I wrote a matrix inversion program several years ago and posted it here. It works most of the time, but fails for ill-conditioned matrices because it uses Gaussian elimination. -Bill |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9122 |
See the latest release V5.07.08RC16 |
||||
Page 1 of 2 |
Print this page |