Open renrrr opened 8 months ago
Hello @renrrr. You can comment out fullscreen and gif, as these are custom packages and just for presentation purposes.
For the array issue, there is a bug in the code. The arguments given to mpf_multi_obs are not correct. The function accepts uav pos (x_pos,y_pos), theta angle (angle of rotation of ellipse, equal to the inverse tan of y component of relative velocity and x component of relative velocity between obstacle i and uav), array of obstacle positions (obs), array of obstacle velocities (v_ob), repulsive constant k_rep0, uav speed (V), goal positions (x_goal, y_goal)
Unrecognized function or variable 'fullscreen' Unrecognized function or variable 'gif' Unrecognized function or variable 'polygon_generator'
another question : when i run 'multi_obstacle_sim.m' produce the error :[Index in position 2 exceeds array bounds (must not exceed 1)]
error mpf_multi_obs (第 9 行) v_rel(2) = v_ob(i,2) - v_UAV(2);
error multi_obstacle_sim (第 59 行) v = mpf_multi_obs(x_pos,y_pos,obs,v_rel,a,b,k_rep,x_goal,y_goal,k_att);
@Astik-2002