When running the Manipulator Simulation in MATLAB visual servo toolbox, the following problems are encountered: error in port widths or dimensions. ‘ Output Port 1’ of ‘sl_ arm_ ibvs/camera’ is a [28×1] matrix.
The problem is caused by the wrong input vector dimension at the red circle dimension in the figure below.
Here the p for the camera pixel coordinate system under the coordinate value, should be 2 * 4 vectors.
Solution: The new version of Machine Vision Toolbox for MATLAB toolbox lacks the module “slcamera.m”, open the camera module in simulate.
Double click the MATLAB FCN module, and you will be prompted that “slcamera” cannot be found. Select new:
Type the following code:
function p = slcamera(cam, u)
%if all(u == 0)
if (u(1:16,:)==0)
% Simulink is probing for the dimensions
np = (length(u)-16)/3;
p = zeros(2, np);
else
p = zeros(2, 4);
P = reshape(u(17:end), 3, []);
Tcam = reshape(u(1:16), 4, 4);
p = cam.plot(P, 'pose', Tcam, 'drawnow');
end
Run simulate again, you can see the error report and disappear, then you should encounter the following error.
Error in ‘sl_arm_ibvs/camera/MATLAB Fcn’. Evaluation of expression resulted in an invalid output.
Only finite double vector or matrix outputs are supported
I am also working on a solution for this error, so please stay tuned.
Read More:
- [Solved] Camera Calibration Error: ErrorMessage: Image size does not match the measurement in camera parameters
- [Solved] throw new Error(“‘output.filename’ is required, either in config file or as –output-filename”);
- [Solved] MindSpore Error: ReduceMean in the Ascend environment does not support inputs of 8 or more dimensions
- Port occupancy error address already in use: bind [Solved]
- Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen is reported when docker port mapping or starting the container
- K8s cluster initialization error: Port 6443 is in use [Solved]
- FTP 500 Illegal PORT command. ftp: bind: Address already in use [How to Solve]
- port trunk allow-pass vlan 10 20 [How to Solve]
- RabbitMQ:address (cannot connect to host/port) [How to Solve]
- Jupyter specifies that the port is open; Importerror: DLL load failed error
- [Solved] MinIO Start Error: “WARNING: Console endpoint is listening on a dynamic port…”
- How to Solve Qualcomm QFIL9008 port brush error
- XAMPP Error: Apache shutdown unexpectedly.This may be due to a blocked port, missing dependencies…
- [Solved] MindSpore infer error when passing in sens values for derivation: For ‘MatMul’, the input dimensions
- [system] [error] Attempted to start Color camera – NOT detected
- [Solved] Error: Another program is already listening on a port that one of our HTTP servers is configured to
- PIKA trouble02 — (error) ERR Syntax error, try CLIENT (LIST [order by [addr|idle]| KILL ip:port)
- Git push Failed to connect to localhost port 1080 [How to Solve]
- [Solved] Win10: Failed to connect to github.com port 443 Timed out
- R language learning problem solving error in output $nodeid: $operator is invalid for atomic vectors