Utility to quickly map servos on an adafruit I2C driver board, to proper names. Can produce a yaml output file, useful as input for other robotics applications.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
879 B

  1. from MikesServoMapper import MikesServoMapper
  2. import argparse
  3. def main():
  4. parser = argparse.ArgumentParser(
  5. prog="Mike's Servo Mapper (for adafruit driver board)"
  6. )
  7. parser.add_argument(
  8. "--config", "--config-file",
  9. help="Path to a yaml file describing some configuration stuffs",
  10. required=False,
  11. default=None,
  12. dest="config_file"
  13. )
  14. parser.add_argument(
  15. "--name",
  16. help="Specify a target name (can be used multiple times)",
  17. required=False,
  18. default=[],
  19. action="append",
  20. dest="names"
  21. )
  22. parser.add_argument(
  23. "--output", "--output-path",
  24. help="Override the default mapping output path",
  25. required=False,
  26. default=None,
  27. dest="output_file"
  28. )
  29. args = parser.parse_args()
  30. mapper = MikesServoMapper(
  31. config_file=args.config_file,
  32. names=args.names,
  33. output_file=args.output_file
  34. )
  35. mapper.run()
  36. if __name__ == "__main__":
  37. main()