def receive_robot_commands(self, robot_command, component_type='body'):
    "Receive a robot command.\n\n        Args:\n            robot_command: An instance of RobotCommand.\n            component_type: Either 'body' or 'constraint'.\n        "
    if (component_type == 'body'):
        component = self._bodies[robot_command.component]
    elif (component_type == 'constraint'):
        component = self._constraints[robot_command.component]
    else:
        raise ValueError(('Unrecognized component type: %r' % component_type))
    command_method = getattr(component, robot_command.command_type)
    command_method(**robot_command.arguments)
Receive a robot command.

Args:
    robot_command: An instance of RobotCommand.
    component_type: Either 'body' or 'constraint'.
def receive_robot_commands(self, robot_command, component_type='body'):
    "Receive a robot command.\n\n        Args:\n            robot_command: An instance of RobotCommand.\n            component_type: Either 'body' or 'constraint'.\n        "
    if (component_type == 'body'):
        component = self._bodies[robot_command.component]
    elif (component_type == 'constraint'):
        component = self._constraints[robot_command.component]
    else:
        raise ValueError(('Unrecognized component type: %r' % component_type))
    command_method = getattr(component, robot_command.command_type)
    command_method(**robot_command.arguments)