from uf.ufc import ufc_init from uf.swift import Swift from uf.utils.log import * logger_init(logging.DEBUG) print('setup swift ...') swift_iomap = { 'pos_in': 'swift_pos_in', 'service': 'swift_service', 'gripper': 'swift_gripper' } ufc = ufc_init() swift = Swift(ufc, 'swift', swift_iomap) print('setup test ...') test_ports = { 'swift_pos': { 'dir': 'out', 'type': 'topic' }, 'swift_service': { 'dir': 'out', 'type': 'service' }, 'swift_gripper': { 'dir': 'out', 'type': 'service'
logging.getLogger('uf.swift').setLevel(logging.DEBUG) print('setup swift ...') swift_iomap = { 'pos_in': 'swift_pos_in', 'pos_out': 'swift_pos_out', 'ptc': 'swift_ptc', 'service': 'swift_service' } ufc = ufc_init() #swift = Swift(ufc, 'swift', swift_iomap, dev_port = '/dev/ttyACM0') #swift = Swift(ufc, 'swift', swift_iomap, filters = {'hwid': 'USB VID:PID=2341:0042'}) swift = Swift( ufc, 'swift', swift_iomap) # default by filters: {'hwid': 'USB VID:PID=2341:0042'} print('setup tests ...') def pos_cb(msg): print('pos_cb: ' + msg) test_ports = { 'swift_pos': { 'dir': 'out', 'type': 'topic' }, 'swift_pos_out': {
from uf.ufc import ufc_init from uf.swift import Swift from uf.utils.log import * logger_init(logging.DEBUG) print('setup swift ...') swift_iomap = { 'pos_in': 'swift_pos_in', 'service': 'swift_service', 'gripper': 'swift_gripper' } ufc = ufc_init() swift = Swift(ufc, 'swift', swift_iomap, dev_port='/dev/ttyACM0') print('setup test ...') test_ports = { 'swift_pos': { 'dir': 'out', 'type': 'topic' }, 'swift_service': { 'dir': 'out', 'type': 'service' }, 'swift_gripper': { 'dir': 'out', 'type': 'service'