RaspberryPi/Autonomous/SoloRPi3_Method/autonomous.py
def __executePrediction(self, prediction):
        """
        executes motor commands from networkModel prediction
        :param prediction: one-hot encoded array (return value of NetworkModel.predicts)
        """
        if(prediction == Commands.FORWARD.value):
            self._twoMotorDriver.Forward(self._speed)
            print("Forward")
        elif(prediction == Commands.BACK.value):
            self._twoMotorDriver.Reverse(self._speed)
            print("Back")
        elif(prediction == Commands.RIGHT.value):
            # self._twoMotorDriver.TurnRight(self._steerSpeed)
            self._twoMotorDriver.ForwardRight(self._speed, self._steerSpeed)
            print("Forward Right")
        elif (prediction == Commands.LEFT.value):
            # self._twoMotorDriver.TurnLeft(self._steerSpeed)
            self._twoMotorDriver.ForwardLeft(self._speed, self._steerSpeed)
            print("Forward Left")
        else:
            print("ExecutePrediction: Bad Command")

        executes motor commands from networkModel prediction
        :param prediction: one-hot encoded array (return value of NetworkModel.predicts)
        
executes motor commands from networkModel prediction
executes motor commands from networkModel prediction
def __executePrediction(self, prediction):
        if(prediction == Commands.FORWARD.value):
            self._twoMotorDriver.Forward(self._speed)
            print("Forward")
        elif(prediction == Commands.BACK.value):
            self._twoMotorDriver.Reverse(self._speed)
            print("Back")
        elif(prediction == Commands.RIGHT.value):
            self._twoMotorDriver.ForwardRight(self._speed, self._steerSpeed)
            print("Forward Right")
        elif (prediction == Commands.LEFT.value):
            self._twoMotorDriver.ForwardLeft(self._speed, self._steerSpeed)
            print("Forward Left")
        else:
            print("ExecutePrediction: Bad Command")
def __executePrediction ( self , prediction ) : if ( prediction == Commands . FORWARD . value ) : self . _twoMotorDriver . Forward ( self . _speed ) print ( "Forward" ) elif ( prediction == Commands . BACK . value ) : self . _twoMotorDriver . Reverse ( self . _speed ) print ( "Back" ) elif ( prediction == Commands . RIGHT . value ) : self . _twoMotorDriver . ForwardRight ( self . _speed , self . _steerSpeed ) print ( "Forward Right" ) elif ( prediction == Commands . LEFT . value ) : self . _twoMotorDriver . ForwardLeft ( self . _speed , self . _steerSpeed ) print ( "Forward Left" ) else : print ( "ExecutePrediction: Bad Command" )
executes motor commands from networkModel prediction
executes motor commands from networkModel prediction
"""
        executes motor commands from networkModel prediction
        :param prediction: one-hot encoded array (return value of NetworkModel.predicts)
        """ # self._twoMotorDriver.TurnRight(self._steerSpeed) # self._twoMotorDriver.TurnLeft(self._steerSpeed)
self
prediction
one-hot encoded array (return value of NetworkModel.predicts)
one - hot encoded array ( return value of NetworkModel . predicts )