Viewing and Understanding the Specifications of Pre-defined Robots
2 次查看(过去 30 天)
显示 更早的评论
How do you view what the details of a predefined robot look like?
For eaxample, I saw the following line in an example file: load exampleRobots.mat lbr
However, when I say open exampleRobots.mat, I just see this:
baxter: [1×1 rigidBodyTree]
lbr: [1×1 rigidBodyTree]
puma1: [1×1 rigidBodyTree]
puma2: [1×1 rigidBodyTree]
How do I know what these specifications for the robots look like?
Similarly, I see example code that says to import a robot using a URDF file. However, how can I view a URDF file, and how do I know what the robot looks like?
Thanks!
0 个评论
采纳的回答
Karsh Tharyani
2021-1-25
Each of the variables above are a type of rigidBodyTree object. As a starting step to view what the underlying connectivity looks like (bodies and their joints) you can use the showdetails function. If you want to see what the "rigidBodyTree" looks like, simply call the show function on the "rigidBodyTree" object. For example,
>> showdetails(puma1)
--------------------
Robot: (6 bodies)
Idx Body Name Joint Name Joint Type Parent Name(Idx) Children Name(s)
--- --------- ---------- ---------- ---------------- ----------------
1 L1 jnt1 revolute base(0) L2(2)
2 L2 jnt2 revolute L1(1) L3(3)
3 L3 jnt3 revolute L2(2) L4(4)
4 L4 jnt4 revolute L3(3) L5(5)
5 L5 jnt5 revolute L4(4) L6(6)
6 L6 jnt6 revolute L5(5)
--------------------
>> show(puma1)
This documented example is a good reference for the same. You can also look at Build a robot step by step Topic page if you are getting started with "rigidBodyTree".
A URDF file is an XML file which captures the connectivity of the tree representing a robot. You can read more about it here. You can use your favorite editor to view the file. From MATLAB you can try viewing a sample URDF file called "sawyer.urdf". You can use the "edit" command to open and view any other URDF as well.
>> edit sawyer.urdf
Note: "sawyer.urdf" is located at "toolbox/robotics/robotmanip/exampleRobots/sawyer_description/urdf/sawyer.urdf" where the "toolbox" directory is located under your matlabroot directory.
Hope that answers your question.
0 个评论
更多回答(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!