waypointTrajectory orientation is not matching

조회 수: 5 (최근 30일)
Ravindra
Ravindra 2020년 10월 20일
Two trajectories were generated considering the monocular visual-inertial example https://de.mathworks.com/help/fusion/ug/visual-inertial-odometry-using-synthetic-data.html
The first trajectory is same as in example
% track without orientation angles
traj = waypointTrajectory(wayPoints, 'TimeOfArrival', t, ...
'Velocities', velocities, 'SampleRate', sampleRate);
The second trajectory the orientation is added to the same values in example
Ori = [0 0 0;...
0 0 0;...
90 0 0;...
90 0 0;...
0 0 0;...
0 0 0;...
0 0 0;...
90 0 0;...
180 0 0;...
180 0 0;...
180 0 0];
% track with orientation angles
traj_Ori= waypointTrajectory(wayPoints, ...
'TimeOfArrival',t, ...
'Orientation',quaternion(Ori,'eulerd','ZYX','frame'), ...
'Velocities', velocities,'SampleRate',sampleRate);
Later both trajectories were plotted together to check if they have same values. The position is exactly matching but the orientation-axis doesn't.
The Roll, Pitch and Yaw angles are following:
What is the correct way to generate the trajectory with given orientation angels?

채택된 답변

Brian Fanous
Brian Fanous 2020년 10월 21일
Hi Ravindra
In the first example you are not specifying the Orienation so the waypointTrajectory infers that the vehicle is pointed in the direction of travel. In the second example you are explicitly specifying the orientation so the waypointTrajectory uses the Ori array. Try:
help waypointTrajectory/Orientation
Best,
Brian
  댓글 수: 4
Ravindra
Ravindra 2020년 10월 22일
편집: Ravindra 2020년 10월 22일
Thanks that explains the different orientations for both trajectories.
But in case I would like to switch the axis of the vehicle. I mean by default the waypointTrajectory vehicle's x-axis points to front, y-axis to the left and z-axis towards up.
If I would like to calculate a trajectory by switching axis as shown in figure below. How should I proceed?
In this case I guess we should provide all the three angles!
Paulo Ricardo Marques de Araujo
Paulo Ricardo Marques de Araujo 2023년 1월 25일
Having the same challenge because I am working with data coming from NovAtel systems. Any thoughts on how to model the motion direction to follow the y-axis of the car?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Automotive에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by