This is a mini tutorial on how to write a two-voice crab canon. For more voices it gets more complicated, but it can be done.
The canon should be written in invertible counterpoint to the octave, so that the voices can be interchanged. This means that all intervals in strong position must be unisons, octaves, thirds or sixths. Everything else is considered dissonant, including the fifth (because when inverted it becomes a fourth).
Establish the length of the canon, which can be divided into two equal parts (8 bars, 16, etc...).
Establish tonality, etc...
First step: write the first bar, so that the intervals are as mentioned above. It is convenient to start both voices on the tonic, otherwise when inverting, there will be a third or fifth at the end of the bass and it sounds weak.
Second step: write the last bar so that the upper voice moves to the lower voice written backwards and one octave down. The lower voice writes retrograde and one octave up.
Third step: write two more bars in double or invertible counterpoint.
Fourth step: transcribing the new measures to the end of the piece, as before: transposition to the octave and retrogradation.
Fifth step: proceed in the same way until reaching the meeting point of the voices, it is convenient that this moment sounds cadential in the tonic or in the dominant.
This is the result:
crab canon.mp3
Afterwards, you can add ornaments, write dynamics, etc...
There are, of course, many variations, but this is a first step.
Writing a canon of this type in three or four voices, if you want to make it strict, is complicated because all the voices must be invertible.
I managed to write a double crab canon (4 voices). I did it just as an exercise.