mjModel.actuator_trnid is the "transmission id" which is the id of the joint when the actuator acts on a joint. It could also act on a tendon or site, in which case trnid is the tendon or site id. mjModel.actuator_trntype specifies what kind of object the actuator is acting on, but in your case it sounds like you are only working with joint actuators so no need to examine that variable.