Potassium permanganate is mostly used for lightening denim in the textile industry. It is an inorganic chemical compound and an oxidizing agent. PP is sprayed to denim with a spray gun as microparticles. During the spraying process, these microparticles can be inhaled by workers causing lung diseases in the long term. PP spray is one of the most dangerous practices in the textile industry for the health and safety of workers. Robots can carry out PP spray instead of humans to protect workers’ health. Also, robots offer less labor cost, no labor mistake, fast production, and standardization in every product. The use of robots requires the teaching of tasks to robots. For this teaching procedure, it is necessary to record the teaching tool’s movements with high precision and accuracy. In this study, it is aimed at measuring the position and orientation, i.e. the pose, of the teaching tool in six dimensions using an inertial measurement unit (IMU) and six string encoders. In addition to this, the measured pose information is transferred to a robot manipulator for tracking the recorded trajectory. In that way, the operator’s movements can be copied and then used by robots to regenerate the best product while protecting the health of workers. The pose measurement system was designed and experimentally tested. The obtained results show that the system satisfies accuracy and precision expectations for the target application.