This paper proposes an efficiently robot trajectory programming system that enables operators to program a robot conveniently. Based on VR tracking devices, a pen-shaped teaching tool is designed to track its position and orientation for demonstration, so the system could reach the advantages of low cost and high precision. A valid experiment is set by adapting UR5 system to assess the efficiency of the proposed system, the maximum deviation between real and demonstration trajectory is 1.13 mm. As proved by the experiments, the proposed robot trajectory programming approach is more efficient than UR kinesthetic teaching system.