# "Ray" Sensor type causing Problems

I am using Gazebo with ROS2 Foxy, and am trying to implement a Lidar into my URDF. My problem is, that for some reason when I choose "ray" as the sensor type, even though I get data that can be displayed in Programmes like RVIZ, everything else breaks.

I do not get any errors in the Console, but for some reason some libraries (slam_toolbox and nav2) behave weirdly and others crash completely. Currently, I solved this by using the gpu_ray sensor type, but as I'm running my simulations on a normal Laptop, the Frequency is really low, so I would rather return to the ray sensor.

Here's the XML I use for the Gazebo sensor (in this case using the gpu_ray, the only thing I do when switching between the two is editing line 2):

<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.300000</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>