- 아두이노를 통해 속도모드로 모터가 작동하다가, 특정조건이 되면 위치모드로 변경을 할 수 있나요? 예를 들어 바퀴가 속도모드로 굴러가다가 그 바퀴에 달린 모터가 위치 모드로 가서 60도 회전한다음에 다시 속도 모드로 갈 수 있나요?
- 확장 위치모드가 정확히 뭔가요? 확장 위치모드를 통해 바퀴를 굴려도 상관이 없나요?
- 1번이 가능한거라면, 만약 위치모드에서 바퀴의 12시 방향에 구멍을 뚫고, 속도모드로 변환하여 구동시키다가 다시 위치모드로 변경하였을때, 처음에 구멍을 뚫었던 부분의 위치를 인식하고 12시 방향으로 다시 옮길 수 있나요? (바퀴의 구멍부분이 처음위치와 같게 만들수 있나요?)
In general, all ROBOTIS actuators can switch mode between Velocity Control and Position Control at any time via Operating Mode (Addr. 11).
However you will need to disable Torque Enable (Addr. 64) FIRST (i.e. set it to ZERO), before you can change Addr. 11, and then re-enable Torque back (i.e. set it to 1) before using the NEW Mode. This TORQUE-OFF requirement has a potential “bad” side effect depending on how you use the actuator:
-
If you use the actuator in such a way that its motor axis is horizontal (i.e. in a tilting mode), then during the time that you disable Torque (Addr. 64), the earth gravity will IMMEDIATELY pull DOWN on whatever mechanical linkage that you may have attached to the actuator’s horn. Meaning that your actuator just moves away from where you wanted it to stop at, previously.
-
If you use the actuator in such a way that its motor axis is vertical (i.e. in a “panning” mode), i.e. the earth gravity does not affect its rotation during the time that you disable the Actuator Torque at Addr. 64, then your Mode switching need may work OK. The only thing that you need to do is to program in a little time delay of a few ms after you change Addr. 11 to a NEW Mode (and then re-enable Torque), before using this NEW Mode, because the mode switching task is not “instantaneous”. Start from 50 ms then go down as needed to optimize your code.
There is another approach that you may want to think about. You can keep the actuator in Velocity Control mode at all times, but you can monitor Present Position (Addr 132) until it reaches a certain “zone”, then set Goal Velocity (Addr. 104) to ZERO to stop the actuator. Of course then the earth gravity will intervene again, depending on the configuration of the motor axis with respect to earth gravity. So this approach works best when the motor axis is vertical: i.e. your actuator is in a “panning” motion. It does not work if the motor axis is horizontal, or in “tilting” mode).
Do you have a picture or a drawing of your physical setup that you can share?
