英文:
Use joint in both models
问题
我有两个模型,我想要连接两个模型内部的两个链接(如果我将两个模型合并为一个,就只会有一个父连接点)。我应该如何做?
英文:
I have two models, and I want to join the two links inside the two models (if I combine the two models into one, there will be only one parent joint).How should I do it?
答案1
得分: 1
有多种方法可以实现这个目标。sdformat 和 mujoco 的 xml 都允许你包含其他模型文件,并且应该允许你在包含的文件中添加连接。xacro 也可以用来预处理多个 urdf 文件,将它们合并成一个带有跨越不同连接的单一文件。最后,你可以简单地加载这两个模型,然后调用 Drake 中的 AddJoint 方法来添加跨越这两个模型的连接。
我们有一个教程这里,可以引导你编写和可视化这些模型。如果你选择使用 sdformat 方法,那么通过对教程笔记本进行相对小的修改就可以完成。
英文:
There are many ways to accomplish this. sdformat and mujoco's xml both let you include other model files, and should let you add joints between the links in the included files. xacro can also be used to preprocess multiple e.g. urdf files into a single file with joints across the separate links. Finally, you could simply load the two models and then call the AddJoint method in Drake to add the joint across the models.
We have a tutorial here that walks you through writing and visualizing these models. If you choose to use the sdformat approach, then it could be done with a relatively small modification to that tutorial notebook.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论