0
$\begingroup$

Rosanswers logo

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>

Originally posted by Westranger on ROS Answers with karma: 165 on 2017-10-19

Post score: 2


Original comments

Comment by l4ncelot on 2017-10-20:
Have you tried to run gazebo with verbose option (e.g. roslaunch gazebo_ros empty_world.launch verbose:=true)? Does it load the libRayPlugin.so plugin? Btw for gazebo related questions use this forum instead.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I foudn the solution, i need to use a differnt plugin file

<plugin name="laser_back" filename="libgazebo_ros_laser.so">

Originally posted by Westranger with karma: 165 on 2017-10-20

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.