Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:45 27 Nov 2024 Privacy Policy
Jump to

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: Germany
Posts: 172
Posted: 06:08pm 07 Nov 2023
Copy link to clipboard 
Print this post

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: Germany
Posts: 172
Posted: 06:19pm 07 Nov 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2129
Posted: 03:10pm 08 Nov 2023
Copy link to clipboard 
Print this post

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: Germany
Posts: 172
Posted: 03:30pm 08 Nov 2023
Copy link to clipboard 
Print this post

  stanleyella said  I had a go at 6 leg robot but I never finished it. https://www.youtube.com/watch?v=YtKqmKKk4gk


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 Kingdom
Posts: 2129
Posted: 04:01pm 08 Nov 2023
Copy link to clipboard 
Print this post

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: Germany
Posts: 172
Posted: 04:47pm 08 Nov 2023
Copy link to clipboard 
Print this post

  stanleyella said  That is serious! There's no 4 leg insects but 6 is common. walker.

It has 6 legs with 3 servos each
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 06:21pm 08 Nov 2023
Copy link to clipboard 
Print this post

  karlelch said  
  stanleyella said  That is serious! There's no 4 leg insects but 6 is common. walker.

It has 6 legs with 3 servos each

True, oops :( .
very impressive video and hardware.
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 200
Posted: 07:50pm 08 Nov 2023
Copy link to clipboard 
Print this post

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: Australia
Posts: 6099
Posted: 08:37pm 08 Nov 2023
Copy link to clipboard 
Print this post

  NPHighview said  
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?
  Quote  MATH M_MULT in1(), in2(),out()

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 Kingdom
Posts: 2129
Posted: 09:20pm 08 Nov 2023
Copy link to clipboard 
Print this post

"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 States
Posts: 3150
Posted: 11:35pm 08 Nov 2023
Copy link to clipboard 
Print this post

  stanleyella said  you keep 3 legs on the ground and move the other 3 legs then repeat for the other side


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 States
Posts: 571
Posted: 12:10am 09 Nov 2023
Copy link to clipboard 
Print this post

@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 Kingdom
Posts: 865
Posted: 07:04am 09 Nov 2023
Copy link to clipboard 
Print this post

  Quazee137 said  
 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 States
Posts: 571
Posted: 11:54am 09 Nov 2023
Copy link to clipboard 
Print this post

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: Germany
Posts: 172
Posted: 01:50pm 09 Nov 2023
Copy link to clipboard 
Print this post

  NPHighview said  Karlelch - Very nice!

Thanks.

  NPHighview said  Are you trying to do Jacobians for coordinate transformation, error correction, and force feedback with the matrix math?

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.

  NPHighview said  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.

Nice!

  NPHighview said  The Pico significantly outclasses the PDP-11 in speed, but the A/D converter is not so wonderful.

I use an external A/D converter via I2C.

Best
Thomas
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 172
Posted: 01:52pm 09 Nov 2023
Copy link to clipboard 
Print this post

  TassyJim said  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.

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 Kingdom
Posts: 2129
Posted: 02:52pm 09 Nov 2023
Copy link to clipboard 
Print this post

  lizby said  
  stanleyella said  you keep 3 legs on the ground and move the other 3 legs then repeat for the other side


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 States
Posts: 339
Posted: 01:48am 11 Nov 2023
Copy link to clipboard 
Print this post

  PhenixRising said  
  Quazee137 said  
 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 States
Posts: 393
Posted: 02:12pm 11 Nov 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 9122
Posted: 01:00pm 12 Nov 2023
Copy link to clipboard 
Print this post

  Quote  What I am missing are functions to add or multiply arrays.


See the latest release V5.07.08RC16
 
     Page 1 of 2    
Print this page
© JAQ Software 2024