The invention relates to positive-displacement free-piston heat machines with variable working chambers, which could be applied as an internal or external combustion engine, compressor, pump. The machine comprises two analogous assemblies of pistons, each consisting of two or more vanes having form of symmetrical star and attached to the hub. The assemblies of pistons are placed in the cylindrical cavity that is limited by two concentric cylindrical surfaces and two planes at the ends. The vanes the different assemblies are alternately displaced in the cavity. When the assemblies of pistons swing in opposite directions, variable working chambers are got between the adjacent vanes. The external loading or driving devices are connected directly to the assemblies of pistons either by coaxial shafts, radial junctions, planar or cylindrical rings. The machine with two bodies swinging in opposite direction presents well-balanced mechanical system, and vibration of the frame is avoided.