34 import control_toolbox.srv
37 print "Usage: tune_pid.py <service> [<p> <i> <d> <i_clamp>]" 41 if not (len(sys.argv)
in [2, 6]):
44 if len(sys.argv) == 2:
45 print "Not implemented yet" 46 elif len(sys.argv) == 6:
47 service_name = sys.argv[1]
48 if not service_name.endswith(
'/set_gains'):
49 service_name = service_name +
'/set_gains' 50 set_gains = rospy.ServiceProxy(service_name, control_toolbox.srv.SetPidGains)
51 set_gains(*map(float, sys.argv[2:6]))
53 if __name__ ==
'__main__':
main()
def print_usage(exit_code=0)