Most of us are familiar with dogs wagging their tails as a friendly gesture. But we do not expect caterpillars to have tails.