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.

robot_alignment.py 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (c) 2017 Anki, Inc.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License in the file LICENSE.txt or at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. '''
  15. RobotAlignment related classes, functions, events and values.
  16. '''
  17. # __all__ should order by constants, event classes, other classes, functions.
  18. __all__ = ['RobotAlignmentTypes']
  19. import collections
  20. from ._clad import _clad_to_engine_cozmo, CladEnumWrapper
  21. _RobotAlignmentType = collections.namedtuple('_RobotAlignmentType', ['name', 'id'])
  22. class RobotAlignmentTypes(CladEnumWrapper):
  23. '''Defines all robot alignment types.
  24. '''
  25. _clad_enum = _clad_to_engine_cozmo.AlignmentType
  26. _entry_type = _RobotAlignmentType
  27. #: Align the tips of the lift fingers with the target object
  28. LiftFinger = _entry_type("LiftFinger", _clad_enum.LIFT_FINGER)
  29. #: Align the flat part of the lift with the object
  30. #: (Useful for getting the fingers in the cube's grooves)
  31. LiftPlate = _entry_type("LiftPlate", _clad_enum.LIFT_PLATE)
  32. #: Align the front of cozmo's body
  33. #: (Useful for when the lift is up)
  34. Body = _entry_type("Body", _clad_enum.BODY)
  35. #: For use with distanceFromMarker parameter
  36. Custom = _entry_type("Custom", _clad_enum.CUSTOM)
  37. RobotAlignmentTypes._init_class()