# Revision history [back]

### Sensor plugins not publishing

Hi all, I wish to start by saying that I have searched for hours for a solution but nothing seems to fit. I'm having trouble with some (actually every) sensor plugin in gazebo 7, along with ubuntu 16.04 and ROS kinetic. Every example that I'm trying to mimic is of urdf or xacro nature (including the tutorial and the turtlebot_description which i have scoured dozens of times), and its hard to follow when you got 4 files inter-included. I want to get to the bottom of things, trying to build a robot using pure SDF format, but I'll take the question to the simplest form. I took the "stock" kinect model, and added a depth plugin in the following manner:

<?xml version="1.0" ?>
<sdf version="1.5">
<model name="kinect">
<pose>0 0 0.036 0 0 0</pose>
<inertial>
<mass>0.1</mass>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>0.073000 0.276000 0.072000</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<mesh>
<uri>model://kinect/meshes/kinect.dae</uri>
</mesh>
</geometry>
</visual>
<sensor name="camera" type="depth">
<update_rate>20</update_rate>
<camera>
<horizontal_fov>1.047198</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.05</near>
<far>3</far>
</clip>
</camera>
<plugin name="kinect_camera_controller" filename="libgazebo_ros_openni_kinect.so">
<cameraName>camera</cameraName>
<alwaysOn>true</alwaysOn>
<updateRate>10</updateRate>
<imageTopicName>rgb/image_raw</imageTopicName>
<depthImageTopicName>depth/image_raw</depthImageTopicName>
<pointCloudTopicName>depth/points</pointCloudTopicName>
<cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>
<depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
<frameName>base</frameName>
<baseline>0.1</baseline>
<distortion_k1>0.0</distortion_k1>
<distortion_k2>0.0</distortion_k2>
<distortion_k3>0.0</distortion_k3>
<distortion_t1>0.0</distortion_t1>
<distortion_t2>0.0</distortion_t2>
<pointCloudCutoff>0.4</pointCloudCutoff>
</plugin>
</sensor>
</model>
</sdf>


I get no parsing errors while spawning, yet there is no topic being published neither using gz topic -l nor with rostopic list. I know I'm doing something wrong because there is no reference pose for the... lets say "image sensor location". i.e. to have the camera positioned at the kinect's lens rather than on its base. Furthermore, launching the turtlebot_sim does publish the kinect topic, readable in Rviz.

Same issue happens with the hokuyo - If I spawn the stock model I do see the "laser field" from the "libRayPlugin.so", but I get no topic published when adding the "libgazebo_ros_gpu_laser.so" plugin. I do have a "scan" topic, but that seem to originate from the "ray" sensor tag and not the plugins.

Its a bit long but I feel like i got it all wrong. Is there anyone that can save my soul? Many thanks in advance, Steve

### Sensor plugins not publishing

Hi all, I wish to start by saying that I have searched for hours for a solution but nothing seems to fit. I'm having trouble with some (actually every) sensor plugin in gazebo 7, along with ubuntu 16.04 and ROS kinetic. Every example that I'm trying to mimic is of urdf or xacro nature (including the tutorial and the turtlebot_description which i have scoured dozens of times), and its hard to follow when you got 4 files inter-included. I want to get to the bottom of things, trying to build a robot using pure SDF format, but I'll take the question to the simplest form. I took the "stock" kinect model, and added a depth plugin in the following manner:

<?xml version="1.0" ?>
<sdf version="1.5">
<model name="kinect">
<pose>0 0 0.036 0 0 0</pose>
<inertial>
<mass>0.1</mass>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>0.073000 0.276000 0.072000</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<mesh>
<uri>model://kinect/meshes/kinect.dae</uri>
</mesh>
</geometry>
</visual>
<sensor name="camera" type="depth">
<update_rate>20</update_rate>
<camera>
<horizontal_fov>1.047198</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.05</near>
<far>3</far>
</clip>
</camera>
<plugin name="kinect_camera_controller" filename="libgazebo_ros_openni_kinect.so">
<cameraName>camera</cameraName>
<alwaysOn>true</alwaysOn>
<updateRate>10</updateRate>
<imageTopicName>rgb/image_raw</imageTopicName>
<depthImageTopicName>depth/image_raw</depthImageTopicName>
<pointCloudTopicName>depth/points</pointCloudTopicName>
<cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>
<depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
<frameName>base</frameName>
<baseline>0.1</baseline>
<distortion_k1>0.0</distortion_k1>
<distortion_k2>0.0</distortion_k2>
<distortion_k3>0.0</distortion_k3>
<distortion_t1>0.0</distortion_t1>
<distortion_t2>0.0</distortion_t2>
<pointCloudCutoff>0.4</pointCloudCutoff>
</plugin>
</sensor>