-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Index in position 2 exceeds array bounds #3
Comments
Hello, Sadly I currently don't have MATLAB access so helping you on this will be a bit harder, but I'll try my best. As far as I remember, I left the main files ready to be executed without much issues. I was using MATLAB2018a to run these experiments, what's your version? Did you modify anything in dmpc_soft_bound2.m? The example I setup is for two vehicles. You could probably setup a breakpoint in the ReachedGoal function before the line triggering the error and take a look at the variables going into the squeeze function. |
Yeah, I'm using MATLAB2020a, I guess that's probably the reason why, I didn't modify anything inside I've MATLAB2018a installed on a different machine, so I'll try to run it there, I'll let you know if I still have this issue. Thanks! |
Sure, let me know how it goes! Based on the error message the way I would debug this is to put a break point in line 3 of ReachedGoal, and see the dimensions of the "p" 3-D array. The error message is suggesting that Also check out if the dimensions of the "p" array make sense. From memory I would say that the first dimension corresponds to the coordinate x-y-z (so size = 3), the second dimension is time (so size = number of time steps) and the third dimension is the agent's index (so size = # of agents). |
Hi! Running it with MATLAB2018a has solved most of the errors I was getting in Thanks! |
I've done more testing, and the issue also happens when N>=4. After some debugging, it seems that the issue happens when this condition is true. The variables returned here are As I guess the main question is if I'd appreciate any other comments/ideas you may have. Thanks! |
Hey, I just checked and this is at least part of the problem. We're setting up a minimum distance Naturally, the algorithm thinks they collided! Try to put initial positions that are separted by more than |
You can also try running this script instead, those initial positions seem correct Also, here the call should probably be to this function instead. From the top of my head I can't remember what was the difference between the two, but I know from the names that the 2's must be consistent here. |
At some point I need to come back to this and cleanu it up to make it usable, sorry you are encountering all these problems to run it |
Hi,
Thanks a lot for releasing this! I've a quick question: I'm trying to run the file
dmpc_soft_bound2.m
, but I get this error:I've tried to comment the call to ReachedGoal() to see if the error was only in that function, but then a similar error appear in a different line of
dmpc_soft_bound2.m
.Thanks!
The text was updated successfully, but these errors were encountered: