Using Hokuyo Lidar on model in Gazebo-7 and RViz
Dear all, I am trying to add a Lidar (Hokuyo) on my model using the following configuration:
-- ROS Kinetic
-- Gazebo 7.0
-- Ubuntu 16.04
The code I added at the URDF file is:
<link name="lidar">
<inertial>
<origin xyz="0 0 0.01" rpy="0 0 0" />
<mass value="0.01" />
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>
<visual>
<origin xyz="0 0 0.005" rpy="0 0 0" />
<geometry>
<cylinder radius="0.01" length="0.01"/>
</geometry>
<material name="">
<color rgba="0 0 0 1" />
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder radius="0.01" length="0.01"/>
</geometry>
</collision>
</link>
<joint name="TB_Lidar" type="fixed">
<axis xyz="0.0 0.0 1.0"/>
<parent link="TB"/>
<child link="lidar"/>
<origin xyz="0 0 0" rpy="0.0 0.0 0.0" />
</joint>
<gazebo>
<gazebo reference = "laser_scanner">
<sensor type="ray" name="head_hokuyo_sensor">
<pose> 0 0 0 0 0 0 </pose>
<visualize>true</visualize>
<update_rate>40</update_rate>
<ray>
<scan>
<horizontal>
<samples>720</samples>
<resolution>1</resolution>
<min_angle>-1.578</min_angle>
<max_angle>1.578</max_angle>
</horizontal>
</scan>
<range>
<min>0.1</min>
<max>30</max>
<resolution>0.1</resolution>
</range>
</ray>
<plugin name="gpu_laser" filename="libgazebo_ros_gpu_laser.so">
<topicName>/scan</topicName>
<frameName>laser_scanner</frameName>
</plugin>
</sensor>
</gazebo>
But I cannot see the /scan topic or any publishers at this topic. The Lidar is not working. Any Ideas why?
I have located the libgazebo_ros_laser.so at /opt/ros/kinetic/lib/