Пример #1
0
from embedded.helpers import enum
from math import pi

msgs = enum(
  echo=150, 
  say=151,
  user_detected=152,
  user_lost=153,
  user_recognized=154,
  user_pos=155,
  user_ang=156,
  posture_detected=157,
  motor_subscription=158,
  motor_command=159
)

field_table = {
  0: '/left_arm/elbow_pitch/angle',
  1: '/left_arm/shoulder_pitch/angle',
  2: '/left_arm/shoulder_yaw/angle',
  3: '/left_arm/sholder_roll/angle',
  4: '/right_arm/elbow_pitch/angle',
  5: '/right_arm/shoulder_pitch/angle',
  6: '/right_arm/shoulder_yaw/angle',
  7: '/right_arm/sholder_roll/angle',
  8: '/left_leg/knee_pitch/angle',
  9: '/left_leg/hip_pitch/angle',
  10: '/left_leg/hip_yaw/angle',
  11: '/left_leg/hip_roll/angle',
  12: '/right_leg/knee_pitch/angle',
Пример #2
0
from embedded.helpers import enum

msgs = enum(
  echo=0,
)

message_collection = {
  msgs.echo: {
    'name': 'Echo',
    'fields': ('text', ),
    'types': ('%ds',),
    'has_array': True,
  },
}