The invention relates to the field of rolling mechanisms, in particular to a shaft sleeve mechanism capable of being locked at any angle and position in two directions. A rolling mechanism comprises amechanism housing, a shaft, roller pins, unlocking pin discs, elastic piece discs, wedge-shaped groove
large head ends and wedge-shaped grooves; the wedge-shaped grooves are distributed in the innerwall of the mechanism housing, a wedge-shaped groove
large head end is arranged on one side of each wedge-shaped groove, one end of each roller pin is arranged in the corresponding wedge-shaped grooveand disposed in the mechanism housing, the elastic piece discs and the unlocking pin discs are movably connected in two openings of the mechanism housing respectively, and every two roller pins constitute a roller
pin group; elastic pieces are distributed on the elastic piece discs, each elastic piece is arranged between the two corresponding roller pins constituting a roller
pin group, and unlocking pins for penetrating through the portion between every two adjacent roller pin groups are distributed on the unlocking pin discs. The locking torque is large, the size is small, the middle part can also be designed to be hollow, working media such as gas, liquid and
electricity can be passed,
signal cables can be connected, and the rolling mechanism can be conveniently integrated into a wholemachine for use.