We have a krc2 and using it for moving some boxes, I was wondering that how can I program it to detect lighter boxes and put it somewhere else? (using torque)
What weight difference? Light Boxes weigh how much? Heavy boxes weigh how much? What robot type? Please be a lot more specific and read forum read first and honor the suggestions given there.
A 150 kg robot will for example not be able to decide between 20 and 25 kg. Industrial robots are not that sensitive. They do not have torque sensors. So torque is only estimated from current.
Use a scale to determine the weight will probably be better.