The disclosed technology relates to a rod bending machine for use with a robotic surgical system in an operating room. The system which is capable to bend rods for surgeries directly in the operating room. The rigidity of the rods is such that the robotic arm alone would have to be huge to provide sufficient forces and torques. This invention introduces bending module integrated into robotic system which allows free bending of rods within limits required for surgeries.