A system for use in a robotic surgical system (10, 900), the system comprising: a tool driver (100, 310, 400, 510, 710, 810, 912) configured to attach to a surgical tool (120, 350, 530, 620, 850, 916) via a sterile adapter (110, 330, 610, 720, 840, 914), the tool driver (100, 310, 400, 510, 710, 810, 912) comprising at least one sterile adapter sensor (430, 518, 730) configured to generate a first sensor signal corresponding to a first attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912) and the sterile adapter (110, 330, 610, 720, 840, 914), and at least one surgical tool sensor (314, 424, 520, 690) configured to generate a second sensor signal corresponding to a second attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912) and the surgical tool (120, 350, 530, 620, 850, 916), wherein the at least one sterile adapter sensor is operable to generate the first sensor signal in the absence of a complete operative coupling between the tool driver (100, 310, 400, 510, 710, 810, 912) and the sterile adapter (110, 330, 610, 720, 840, 914); and a controller coupled to the tool driver (100, 310, 400, 510, 710, 810, 912), the controller comprising a processor and a memory, and the controller configured to: receive at least one of the first and second sensor signals from at least one of the sensors; generate attachment data using at least one of the first and second sensor signals, the attachment data comprising at least one attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912), the sterile adapter (110, 330, 610, 720, 840, 914), and the surgical tool (120, 350, 530, 620, 850, 916); and control the tool driver (100, 310, 400, 510, 710, 810, 912) using the attachment data. a tool driver (100, 310, 400, 510, 710, 810, 912) configured to attach to a surgical tool (120, 350, 530, 620, 850, 916) via a sterile adapter (110, 330, 610, 720, 840, 914), the tool driver (100, 310, 400, 510, 710, 810, 912) comprising at least one sterile adapter sensor (430, 518, 730) configured to generate a first sensor signal corresponding to a first attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912) and the sterile adapter (110, 330, 610, 720, 840, 914), and at least one surgical tool sensor (314, 424, 520, 690) configured to generate a second sensor signal corresponding to a second attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912) and the surgical tool (120, 350, 530, 620, 850, 916), wherein the at least one sterile adapter sensor is operable to generate the first sensor signal in the absence of a complete operative coupling between the tool driver (100, 310, 400, 510, 710, 810, 912) and the sterile adapter (110, 330, 610, 720, 840, 914); and a controller coupled to the tool driver (100, 310, 400, 510, 710, 810, 912), the controller comprising a processor and a memory, and the controller configured to: receive at least one of the first and second sensor signals from at least one of the sensors; generate attachment data using at least one of the first and second sensor signals, the attachment data comprising at least one attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912), the sterile adapter (110, 330, 610, 720, 840, 914), and the surgical tool (120, 350, 530, 620, 850, 916); and control the tool driver (100, 310, 400, 510, 710, 810, 912) using the attachment data. receive at least one of the first and second sensor signals from at least one of the sensors; generate attachment data using at least one of the first and second sensor signals, the attachment data comprising at least one attachment state between the tool driver (100, 310, 400, 510, 710, 810, 912), the sterile adapter (110, 330, 610, 720, 840, 914), and the surgical tool (120, 350, 530, 620, 850, 916); and control the tool driver (100, 310, 400, 510, 710, 810, 912) using the attachment data.