robot toolbox rigidBodyTree function
13 ビュー (過去 30 日間)
古いコメントを表示
I am trying to get started with the robot toolbox. I am getting this error when using the rigidBodyTree function.
Undefined function or variable 'rigidBodyTree'.
Error in DIYbotcode (line 4)
robot = rigidBodyTree('Dataformat','column','MaxNumbodies',3);
So far I have tried unistalling the robot toolbox add on, turning on and off my computer, and updating Matlab. Here is the code that I am running. I am using This as my template https://www.mathworks.com/help/robotics/ug/2d-inverse-kinematics-example.html.
%DIY robot rigidbody%
%start with blank tree model%
robot = rigidBodyTree('Dataformat','column','MaxNumbodies',3);
%specigy arm lengths%
L1 = 4.75;
L2 = 6.66;
%L3 = 1.5;
%add link1 and joint1%
body = rigidBody('link1');
joint = rigidBodyJoint('joint1','revolute');
setFixedTransformation(joint,trvec2tform([0 0 0]));
joint.JointAxis = [0 0 1];
body.joint = joint
addBody(robot. body, 'base');
%Add 'link2' body with 'joint2' joint%
body = rigidBody('link2');
joint = rigidBodyJoint('joint2','revolute');
setFixedTransform(joint, trvec2tform([L1,0,0]));
joint.JointAxis = [0 0 1];
body.Joint = joint;
addBody(robot, body, 'link1');
0 件のコメント
回答 (1 件)
Cam Salzberger
2020 年 6 月 2 日
Matthew,
Another is to make sure you are installing MathWorks' Robotics System Toolbox, not Peter Corke's Robotics Toolbox. rigidBodyTree is only in the Robotics System Toolbox.
Finally, you can try running these commands to reset the MATLAB Search Path to the default value:
restoredefaultpath
rehash toolboxcache
If that fixes the issue, you can save this for future sessions with:
savepath
-Cam
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Manipulator Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!