ros-simulation / gazebo_ros_pkgs

Wrappers, tools and additional API's for using ROS with Gazebo
http://wiki.ros.org/gazebo_ros_pkgs
742 stars 766 forks source link

gazebo_ros_gpu_laser.cpp does not exsit in ROS2 humble #1508

Open alanxuefei opened 9 months ago

alanxuefei commented 9 months ago

Based on the information from rays-dont-detect-actor, Actors are only visible through the gpu_sensor (gazebo_ros_gpu_laser.cpp). Conversely, they aren't detectable via the non_gpu_sensor (gazebo_ros_laser.cpp).

It's noteworthy that the gazebo_ros_gpu_laser.cpp file is absent in the ROS2 branch, specifically in the release for ROS2 Humble. Please refer to the "Browse Code" link in gazebo_ros_pkgs

There's an issue in ROS2's Gazebo where the non GPU Ray Sensor fails to detect Actor (cylinder) as shown below:

image

The SDF code is as below

    <actor name="animated_cylinder">
      <link name="cylinder_link">
        <visual name="visual">
          <geometry>
            <cylinder>
              <radius>0.5</radius>
              <length>2.0</length>
            </cylinder>
          </geometry>
        </visual>
        <collision name="collision">
          <geometry>
            <cylinder>
              <radius>0.5</radius>
              <length>2.0</length>
            </cylinder>
          </geometry>
        </collision>
      </link>
    </actor>
andrestoga commented 4 months ago

Are you aware that in ROS 2 the ray sensor was refactored?

https://github.com/ros-simulation/gazebo_ros_pkgs/wiki/ROS-2-Migration:-Ray-sensors

Maybe that's why the gazebo_ros_gpu_laser.cpp doesn't exist anymore