yes this is a common problem and one of the time consuming things to sort out. you can create a “servo offset” table with in you code.
are you running code for a lynxmotion kit? most tutorials will show you how to adjust this off set using lynxtern or powerpod.
the offsets are then saved to the SSC. are you using this?
anyway i sometimes create a custom offset table in custom codes.
direct from one of my codes.
; Servo Offsets (manual input!)
;ONLY USE THESE IF NOT USING REGISTERS, otherwise 'comment out.
serout SSC_OUT,SSC_BAUD,"#",dec |
RRHipSwayPin,"po-90 #",dec |
RRHipRotatePin,"po70 #",dec |
RRHipZPin,"po0 #",dec |
RRKneeZPin,"po70 #",dec |
RRTarPin,"po80 #",dec |
LRHipSwayPin,"po50 #",dec |
LRHipRotatePin,"po50 #",dec |
LRHipZPin,"po0 #",dec |
LRKneeZPin,"po0 #",dec |
LFTarPin,"po0 #",dec |
RFHipSwayPin,"po90 #",dec |
RFHipRotatePin,"po99 #",dec |
RFHipZPin,"po-90 #",dec |
RFKneeZPin,"po0 #",dec |
RFTarPin,"po80 #",dec |
LFHipSwayPin,"po60 #",dec |
LFHipRotatePin,"po99 #",dec |
LFHipZPin,"po0 #",dec |
LFKneeZPin,"po0 #",dec |
LFTarPin,"po0",13
]
EG
RRHipSwayPin,“po-90 #”,dec | this will make the servo move more to the left
RRHipRotatePin,“po70 #”,dec | this will make the servo move more to the right
RRHipZPin,“po0 #”,dec | this will keep the servo were it is.
this will need to be placed before the main flow of your code but after you define the servo pins.
the numbers are the amount of offset needed. its a bit of trial and error to get the numbers correct.
the values should range between -99/+99.
try adjusting them by 20 or so at a time.
hope this helps.