Robotics Systems Toolbox - I don't understand this warning message ... what's wrong
7 views (last 30 days)
Show older comments
% 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)
0 Comments
Answers (1)
Karsh Tharyani
on 12 Mar 2024
Edited: Karsh Tharyani
on 12 Mar 2024
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
0 Comments
See Also
Categories
Find more on Manipulator Modeling 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!