第一范文网 - 专业文章范例文档资料分享平台

Gazebo机器人仿真学习探索笔记(四)模型编辑

来源:用户分享 时间:2025/5/26 4:20:31 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

Gazebo only imports paths, but it's easy with Inkscape to transform any shapeto a path. Select Select All from the Edit menu. Then select thePath -> Object to Path menu item. This will transform every object intoseparate paths and sub paths. This transformation is irreversible, so if youtransform text into paths, you will not be able to alter the text.

Gazebo does not support grouping. Use the Ungroup from the Object menu toseparate groups of paths.

Save your drawing

Save your drawing to an SVG file you can use later in Gazebo. Use the Saveoption from the File menu.

Create a Gazebo Model

SDFormat does not support SVG directly; it supports 2Dpoly lines. The Gazebo Model Editor has an import mechanism that extracts thepoly lines from SVG files, and saves them as an SDF model file.

Launch Gazebo and Select Model Editor from the Edit menu to enter theGazebo Model Editor mode (as opposed to the simulation mode).

Then press the Add button in the Custom Shapes section of the Insert tab.

Thickness: How thick the link will be. This corresponds to the extrusionheight in the z axis. For the SVG path shown on the right, the axis ofextrusion is outwards from the screen.

Resolution: How many pixels in your SVG correspond to a meter. Thedefault value (3543.3 px/m) corresponds to 90 dpi (dots per inch), which isthe default resolution for several editors, including Inkscape. If your modelshows up the size you'd like in Inkscape when you display the units as meters,you shouldn't change the resolution value.

Samples per segment: This indicates into how many segments to divide each ofthe curved paths in the SVG. The more segments, the more complex your linkwill be. It doesn't change anything for straight paths.

On the right, you can see the path extracted from your SVG. The red points arethe summit of the triangulation of the extruded 3D model.

Set the thickness of the wheel to 0.025 m, and press OK. Your new link shouldappear in the 3D view.

A new link is created, and it comes with a default collision shape that isa copy of the generated 3D mesh.

Next, select Exit Model Editor from the File menu. Gazebo will prompt youto save the new model to disk. Press the Save and Exit button on the Exitdialog, and the Save Model dialog will appear.

Set the name of the new model to \Options section. Press the Save button.

Your new Gazebo model is now ready to roll ;-)

Gazebo机器人仿真学习探索笔记(四)模型编辑.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c8wrvr9uw1v0h1lk029tn_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top