I’m currently working on software that will control the motions of a simple, single joint, which should be ready in the next few days.
I’ve thought quite a bit about the issue, and I’m again attacking the problems from first principles, building a new model and theory of observation and control.
And it dawned on me that you want motions to be as simple as possible, so that a human observer can anticipate those motions –
That is, you don’t want a robot to be physically unpredictable.
You can implement this by selecting sequences of motion that have low complexity, and that are, e.g., periodic, symmetric, etc.
That is, if you have a choice among a set of possible gestures that all achieve the same end state, select the gesture with the lowest complexity.
I’ve said exactly this before, in the context of entropy and variance, but it dawned on me that I’ve got algorithms that test for periodicity quite quickly, which should also work for this purpose.
To test for symmetry, set the codes for the motions so that one set of symmetrical gestures (e.g., a left hand) is 1 through N, and the other corresponding set of gestures (e.g., a right hand) is N+1 through 2N. If you have both up and down motions, then use -N through N (left) and -(N+1) through -2N, and N+1 through 2N (right) and take the absolute value of the instructions.
Then take the difference between adjacent entries in the sequence of motions, and the closer you are to N on average, the more symmetrical the motions will be. That is, if the difference between adjacent motions is approximately N, on average, then each motion is followed by its corresponding image under the symmetry in question.
This would, for example, in the case of raising both arms, cause the left and right arms to be alternately raised incrementally, and if the increment in time is small enough, it will appear as if the left and right arm are being raised in tandem. That is, the instruction vector will consist of alternating left right left right codes, each of which is the image of the next under some symmetry.
This could be implemented by taking an instruction vector that achieves the goal state, and then permuting it, selecting the sequence that minimizes complexity. Permutations are vectorized in Matlab / Octave.
Here’s a simple outline of an algorithm that should generate smooth motion from some initial state to a goal state:
- Take the difference between the initial state and goal state, delta_T;
- Take the difference between the initial state and the state achieved by applying one instruction (on average), delta_mu;
- Set the length of the instruction vector proportional to l = delta_T/delta_mu;
- Use a Monte Carlo simulation to generate a matrix of instruction vectors of length l;
- Select the least error vector (compared to the goal state);
- Remove any pairs of redundant instructions (e.g., +N followed by -N, anywhere in the vector).
- Set l to the new resultant length;
- Run the Monte Carlo simulator again, using the new length;
- Select the least error vector;
- Permute the least error vector, generating a matrix of instruction vectors;
- Select the lowest complexity vector.
Discover more from Information Overload
Subscribe to get the latest posts sent to your email.