robot toolbox rigidBodyTree function
22 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Cam Salzberger
le 2 Juin 2020
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 commentaires
Voir également
Catégories
En savoir plus sur Manipulator Modeling dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!