LaserScanner in Gazebo does not publish data while topic is set
I'm trying to add two laser scanners to my robot model, which work already. So I can see the rays in Gazebo. Like in the hokuyo example I also specified the topic on which the laser should publish its data but when I inspect the available topics the onces I specified are not there/visible. I guess I'm missing somthing like a gazebo-ros-laser connector but I don't get what I'm missing here.
I have the following gazebo tag in urdf/xarco file
<gazebo reference="sick_lrf_back">
<sensor name="laser_back" type="ray">
<pose>0.5 0.0 0.0 0.0 0.0 0.0</pose>
<always_on>1</always_on>
<update_rate>10</update_rate>
<visualize>true</visualize>
<ray>
<scan>
<horizontal>
<samples>761</samples>
<resolution>1</resolution>
<min_angle>-1.6580627</min_angle>
<max_angle>1.6580627</max_angle>
</horizontal>
</scan>
<range>
<min>0.02</min>
<max>49</max>
<resolution>0.03</resolution>
</range>
<noise>
<type>gaussian</type>
<!-- Noise parameters based on published spec for Hokuyo laser
achieving "+-30mm" accuracy at range < 10m. A mean of 0.0m and
stddev of 0.01m will put 99.7% of samples within 0.03m of the true
reading. -->
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="laser_back" filename="libRayPlugin.so">
<!-- Publish within the robot namespace -->
<robotNamespace>my_robot</robotNamespace>
<topicName>laser_back/scan</topicName>
</plugin>
</sensor>
</gazebo>
Have you tried to run gazebo with verbose option (e.g.
roslaunch gazebo_ros empty_world.launch verbose:=true
)? Does it load thelibRayPlugin.so
plugin? Btw for gazebo related questions use this forum instead.