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