I'm not sure what you want, but if I understand what you want to do, you can create a type of gauge device, this pseudo example:
FixtureDef fd1 = new FixtureDef();
PolygonShape pSTest = new PolygonShape();
pSTest.setAsBox(4f / PIXEL_POR_METRO,
1f / PIXEL_POR_METRO,
new Vector2(22f / PIXEL_POR_METRO, -1f / PIXEL_POR_METRO),
0f);
fd1.shape = pSTest;
fd1.isSensor = true;
yourBody.createFixture(fd1).setUserData("yourId");
the ContactListener interface looks like preSolve
Please note that the sensor is not intended for sensors.
Information
setAsBox(float hx, float hy, Vector2 center, float angle)
Parameters:
hx the half-width.
hy the half-height.
center the center of the box in local coordinates.
angle the rotation in radians of the box in local coordinates.