Robotics Systems Toolbox - I don't understand this warning message ... what's wrong

7 次查看(过去 30 天)
% Denavit-Hartenberg parameters [A alpha d theta]
dhparams = [0 -pi/2 0 0; 10 0 0 0];
% Build robot model
robot = rigidBodyTree;
% First body
body1 = rigidBody('body1');
jnt1 = rigidBodyJoint("jnt1","prismatic");
setFixedTransform(jnt1,dhparams(1,:),"dh"); % Set DH-Params
jnt1.PositionLimits = [5 11];
jnt1.HomePosition = 7; % User-Defined
body1.Joint = jnt1;
addBody(robot,body1,'base');
% Show robot system details
robot.Bodies{1}.Joint.HomePosition = 5;
show(robot);
Command window messae
Warning: Current joint home position is outside the new joint limits, resetting home position to position range center.
> In robotics.manip.internal.warning (line 19)
In rigidBodyJoint/validatePositionLimits (line 416)
In rigidBodyJoint/set.PositionLimits (line 240)
In DH2 (line 14)

回答(1 个)

Karsh Tharyani
Karsh Tharyani 2024-3-12
编辑:Karsh Tharyani 2024-3-12
I have made the relevant team at MathWorks aware about this issue. The warning shouldn't have any functional impact i.e., the home position of the robot will be changed to the assigned value. As a workaround, you can disable this warning by
warning('off','robotics:robotmanip:joint:ResettingHomePosition')
The warning last thrown and its identifier can be obtained using the lastwarn function - Documentation Link: https://www.mathworks.com/help/matlab/ref/lastwarn.html
I hope this helps,
Karsh

类别

Help CenterFile Exchange 中查找有关 Manipulator Modeling 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by