- Follow the steps mentioned in this documentation to unblock UDP port 11111 in your Windows Firewall. https://www.mathworks.com/help//supportpkg/ryzeio/ug/troubleshoot-video-stream-access.html
- After following the above-mentioned steps ensure that in step 6, where you enter the port number, provide port ‘8890’ instead of ‘11111’.
- Restart the system after making the above-mentioned changes. Switch off and switch on the drone.
Error when using MATLAB toolbox for Ryze Tello Drones: Dot indexing is not supported for variables of this type.
13 views (last 30 days)
Show older comments
I have a Ryze Tello drone, and downloaded the corresponding MATLAB support package to read and plot navigation data. I have tried to run the following code, which is copied from MathWorks website (Read and Plot Navigation Data Using MATLAB Support Package for Ryze Tello Drones - MATLAB & Simulink Example (mathworks.com)).
clear
% Create a ryze object
r = ryze();
% Start the Ryze drone flight from a level surface
takeoff(r);
% This task shows you how to generate an animated plot for the orientation data
% Use MATLAB animatedline function to plot the variation in drone orientation along the X, Y, and Z axes, separately
% Initialize the figure handle and create animated line instances hx, hy, and hz ...
% corresponding to the orientation along the X, Y, and Z axes respectively
f = figure;
hx = animatedline('Color', 'r', 'LineWidth', 2);
hy = animatedline('Color', 'g', 'LineWidth', 2);
hz = animatedline('Color', 'b', 'LineWidth', 2);
title('DroneOrientation v/s Time');
xlabel('Time (in s)');
ylabel('Orientation (in degrees)');
legend('XOrientation', 'YOrientation', 'ZOrientation');
% Keep flying the drone along a square path and plot orientation data during this flight
edgeIndex = 1;
distance = 0.5;
speed = 0.5;
tObj = tic;
while(edgeIndex <= 4)
% Move the drone unblocking the command line
tplot = tic;
moveforward(r, 'Distance', distance, 'Speed', speed, 'WaitUntilDone', false);
% Plot orientation while drone is moving
while(toc(tplot)<distance/speed)
orientation = rad2deg(readOrientation(r));
tStamp = toc(tObj);
addpoints(hx, tStamp, orientation(2));
addpoints(hy, tStamp, orientation(3));
addpoints(hz, tStamp, orientation(1));
drawnow;
end
% Turn the drone after it has traversed one side of the square path
pause(2);
turn(r, deg2rad(90));
edgeIndex = edgeIndex+1;
end
% Plot the final orientation and land the drone
orientation = rad2deg(readOrientation(r));
tStamp = toc(tObj);
addpoints(hx, tStamp, orientation(2));
addpoints(hy, tStamp, orientation(3));
addpoints(hz, tStamp, orientation(1));
drawnow;
land(r);
% When finished, clear the connection to the Ryze drone
clear r;
After running this code with MATLB R2022a, the drone can take off but with no further movement. I still get the following error:
Dot indexing is not supported for variables of this type.
Your suggestion is highly appreciated.
0 Comments
Answers (1)
Shivam Lahoti
on 6 Sep 2024
Hi kiattisak,
I can understand that you are getting the following error:
“Dot indexing is not supported for variables of this type.”
Windows Firewall might be blocking the UDP port 8890 which receives the sensor data from the drones. Due to which, the read functions which reads drone sensor data might be causing the issue. To fix this issue try the following steps:
I hope if the issue was caused by Windows Firewall, these steps help you to resolve them.
Regards,
Shivam Lahoti.
0 Comments
See Also
Categories
Find more on Get Started with Aerospace Blockset in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!