SolidWorks STP模型->URDF->Webots proto模型

这篇具有很好参考价值的文章主要介绍了SolidWorks STP模型->URDF->Webots proto模型。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1. STP 转 URDF

参考:

从solidworks导出URDF模型_sw_urdf镜像下载-CSDN博客

solidworks模型利用sw2urdf生成urdf模型导入CoppeliaSim(v-rep)步骤及相关错误(以及导入到ros的Rviz中用moveit进行路径规划)_逆风的少年的博客-CSDN博客

1> 安装sw_urdf_exporter

①从sw_urdf_exporter - ROS Wiki下载sw2urdfSetup.exe文件,下载后点击安装

stp urdf,windows

 ②SW中:工具>插件>勾选SW2URDF,启用插件

stp urdf,windows

 ③工具>tools/有的版本是File>Export as URDF

stp urdf,windows

 2>配置URDF文件信息

①根据需求配置URDF父子关系、关节及其坐标系

base关节需要配置坐标系;旋转关节需要配置旋转轴和坐标系;直线关节需要配置移动轴。

其余按照UI界面提示配置。

②配置完成后点击Preview and Export……导出

stp urdf,windows

③导出时会根据坐标系、材质等生成相关的坐标系、关节名称、固有属性如质量和RPY等信息

stp urdf,windows

stp urdf,windows已知SW2018存在的问题:

如果使用了相同的零部件,在导出后放到ubuntu工作空间下编译, 执行launch文件夹下的launch文件,即用RVIZ或者gazebo显示零部件时会出现散架的情况。

解决方法:

把每个重复的零部件都稍作修改(不影响外观和使用),另存为新零件,再在设计树上右键替换。最后导出即可。导出的文件夹内容如下。

 stp urdf,windows

另,实测sw2016不存在如上问题。建议安装2016进行如上模型转换的工作。

检查模型是否正确的方法:

将生成的模型整个文件夹放到ubuntu下的工作空间目录/src文件夹中,编译工作空间。

cd到上面截图的launch文件夹下,执行

roslaunch display.launch

  roslaunch gazebo.launch

分别启动rviz和gazebo进行检查。

rviz需要点击add把模型调出来,gazebo直接就会显示。

2. URDF 转 Webots proto

参考:

利用插件将solidworks模型转化为URDF文件,再转化为proto文件并导入Webots_webots导入urdf-CSDN博客

1>安装urdf2webots工具

在终端中执行

pip install urdf2webots==1.0.8

如果不指定版本号,则会安装最新版。对目前的需求来说,用1.0.8版本足矣。 

我用的pip install,其他安装方法可以自行搜索。

 2>文件转换

python -m urdf2webots.importer --input=someRobot.urdf [--output=outputFile] [--normal] [--box-collision] [--tool-slot=linkName] [--help]

示例:python -m urdf2webots.importer --input=D:\\moon_dog_v4\\urdf\\moon_dog_v4.urdf --output=D:\\moon_dog_v4\\urdf  --disable-mesh-optimization

[]是argument,可选参数:

-h, --help: Show the help message and exit.
–input=INPUT: Specifies the URDF file to convert.
–output=OUTPUT: If set, specifies the path and, if ending in “.proto”, name of the resulting PROTO file. The filename minus the .proto extension will be the robot name (for PROTO conversion only).
–robot-name: Specify the name of the robot and generate a Robot node string instead of a PROTO file (has to be unique).
–normal: If set, the normals are exported if present in the URDF definition.
–box-collision: If set, the bounding objects are approximated using boxes.
–tool-slot=LinkName: Specify the link that you want to add a tool slot to (exact link name from URDF, for PROTO conversion only).
–translation=“0 0 0”: Set the translation field of the PROTO file or Webots Robot node string.
–rotation=“0 0 1 0”: Set the rotation field of the PROTO file or Webots Robot node string.
–init-pos=JointPositions: Set the initial positions of your robot joints. Example: --init-pos=“[1.2, 0.5, -1.5]” would set the first 3 joints of your robot to the specified values, and leave the rest with their default value.
–link-to-def: Creates a DEF with the link name for each solid to be able to access it using getFromProtoDef(defName) (for PROTO conversion only).
–joint-to-def: Creates a DEF with the joint name for each joint to be able to access it using getFromProtoDef(defName) (for PROTO conversion only).
–relative-path-prefix: If --input is not set, the relative paths in your URDF file sent through stdin will use this prefix. For example: filename=“head.obj” with --relative-path-prefix=“/home/user/myRobot/” will become filename=“/home/user/myRobot/head.obj”.

需要加上output就会生成proto文件,其他的[]选项里面可以不用
————————————————
版权声明:本文为CSDN博主「逆风的少年」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_45125306/article/details/118641926

 终端画面:

stp urdf,windows

 也有其他转换方法,可以自行搜索。

 3. proto导入webots

把刚才生成的proto文件复制到某一个世界的目录下,如\xx机器人\WebotsWorlds\protos

在webots中的左边一列任意node上右键>新增/add new>proto nodes(current world)就可以看到导入的机器人了。

stp urdf,windows文章来源地址https://www.toymoban.com/news/detail-831464.html

到了这里,关于SolidWorks STP模型->URDF->Webots proto模型的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • SolidWorks导出URDF到rviz、gazebo

    e43# 安装solidworks软件 官网下载插件 下载exe文件,双击安装,安装完成后打开/重启solidworks 在主菜单栏点开设选项(小齿轮)选择插件 确保SW2URDF插件已经勾选 在主菜单栏选择工具,然后选择File,点击Export as URDF 当出现以下界面则sw_urdf_exporter插件安装成功 sw2urdf插件安装提示

    2024年02月10日
    浏览(41)
  • ROS自学笔记二十九:如何从SolidWorks导出URDF文件

    SolidWorks是一款三维计算机辅助设计(CAD)软件,用于创建三维模型。要将SolidWorks模型导出为URDF(Unified Robot Description Format)文件,您可以按照以下步骤进行操作: 1. 安装SolidWorks URDF插件: 首先,您需要安装SolidWorks URDF插件,以便能够导出URDF文件。这个插件通常由SolidWorks社

    2024年02月05日
    浏览(44)
  • 替代CATIA查看stp/step格式模型免费软件推荐

    Stp/step格式文件是被广泛使用的储存三维或二维几何模型,部件或设计参数的文件格式,因为stp/step格式文件不受软件版本的限制,在多种三维软件上都可通用性打开查看,如常见的三维建模软件CATIA,PROE,UG,solidworks, Fusion 360等,均可打开查看,备受欢迎。但是上述几个软件

    2023年04月09日
    浏览(90)
  • xacro机器人模型文件转urdf文件怎么编写launch文件启动gazebo仿真和在rviz2内显示模型

    urdf文件很直白,每个零件的/link  /joint都要编写一遍,每个零件数据都要自己算出来结果,很麻烦,但是用起来很简单。xacro写的模型文件可以把好多常量提前定义出来,不同大小的机器人只要只要改一下常量,机器人模型就可以重新生成,代码可以复用,编写起来简单多了

    2024年02月12日
    浏览(30)
  • 手机查看IGES,STP,STEP格式3D模型免费APP推荐-CAD Assistant

    CAD Assistant官网网址:CAD Assistant - Open Cascade Open Cascade CAD Assistant 是一款功能强大的离线 3D CAD 查看器和转换器,具有简单直观的界面,可免费用于个人和商业用途。目前已被全球成千上万的移动设备和台式机终端用户视为快速便捷的 3D 查看器。CAD Assistant基于开源库(Open CAS

    2024年02月12日
    浏览(147)
  • 统一机器人描述格式——URDF

    URDF(Unified Robot Description Format,统一机器人描述格式)是ROS中一个非常重要的机器人模型描述格式,ROS同时也提供URDF文件的C++解析器,可以解析URDF文件中使用XML格式描述的机器人模型。 在使用URDF文件构建机器人模型之前,有必要先梳理一下URDF文件中常用的XML标签,对URDF有

    2024年02月07日
    浏览(30)
  • URDF - 通用机器人描述格式 - XML 规范

      英文 中文 link 刚体 joint 关节 frame 坐标系 identity element 单位元(加法为 0)     机器人描述文件的根元素必须是 robot ,所有其他元素都必须封装在其中。   name 主文件必须有 name 属性。在包含文件中,name 属性是可选的。如果在附加的包含文件中指定了属性名称,其值必须

    2024年02月03日
    浏览(33)
  • vscode的ros拓展(插件)无法渲染urdf

    之前在vscode中一直用得好好的urdf预览功能,突然在某一天,不行了。 执行 URDF Preview之后,虽然弹出了一个URDF Preview的窗口,但是这个窗口里面啥都没有。没有网格、没有模型。 一开始我也懒得纠结是什么问题,先不使用这个功能。 这几天有空了,到了这个拓展的github网站

    2024年02月13日
    浏览(36)
  • 【ROS】URDF:统一机器人描述格式(XML)

    统一机器人描述格式(URDF)是描述机器人模型的 XML 文件,支持Xacro(XML宏),使用Xacro来引用已经存在的XML块,创建更短且可读的XML文件。 URDF描述文件为XML格式,如下示例,定义机器人的常量。

    2024年02月09日
    浏览(39)
  • Isaac Sim 仿真机器人urdf文件导入

    本教程展示如何在 Omniverse Isaac Sim 中导入 urdf 安装urdf 插件 方法是转到“window”-“Extensions” 搜索框中输入urdf, 并启用 通过转至Isaac Utils - Workflows - URDF Importer菜单来访问 urdf 扩展。 表格中的 1,2,3 对应着上图中的1,2,3 位置说明 导入选项 Merge Fixed Joins-合并固定关节 :合并由固

    2024年04月12日
    浏览(32)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包