How to create a waypoints trajectory without inertia ?
4 次查看(过去 30 天)
显示 更早的评论
Hello,
When I create a waypoint trajectory of straith line I got inertia so the way is not really staight. When I use the 'Course' options I can have trajkectory which are staritgh line but ther is a bug because the angular veolicty are wrong : Even if the trajectory is straigh line, the angular veolity continue to change during the straight line displacement ! I think it is a bug in the code no ?
Thanks !
0 个评论
回答(1 个)
Riya
2024-1-25
Hello,
Creating a waypoints trajectory without inertia, especially for straight-line movement, typically involves specifying not only the position waypoints but also the desired orientation, velocities, and potentially accelerations at each waypoint to ensure precise control over the movement.
If you are experiencing issues with the trajectory not being straight or the angular velocity not behaving as expected, it could be due to several factors, including how the waypoints are defined, the interpolation method used, and the control algorithm.
Here are some steps you can take to create a straight-line trajectory without inertia effects:
% Define waypoints for a straight line in 2D space
waypoints = [0, 0; 10, 0; 20, 0];
% Set orientations to be the same at each waypoint (assuming 2D)
orientations = [0; 0; 0];
% Set angular velocities to zero
angular_velocities = [0; 0; 0];
% Define the times at which you want to reach each waypoint
times = [0; 5; 10];
% Use the 'trapveltraj' function or similar to generate trajectories
[position, velocity, acceleration] = trapveltraj(waypoints', numel(times), 'EndTime', times);
% Now, you can use the generated position, velocity, and acceleration for your control algorithm
For more information refer following link: https://www.mathworks.com/matlabcentral/answers/620303-waypointtrajectory-orientation-is-not-matching?s_tid=answers_rc1-2_p2_MLT
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!