I'm trying to program a simple 2D platformer, and I want the player to go over some platforms. Unfortunately, my player stumbles after some platforms for no reason:

And that's clearly not what I want. The only thing I can imagine is that the boxes aren't the same height for some reason... But how to fix that? Here's some of my code:
createPlatform...
public static Body createPlatform(World world, int x, int y) {
BodyDef bodyDef = new BodyDef();
bodyDef.type = BodyDef.BodyType.StaticBody;
bodyDef.position.set(new Vector2(x, y));
PolygonShape shape = new PolygonShape();
shape.setAsBox(1, 1);
Body body = world.createBody(bodyDef);
body.createFixture(shape, Constants.GROUND_DENSITY);
body.resetMassData();
PlatformUserData userData = new PlatformUserData(1, 1, Constants.GROUND_IMAGE_PATH);
body.setUserData(userData);
shape.dispose();
return body;
}
Runner.java - act()
@Override
public void act(float delta) {
super.act(delta);
body.setLinearVelocity(new Vector2(10f,0));
}