how to correct Too many input arguments error in below code

Too many input arguments. Error in 'sm_pick_and_place_robot/Planning and Control/Forward Kinematics' (line 15) [eePos, eeVel, guessValsOut, status] = sm_pick_and_place_robot_fk(actuatorPos, actuatorVel, guessValsIn);
Above lines are occurs errors
this is the code
function [eePos, eeVel, guessValsOut] = FK(actuatorPos, actuatorVel, guessValsIn)
% Wrapper around sm_pick_and_place_fk.m, which creates a persistent
% KinematicsSolver object for the forwards kinematics problem and then
% solves it.
coder.extrinsic('sm_pick_and_place_robot_fk');
persistent init
if isempty(init)
init = true;
eePos = zeros(3,1);
eeVel = zeros(3,1);
guessValsOut = zeros(3,1);
status = 1;
end
[eePos, eeVel, guessValsOut, status] = sm_pick_and_place_robot_fk(actuatorPos, actuatorVel, guessValsIn);
if status ~= 1
error('fk solve failed')
end

댓글 수: 2

please help me guys
sm_pick_and_place_robot_fk is not a function that I can find anywhere. We have no information about how it is defined, but apparently it does not expect three inputs

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

답변 (1개)

chrisw23
chrisw23 2023년 1월 31일

0 개 추천

check this
[eePos, eeVel, guessValsOut, status] ...

댓글 수: 1

still same error occured,now
erros,
Component:Simulink | Category:Block warning
Too many input arguments. Error in 'sm_pick_and_place_robot/Planning and Control/Forward Kinematics' (line 15) [eePos, eeVel, guessValsOut, status] = sm_pick_and_place_robot_fk(actuatorPos, actuatorVel, guessValsIn);
Component:Simulink | Category:Model error
An error occurred while running the simulation and the simulation was terminated
Caused by: Simulation stopped because of a runtime error.

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

카테고리

도움말 센터File Exchange에서 View and Analyze Simulation Results에 대해 자세히 알아보기

제품

릴리스

R2022a

질문:

2023년 1월 26일

댓글:

2023년 2월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by