ros-tutorial-gazebo-simulation
ros-tutorial-gazebo-simulation copied to clipboard
Light sensor plugin is not working
Hello, the light sensor plugin is not working for me. I think I must to call some TopicName's different, but I don't know, which exactly.
<!-- lightSensor-->
<xacro:macro name="light_sensor" params="parent name *origin">
<link name="${name}_link">
<inertial>
<mass value="0.1"/>
<origin xyz="0 0 0"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://robotino_description/meshes/sensors/RobotinoDistance.dae" scale="0.002 0.002 0.002"/>
</geometry>
</visual>
</link>
<gazebo reference="${name}_link">
<material>Gazebo/Yellow</material>
<turnGravityOff>false</turnGravityOff>
<sensor type="camera" name="camera">
<camera name='__default__'>
<horizontal_fov>1.047</horizontal_fov>
<image>
<width>320</width>
<height>240</height>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
</camera>
<plugin name="gazebo_light_sensor_plugin" filename="libgazebo_light_sensor_plugin.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>camera_depth_optical_frame</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>
<robotNamespace>/</robotNamespace>
</plugin>
</sensor>
</gazebo>
<joint name="${name}_joint" type="fixed">
<insert_block name="origin" />
<parent link="${parent}"/>
<child link="${name}_link"/>
</joint>
</xacro:macro>
So the first problem was with the gazebo version and I have solved it. Now I become the info from /image_raw , but /lightSensor topic is empty