kontrol.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 # joystick input driver for Korg NanoKontrol input device
00004 #
00005 # Author: Austin Hendrix
00006 # Author: Allison Thackston
00007 
00008 import rospy
00009 import sys
00010 from korg_nanokontrol.korg import KorgNanoKontrol
00011 
00012 if __name__ == '__main__':
00013     # start node
00014     rospy.init_node('kontrol')
00015     if len(sys.argv) > 1:
00016         input_dev = int(sys.argv[1])
00017         rospy.set_param("~input_dev", input_dev)
00018     try:
00019         kontrol = KorgNanoKontrol()
00020         rospy.on_shutdown(kontrol.finish)
00021 
00022         while not rospy.is_shutdown():
00023             kontrol.update()
00024             rospy.sleep(0.1)  # 10Hz maximum input
00025 
00026     except rospy.ROSInterruptException:
00027         pass
00028     except:
00029         rospy.logerr(sys.exc_info()[0])


korg_nanokontrol
Author(s): Austin Hendrix, Allison Thackston
autogenerated on Thu Jun 6 2019 20:12:12