凉亭“ gpu_ray”选择

发布于 2025-01-21 15:12:11 字数 1519 浏览 0 评论 0原文

我正在尝试使用我的机器人实现NAV2堆栈以进行基本导航,而只是使用提供的XML用于激光雷达,直到我发现将“射线”放置在传感器类型时将“射线”放在某种程度上以某种方式打破了其他一些无关的代码(机器人不是机器人再订阅/cmd_vel主题)。我发现的修复程序是使用“ gpu_ray”作为传感器类型,但是由于我的笔记本电脑没有真正的GPU,因此确实会损害模拟的性能。

所以我的问题是:是否有“ gpu_ray”的替代方法?还是还有其他问题?

这是我乌尔德F(Urdf)的工作XML,与Buggy版本的唯一区别在第2行中,只需交换“ Ray”的类型:

<gazebo reference="lidar_link">
<sensor name="lidar" type="gpu_ray">
  <always_on>true</always_on>
  <visualize>true</visualize>
  <update_rate>30</update_rate>
  <ray>
    <scan>
      <horizontal>
        <samples>360</samples>
        <resolution>1.000000</resolution>
        <min_angle>0.000000</min_angle>
        <max_angle>6.280000</max_angle>
      </horizontal>
    </scan>
    <range>
      <min>0.200000</min>
      <max>3.5</max>
      <resolution>0.015000</resolution>
    </range>
    <noise>
      <type>gaussian</type>
      <mean>0.0</mean>
      <stddev>0.01</stddev>
    </noise>
  </ray>
  <plugin name="scan" filename="libgazebo_ros_ray_sensor.so">
    <ros>
      <namespace>/robot</namespace>
      <argument>~/out:=scan</argument>
    </ros>
    <output_type>sensor_msgs/LaserScan</output_type>
    <frame_name>lidar_link</frame_name>
  </plugin>
</sensor>

I'm trying to implement the Nav2 Stack with my robot for basic navigation and was just using the provided XML for a Lidar, until I discovered that putting "ray" as the sensor type somehow broke some other unrelated code (the robot wasn't subscribing to the /cmd_vel topic anymore). The fix I found was to use "gpu_ray" as the sensor type, but as my Laptop doesn't have a real GPU this really hurts the performance of the simulation.

So my question is: Is there an alternative to the "gpu_ray"? Or is there something else that could be the Problem?

Here's the working XML from my urdf, the only difference to the buggy Version is in line 2, just swap out the type for "ray":

<gazebo reference="lidar_link">
<sensor name="lidar" type="gpu_ray">
  <always_on>true</always_on>
  <visualize>true</visualize>
  <update_rate>30</update_rate>
  <ray>
    <scan>
      <horizontal>
        <samples>360</samples>
        <resolution>1.000000</resolution>
        <min_angle>0.000000</min_angle>
        <max_angle>6.280000</max_angle>
      </horizontal>
    </scan>
    <range>
      <min>0.200000</min>
      <max>3.5</max>
      <resolution>0.015000</resolution>
    </range>
    <noise>
      <type>gaussian</type>
      <mean>0.0</mean>
      <stddev>0.01</stddev>
    </noise>
  </ray>
  <plugin name="scan" filename="libgazebo_ros_ray_sensor.so">
    <ros>
      <namespace>/robot</namespace>
      <argument>~/out:=scan</argument>
    </ros>
    <output_type>sensor_msgs/LaserScan</output_type>
    <frame_name>lidar_link</frame_name>
  </plugin>
</sensor>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文