How I can plot a vehicle's velocity at different points on a map
Ältere Kommentare anzeigen
I am working on driverless car. I have rosbag data. Now I have to plot imu and Gps data on a given map. How can I do that. Such that at every point on map I have knowledge of at what point what was yaw angle, what was velocity, acceleration etc.
Antworten (1)
Mark Sherstan
am 15 Dez. 2018
I would use the mapping toolbox or this function and you can pretty much plot like normal. Everything is just converted into lat and long points. For example your code might look something like this:
% Use map toolbox to plot region of interest and coastlines
figure
worldmap('Canada')
c = load('coast.mat');
plotm(c.lat,c.long,'k')
% Combine lat, long, and magnitude and rearrange by magnitude
latLongMag = [latCoord; longCoord; magValueNum]';
latLongMag = sortrows(latLongMag,3);
% Create a color map for the data points (blue low red high)
colors = jet(length(latLongMag));
% Plot the results
scatterm(latLongMag(:,1),latLongMag(:,2),20,colors)
7 Kommentare
Ichchhit Kumar
am 16 Dez. 2018
Mark Sherstan
am 16 Dez. 2018
The code I supplied plots the magnitude of a variable (e.g - angular velocity) as a function of color in the lat and long coordinate system.
Can you please clarify what you want your x and y (or even z) axis to be? I am confused how you want acclereration to translate to a 2D image? If you can find an example online that would be even better!
Ichchhit Kumar
am 16 Dez. 2018
Ichchhit Kumar
am 16 Dez. 2018
Bearbeitet: Ichchhit Kumar
am 16 Dez. 2018
Ichchhit Kumar
am 17 Dez. 2018
Kategorien
Mehr zu Mapping Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!