TWOEARS / blackboard-system

Two!Ears Auditory Model - Blackboard system module
http://docs.twoears.eu/en/latest/blackboard/
GNU General Public License v2.0
3 stars 2 forks source link

Error using randi in RotationKS #4

Closed hagenw closed 8 years ago

hagenw commented 8 years ago

In TWOEARS/examples go to the folder localisation_w_and_wo_head_movements and run the following:

>> localise

------------------------------------------------------------------
Source direction        Model w head rot.       Model wo head rot.
------------------------------------------------------------------
Error using randi
First input must be a positive scalar integer value IMAX, or two integer values [IMIN IMAX] with IMIN less than or equal to IMAX.

Error in RotationKS/execute (line 73)
            headRotateAngle = headRotationAngles(randi(length(headRotationAngles)));

Error in Scheduler/executeFirstExecutableAgendaOrderItem (line 63)
                        nextKsi.ks.execute();

Error in Scheduler/processAgenda (line 29)
                [exctdKsi,cantExctKsis,~] = ...

Error in BlackboardSystem/run (line 217)
                obj.scheduler.processAgenda();

Error in localise (line 29)
    bbs.run();

I tested it under Linux and Matlab 2015a.

ningma97 commented 8 years ago

I've fixed this. The bug is due to RotationKS uses information from robot.AzimuthMin and robot.AzimuthMax to make sure rotation angles are within the allowed range. For some reason they are set properly in the example.