The low-level controller ignores attempts to move while moving.
So...how should the CSC handle overlapping moves and offsets (which is something I hope will be rare, other than the main driver for this ticket: properly supporting moves and offsets while a compensation offset is being applied).
Here are the options I've thought of:
1) Wait for the old move to finish, then issue the new one.
2) Stop the old move and start a new one.
3) Reject the new move.
The primary use cases I have thought of are:
A new move or offset comes in while an existing compensation update is occurring.
This is the main driver for this ticket. In my opinion:
1 waiting for the compensation offset to finish is probably the best choice. Compensation offsets will almost always be small and quick.
2 stopping the actuators would be a bit harder on the actuators and often a bit less efficient.
3 rejecting the command is clearly unacceptable.
A new move or offset comes in while an existing move or offset command is occurring.
This should be unusual, and in my opinion does not justify a lot of complex code to deal with, but I'd still like to aim for the best solution.
A subtlety of an offset arriving during another move is that the new offset must be relative to the target position. (Making it relative to the current position means the behavior would be too dependent on the exact time at which the command arrived).
1 waiting works and is easy to understand, but is inefficient if the old and new positions are far apart.
2 stopping and restarting is possibly a bit harder on the actuators, but will sometimes be faster than 1
3 rejecting the command is probably acceptable. It should not be a problem for MTAOS, because that should waits for each move or offset to complete before issuing another.
What to do?
I'm still thinking about the problem and would appreciate feedback on these options.