Error :XML Element[sensor], child of element[model] not defined in SDF. Ignoring.[model] child while adding sonar sensor plugin
Trying to add sonar sensor to my bot and using pal-robotic/reems_plugin . Till now, able to compile the code with few warnings.
Made following changes in order to use this plugin
<sensor name ="sonar" type="ray">
<rayCount>5</rayCount>
<rangeCount>5</rangeCount>
<verticalRayCount>1</verticalRayCount>
<verticalRangeCount>1</verticalRangeCount>
<minAngle>-16</minAngle>
<verticalMinAngle>-16</verticalMinAngle>
<maxAngle>16</maxAngle>
<verticalMaxAngle>16</verticalMaxAngle>
<minRange>0</minRange>
<maxRange>7</maxRange>
<resRange>0.01</resRange>
<plugin name="gazebo_ros_sonar_controller" filename ="libgazebo_ros_sonar.so">
<alwaysOn>true<alwaysOn>
<updateRate>10</updateRate>
<topicName>sonar</topicName>
<frameId>base</frameId>
<radiation>infrared</radiation>
<fov>32</fov>
</plugin>
</sensor>
where my already existing sdf file is :
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="create">
<link name="base">
<inertial>
<pose>0.001453 -0.000453 0.029787 0 0 0</pose>
<inertia>
<ixx>0.058640</ixx>
<ixy>0.000124</ixy>
<ixz>0.000615</ixz>
<iyy>0.058786</iyy>
<iyz>0.000014</iyz>
<izz>1.532440</izz>
</inertia>
<mass>2.234000</mass>
</inertial>
<collision name="base_collision">
<pose>0 0 0.047800 0 0 0</pose>
<geometry>
<cylinder>
<radius>0.016495</radius>
<length>0.061163</length>
</cylinder>
</geometry>
</collision>
<visual name="base_visual">
<pose>0 0 0.047800 0 0 0</pose>
<geometry>
<mesh>
<uri>model://create/meshes/create_body.dae</uri>
</mesh>
</geometry>
</visual>
<collision name="front_wheel_collision">
<pose>0.130000 0 0.017000 0 1.570700 1.570700</pose>
<geometry>
<sphere>
<radius>0.018000</radius>
</sphere>
</geometry>
<surface>
<friction>
<ode>
<mu>0</mu>
<mu2>0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
</surface>
</collision>
<visual name="front_wheel_visual">
<pose>0.130000 0 0.017000 0 1.570700 1.570700</pose>
<geometry>
<sphere>
<radius>0.009000</radius>
</sphere>
</geometry>
</visual>
<collision name="rear_wheel_collision">
<pose>-0.13 0 0.017 0 1.5707 1.5707</pose>
<geometry>
<sphere>
<radius>0.015000</radius>
</sphere>
</geometry>
<surface>
<friction>
<ode>
<mu>0</mu>
<mu2>0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
</surface>
</collision>
<visual name="rear_wheel_visual">
<pose>-0.130000 0 0.017000 0 1.570700 1.570700</pose>
<geometry>
<sphere>
<radius>0.007500</radius>
</sphere>
</geometry>
</visual>
<sensor name="left_cliff_sensor" type="ray">
<pose>0.070000 0.140000 0.027000 0 1.570790 0</pose>
<ray>
<scan>
<horizontal>
<samples>1</samples>
<resolution>1.000000</resolution>
<min_angle>0</min_angle>
<max_angle>0</max_angle>
</horizontal>
</scan>
<range>
<min>0.010000</min>
<max>0.040000</max>
<resolution>0.100000</resolution>
</range>
</ray>
</sensor>
<sensor name="leftfront_cliff_sensor" type="ray">
<pose>0.150000 0.040000 0.027000 0 1.570790 0</pose>
<ray>
<scan>
<horizontal>
<samples>1</samples>
<resolution>1.000000</resolution>
<min_angle>0</min_angle>
<max_angle>0</max_angle>
</horizontal>
</scan>
<range>
<min>0.010000</min>
<max>0.040000</max>
<resolution>0.100000</resolution>
</range>
</ray>
</sensor>
<sensor name="right_cliff_sensor" type="ray">
<pose>0.070000 -0.140000 0.027000 0 1.570790 0</pose>
<ray>
<scan>
<horizontal>
<samples>1</samples>
<resolution>1.000000</resolution>
<min_angle>0</min_angle>
<max_angle>0</max_angle>
</horizontal>
</scan>
<range>
<min>0.010000</min>
<max>0.040000</max>
<resolution>0.100000 ...