Gazebo建模笔记

1. 在gazebo world中用以下方式加载模型时:
<include>
      <uri>model://one_building</uri>
</include>

要让gazebo能够找到uri中的自建model,需要将

export GAZEBO_MODEL_PATH=~/<path>/my_package_example/models:${GAZEBO_MODEL_PATH}

写入~/.bashrc文件中。参考链接

链接中还提到了要找到gazebo plugin和resource需要需改的gazebo环境变量:

export GAZEBO_PLUGIN_PATH=~/<path>/my_package_example/lib:${GAZEBO_PLUGIN_PATH}

export GAZEBO_MODEL_PATH=~/<path>/my_package_example/models:${GAZEBO_MODEL_PATH}

export GAZEBO_RESOURCE_PATH=~/<path>/my_package_example/models:${GAZEBO_RESOURCE_PATH}
2. gazebo环境中批量放置物品:参考链接

在gazebo world中,我们可以批量放置模型,举例如下:

<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="default">

    <!-- A global light source -->
    <include>
      <uri>model://sun</uri>
    </include>

    <!-- A ground plane -->
    <include>
      <uri>model://ground_plane</uri>
    </include>

    <!-- Testing the automatic population of objects -->
    <population name="can_population1">
      <model name="can1">
        <include>
          <static>true</static>
          <uri>model://coke_can</uri>
        </include>
      </model>
      <pose>0 0 0 0 0 0</pose>
      <box>
        <size>2 2 0.01</size>
      </box>
      <model_count>10</model_count>
      <distribution>
        <type>random</type>
      </distribution>
    </population>

  </world>
</sdf>

使用tag population表示批量放置,而tag distribution控制批量放置模型的排列形式,有随机、成行、成列等方式。具体使用方法可以见参考链接。

3. 可视化编辑gazebo中的建筑环境:参考链接

这是gazebo中广为人知的建筑物建模方法,简单来说,通过gui,我们可以导入一张建筑物平面图,然后再按照平面图建立建筑物模型,支持多楼层建筑物,也可以添加楼梯、门窗等。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

寒墨阁

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值