Live data from Hacker News

Robotics 501: Mathematics for Robotics

github.com

11–20 of 64 posts

Re: Robotics 501: Mathematics for Robotics

#11
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

Deep understanding of the mathematics behind a given problem space can help you later in the applications. So maybe they'll never have to actually implement Gauss Jordan (and they shouldn't), but the core ideas of normalization and reduction are very important to any sort of numerical methods and come up again and again.

As a somewhat related example, our engineering college required a calculus based probability course that probably 95% of the engineers dreaded. Conditional probability, multivariable PDFs etc. A few years after college, I had the (dis)pleasure of needing to generate random values from an unknown PDF, given only the cumulative distribution. To a statistician, the obvious answer is to use the inverse CDF (a simple interpolated lookup table based on the known CDF) and a uniform random, but an engineer who didn't fully grok the probability basics would probably have just hacked around it, trying different approximations until something stuck.

Neither approach is right or wrong, but sometimes simply understanding the essential material and methods gives you unforeseen insights later on.

Re: Robotics 501: Mathematics for Robotics

#12
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

Well, if I understand your point you are refering to the fact that in many high level programming languages, the language itself is able to dected the most efficient method to do solve some linaer algebra problems, say solving linear systems. However QR factorization (or other factorizations) may be usefull when you have to solve different problems but with the same matrix, so that factorizing once and for all gives you an advantage (for example many undetermined linear problems [1]). In this case knowing something about factorizations, or what to use when, may be helpful

[1] https://en.wikipedia.org/wiki/QR_decomposition#Using_for_sol...

Re: Robotics 501: Mathematics for Robotics

#13
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

The most mathematically-relevant stuff I remember was inverse kinematics and using numerical approximation to really cut down on computation when switching between coordinate spaces. This gets more important as the degrees of freedom increase.

For instance, you'd like to know that when a state-space matrix is not full rank, you lose some control. In practical terms, a robot arm can usually move in any arbitrary Cartesian direction. A fully outstretched robot arm cannot.

For computing inverse kinematics... It's much simpler for a processor to have a slow update cycle that computes how every motor's changes will affect the position of the end effector (robot "tip") and then take a numerical inverse and use that to figure out a time-local, space-local approximation of getting to your eventual goal. It's a helluva lot easier than solving exactly.

I also recall some of the mathematics being relevant to collision detection (both in planning and execution stages), but the details are hazy. Basically, computation is expensive and convex hulls and precomputation can save a lot of cycles until it matters.

Yet other linear algebra lands in the realm of computer vision, optimization, and finite-element analysis.

Re: Robotics 501: Mathematics for Robotics

#14
post #9

Earlier quoted context omitted.

Well, I'm currently in my masters in electrical engineering in Germany and we are taught the same stuff. We even have a mandatory course about basic numerical algorithms. What exactly I can do with that I don't know

Yes, that is exactly my issue. It is unlikely you are going to use the Gauss-Jordan method (if you find a linear problem of huge size, you are just going to plug it into Matlab or whatever) and it does really not give you any information on the problem. On the other hand, eigenvectors (and the principal components theorem) do give you an idea. I reckon (as of now) that Theory is much more important than methods : the…

> if you find a linear problem of huge size, you are just going to plug it into Matlab or whatever

It depends on your viewpoint. Are you going to be the user who calls the MATLAB function, or the engineer who implements a specific iterative method, optimizes it for new hardware, and so on?

I am trying to make the jump into the second category.

Re: Robotics 501: Mathematics for Robotics

#15
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

I think the Gauss-Jordan method has some reason to be taught:

- Most people have probably solved systems of equations by hand in school. G-J basically just systematises this process by abstracting away the unnecessary details and it has a clear sequence of steps (although you can still choose different pivots). I think it would not be satisfying to never see that.

- G-J can be done by hand on simple systems.

- It is a rather simple algorithm, but it still has some edge cases to consider (what if you have a 0 in pivot position?). I've seen a number of people try to implement G-J (we used it as a coding challenge and, yes, this was actually job-related in this case ;)) and fail on particular examples, e.g. stopping iteration too early after skipping a column.

- The algorithm runs in polynomial time (assuming floating point arithmetic; it's unfortunately not polynomial for arbitrary precision integers), so it's efficient. Knowing that a system of linear equations can efficiently be solved is, I think, rather important.

- you can discuss numerical stability in the context of different pivot strategies

- other algorithms use it as a building block or are basically a variation of it (LR factorisation, matrix inversion, simplex algorithm, etc.)

Of course, you could probably just tell people that instead of teaching them the algorithm, but I would think that it sticks better if you've actually seen it and it's not that hard of an algorithm (and I don't think you need to require people to memorise it either).

If you'd ask about teaching Jordan decomposition to engineers I would agree. :)

(But I've also never taught anyone, especially not engineers. So this is just what makes sense to me personally.)

Re: Robotics 501: Mathematics for Robotics

#16

See also the Modern Robotics course videos: https://youtube.com/playlist?list=PLggLP4f-rq02vX0OQQ5vrCxbJ... and free book: http://hades.mech.northwestern.edu/index.php/Modern_Robotics It also has a github repo: https://github.com/NxRLab/ModernRobotics

I did this course through Coursera a while ago and it's really fantastic!

Re: Robotics 501: Mathematics for Robotics

#17
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

One needs to know the math to be able to understand how to transform the physical world to math so as to solve the problems. Math is not a computer module that can be used as a black box except in trivial cases.

One needs to know the math to be able to understand how to transform the physical world to math so as to solve the problems.

Example: Travelling salesman used to repair document gone through the document shredder. There isn't a book you can find this, either you understand the math principles or not. https://news.ycombinator.com/item?id=27713441

Do you need to know the proofs though? Most of the time no, but sometimes you need to know more.

Many proofs for example invert tables and in real code you better avoid it. Buy you need to know the Gauss Jordan to avoid the wtf when you crash into its common numerical instabilities.

Re: Robotics 501: Mathematics for Robotics

#18
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

It sort of depends upon the course. This particular syllabus looks like a really standard linear algebra course (I have no idea what is robotics-specific about it), and so of course Gauss-Jordan would show up there.

More generally, though, I think there are two main reasons to put algorithms like Gauss-Jordan in the engineering curriculum.

1. While it would be nice to treat linear algebra solvers as a perfect black box, in practice this does not work. Engineers have to be aware of numerical stability issues, how to diagnose when this is an issue, and how to reformulate their routines in a way that resolves the problem. And to do this, they need to know the library of techniques.

A reasonable way of teaching this is to teach Gauss-Jordan, then showing how it goes badly awry, and then showing how things like pivoting can fix it.

2. Personally, though, I find the topic of numerical stability to be a little bit depressing, since it focuses on all the ways computers don't work!

To take a more positive view, a huge fraction of the algorithms in an undergraduate CS course -- from finite automata to parsing to relational algebra to graph traversals -- can be understood as basically doing linear algebra using modules over different semirings (rather than just the reals). Eg, for all-pairs shortest paths, the Floyd-Warshall algorithm is doing an LU decomposition, and Kleene's algorithm is doing Gauss-Jordan.

Not every student will enjoy this, but for the ones who are algebraically minded, it's really exciting to be able to offer them a unified perspective. And then you can show them the GraphBLAS library!

Re: Robotics 501: Mathematics for Robotics

#19
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

QR factorization is cool because it is part of QR iteration and you can use it to find all zeros of a polynomial at once.

Re: Robotics 501: Mathematics for Robotics

#20
post #6

Honest question (am a prof. of Maths for engineering at a Spanish Univ. and am wondering about this a lot): What is the point of explaining, say the QR factorization or iterative methods like Gauss-Jordan to engineers ? I think of them as the method of integration of rational functions (the complete method, not the basic cases): totally useless today ... I understand, for example, the Jordan decomposition theorem in…

The answer is simple: this course is taught at a university, so they have to fill the time with _something_. And if that something is a rote method that lends itself well to testing, even better! It matters little if actual engineers in the field use it (I've done robotics for years, and knowing that Gauss-Jordan exists has helped me precisely zero times).
Post reply on HN