Elite-Robots / ROS

31 stars 5 forks source link

Turning off the servo #6

Open padhupradheep opened 2 years ago

padhupradheep commented 2 years ago

Hey!

Is there a way to turn off the servo, when we exit the ROS node?

If not, this would be a nice feature to have.

miaokeqin commented 2 years ago

can you try this code: import atexit

def all_done(): print('all_done()')

print('Registering') atexit.register(all_done) print('Registered')

padhupradheep commented 2 years ago

Sure! Curiously, could I just know what does it do exactly?

miaokeqin commented 1 year ago

In SDK ,we use from elite import EC ec = EC(ip="192.168.1.200", auto_connect=True) ec.set_servo_status(0) to turn servo off , you can add this to your code to trun off servo