Ask Your Question
2

LaserScanner in Gazebo does not publish data while topic is set

asked 2017-10-19 08:35:13 -0600

Westranger gravatar image

updated 2017-10-20 06:16:24 -0600

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>
edit retag flag offensive close merge delete

Comments

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.

l4ncelot gravatar imagel4ncelot ( 2017-10-20 06:00:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-20 06:17:23 -0600

Westranger gravatar image

updated 2017-10-20 06:18:20 -0600

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

<plugin name="laser_back" filename="libgazebo_ros_laser.so">
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-10-19 08:35:13 -0600

Seen: 646 times

Last updated: Oct 20 '17