Trailing or leading bogies for locomotives or motor- driven railcars