Planning robust walking motion on uneven terrain via convex optimization