stl格式导入matlab,机器人模型导入MATLAB(三):导入MATLAB URDF/stl 格式

一.将URDF模型导入MATLAB

robot = importrobot('xxxxxxx.urdf')

show(robot)

132b146f7e4b8e190a63bdc3b78fc940.png2459c054eb375856a5480d6d5c91d021.png

二.将STL模型导入MATLAB

1.下载 STL File Reader

https://ww2.mathworks.cn/matlabcentral/fileexchange/22409-stl-file-reader

2.准备STL文件

3.导入并显示

fig = figure;

fv = stlread('arm_link1.stl');

patch(fv,'FaceColor', [0.8 0.8 1.0], ...

'EdgeColor', 'none', ...

'FaceLighting', 'gouraud', ...

'AmbientStrength', 0.15);

% Add a camera light, and tone down the specular highlighting

camlight('headlight');

material('dull');

axis([-0.04 0.04 -0.08 0.08 -0.06 0.06]);

view([-135 35]);

title('模型原始零件');

xlabel('X[m]');ylabel('Y[m]');zlabel('Z[m]');

% Fix the axes scaling, and set a nice view angle

axis('image');view([-135 35]);

% hold on;

f2517f52ec2580bcc945ee8dee95e6c1.png

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值