I tried this a while ago – I wanted a character, sitting on top of a box/in a tree/at the edge of a cliff swinging their legs back and forth. I'd originally driven it with cams which sort of worked but looked very mechanical. Then I saw another version of the same idea (possibly by Saka-san?) and ended up putting it to one side.

But then, pendulum power! So here is a rough, proof of concept, model.  The pendulum hangs centrally in the box and swings from side to side. I've joined the legs to the pendulum via out old friend, the bell crank. (Outlined below)

The resulting movement is smooth and rather satisfying – its all about the movement so I reckon this could be worth developing.