Closed yshiyi closed 7 years ago
Is i20_Trajectory
not the one you are editing? if not please remove it?
Several points to consider:
matlab_simulation/7-Control/
folder?robottrak_backup
file, its kind of redundant since we can use git to git it backThis is a neat code to generate various trajectories for robots. This code allows the user to choose the function and its initial values. However, I think it would be better to instead of generally asking for initial conditions, let the user know what are the role of each initial variables in final trajectory. This way user can generate whatever trajectory he needs by entering initial conditions.
Also, when I choose "user defined motion model" as input trajectory, it gives me spiral function. I understood that we should write our desired function in "motion_mode.m". I was wondering if we can also make the user able to write his desired function in command window and get the results (instead of changing the mfile).
In response to allowing user to input desired function in the command window, I personally feel that would just add complexity to the simple example. You're already running matlab, its rather trivial to edit a file in the same directory, not to mention its rather annoying to type and correct mistakes in the command window multiple times.
This code only focused on generating different trajectories. Path planning is not considered. Six different trajectories: spiral, nudges, swerves, corner, lane change, obstacle avoid are generated. In addition, users can define their own trajectory. Users are also allowed to give any initial condition except number 6, obstacle avoidance. Each individual motion has been generated in its own function. Users can select which trajectory to run and give any initial condition as well. 'motion_model.m' is the general motion model for all six pre-defined motions and also can be edited in each individual function. Users are allowed to define and edit their own motion model in 'user_define_motion_model.m'. 'input_check.m' can check whether the input index is valid or not.
A class of input functions which can generate four particular trajectories such as spiral, nudges, swerves and corner has been defined. Four examples have been designed to present the output of these four input functions. User may check a specific example by choosing the accosiated index number at the beginning of the program. User may also give an arbitrary initial condition to the motion model right after choosing the index number. In addition, a new motion model module has been constructed so that users may generate any motions by modifying this module.