-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
Hi folks,
I dont know if its relevant to ask this here so please close the issue if not.
I wanted to generate motion primitives using the Matlab script genmprim_unicycle.m and i was not able to generate a particular motion that is : backward and turn. I dont know why because i thought its just the opposite of the forward and turn motion, this is my setup :
%0 degreees
basemprimendpts0_c = zeros(numberofprimsperangle, 4); %x,y,theta,costmult
%x aligned with the heading of the robot, angles are positive
%counterclockwise
%0 theta change
basemprimendpts0_c(1,:) = [1 0 0 forwardcostmult];
basemprimendpts0_c(2,:) = [8 0 0 forwardcostmult];
basemprimendpts0_c(3,:) = [-1 0 0 backwardcostmult];
%1/16 theta change
basemprimendpts0_c(4,:) = [8 1 1 forwardandturncostmult];
basemprimendpts0_c(5,:) = [8 -1 -1 forwardandturncostmult];
%backward and turn
basemprimendpts0_c(6,:) = [-8 -1 1 backwardandturncostmult];
basemprimendpts0_c(7,:) = [-8 1 -1 backwardandturncostmult];
And i obtained this for 0 degrees :

As you can see, forward and turn/backward and turn are not generated the same way. Do you have some idea about this ?
Thank you !
Metadata
Metadata
Assignees
Labels
No labels