Ok, I've solved this issue.
My solution consists of two steps.
FIRST: Create attached bodies with zero center (0,0) and zero rotation.
for (Slot slot : skeleton.getSlots()) {
if (!(slot.getAttachment() instanceof Box2dAttachment)) continue;
Box2dAttachment attachment = (Box2dAttachment)slot.getAttachment();
PolygonShape boxPoly = new PolygonShape();
boxPoly.setAsBox(attachment.getHeight() / 3 * attachment.getScaleX(),
attachment.getWidth() / 3 * attachment.getScaleY()); //NO MORE CENTER AND ROTATION
BodyDef boxBodyDef = new BodyDef();
boxBodyDef.position.x = skeleton.getX() + slot.getBone().getWorldX();
boxBodyDef.position.y = skeleton.getY() + slot.getBone().getWorldY();
boxBodyDef.type = BodyType.KinematicBody;
attachment.body = world.createBody(boxBodyDef);
FixtureDef fd = new FixtureDef();
fd.shape = boxPoly;
fd.isSensor = true;
attachment.body.createFixture(fd);
boxPoly.dispose();
}
SECOND: In animation mode, transform body linked with the center of bone and with bone rotation.
for (Slot slot : skeleton.getSlots()) {
if (!(slot.getAttachment() instanceof Box2dAttachment)) continue;
Box2dAttachment attachment = (Box2dAttachment)slot.getAttachment();
if (attachment.body == null) continue;
float x = skeleton.getX() + slot.getBone().getWorldX();
float y = skeleton.getY() + slot.getBone().getWorldY();
float rotation;
if (inverse) { //invert body rotation when moves left
rotation =180 - slot.getBone().getWorldRotation() ;
} else {
rotation = slot.getBone().getWorldRotation() ;
}
//deltaX and deltaY are the coordinates of the end of the bone
float deltaX = (float)(slot.getBone().getData().getLength() * Math.cos(rotation*MathUtils.degRad));
float deltaY = (float)(slot.getBone().getData().getLength() * Math.sin(rotation*MathUtils.degRad));
//FINALLY TRANSFORM
attachment.body.setTransform(x + deltaX/2, y + deltaY/2, rotation*MathUtils.degRad);
}
Now you have just one problem: all bodies have the attached TextureRedgion size and rotation. So, you may change body sizes of the concrete bodies. This solution used shapes once created. You don't need to reinitialize the shapes or change the body's parameters.
It would be cool if Nate implement this feature in the Spine. Attaching physics bodies in Spine editor, and then simply used them in runtime.