@lib.api_call
    def compound_move(self, translate_speed, translate_angle, angular_rate):

        # Speeds should add up to max_speed (100)
        # TODO: Should this be fabs(rotate_speed)?
        total_speed = translate_speed + angular_rate
        if total_speed > MecDriver.max_speed:
            self.logger.warn("Total speed of move exceeds max: {}/{}".format(
                total_speed, MecDriver.max_speed))

        self.logger.debug("translate_speed: {}, " +
                          "translate_angle: {}, " +
                          "angular_rate: {}".format(translate_speed,
                                                    translate_angle,
                                                    angular_rate))

        # Calculate overall voltage multiplier
        front_left = translate_speed * \
            sin(translate_angle * pi / 180 + pi / 4) + angular_rate
        front_right = translate_speed * \
            cos(translate_angle * pi / 180 + pi / 4) - angular_rate
        back_left = translate_speed * \
            cos(translate_angle * pi / 180 + pi / 4) + angular_rate
        back_right = translate_speed * \
            sin(translate_angle * pi / 180 + pi / 4) - angular_rate

        # Find largest motor speed,
        # use that to normalize multipliers and maintain maximum efficiency
        max_wheel_speed = max(
            [fabs(front_left), fabs(front_right),
                fabs(back_left), fabs(back_right)]
        )

        total_speed = translate_speed + angular_rate

        front_left = front_left * total_speed / max_wheel_speed
        front_right = front_right * total_speed / max_wheel_speed
        back_left = back_left * total_speed / max_wheel_speed
        back_right = back_right * total_speed / max_wheel_speed

        self.logger.debug(
            ("post-scale: front_left: {:6.2f}, front_right: {:6.2f},"
                " back_left: {:6.2f}, back_right: {:6.2f}").format(
                    front_left, front_right, back_left, back_right))

        # Set motor speeds
        self.set_motor("front_left", front_left)
        self.set_motor("front_right", front_right)
        self.set_motor("back_left", back_left)
        self.set_motor("back_right", back_right)
Fire synchronization based on interval.
dataset/ETHPy150Open IEEERobotics/bot/bot/driver/mec_driver.py/MecDriver.compound_move--crossover with--dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/plugins/ml2/drivers/cisco/apic/apic_sync.py/SynchronizerBase.sync