kontrol.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # joystick input driver for Korg NanoKontrol input device
4 #
5 # Author: Austin Hendrix
6 # Author: Allison Thackston
7 
8 import rospy
9 import sys
10 from korg_nanokontrol.korg import KorgNanoKontrol
11 
12 if __name__ == '__main__':
13  # start node
14  rospy.init_node('kontrol')
15  if len(sys.argv) > 1:
16  input_dev = int(sys.argv[1])
17  rospy.set_param("~input_dev", input_dev)
18  try:
19  kontrol = KorgNanoKontrol()
20  rospy.on_shutdown(kontrol.finish)
21 
22  while not rospy.is_shutdown():
23  kontrol.update()
24  rospy.sleep(0.1) # 10Hz maximum input
25 
26  except rospy.ROSInterruptException:
27  pass
28  except:
29  rospy.logerr(sys.exc_info()[0])


korg_nanokontrol
Author(s): Austin Hendrix, Allison Thackston
autogenerated on Mon Jun 10 2019 13:45:15