Clear Filters
Clear Filters

How to create a waypoints trajectory without inertia ?

4 views (last 30 days)
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 !

Answers (1)

Riya
Riya on 25 Jan 2024
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

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!