I've added a camera to the simulation. Its gravity is disabled & it also doesn't touch the ground. But it keeps drifting right after inserting. Video of the problem is uploaded here.
Any help is greatly appreciated.
This is the sdf file of the camera:
<?xml version="1.0" ?>
<sdf version="1.5">
<model name="camera">
<pose>0 0 0.5 0 0 0 </pose> <!--1.5707963267948966 1.5707963267948966</pose-->
<static>0</static>
<link name="link">
<gravity>0</gravity>
<inertial>
<mass>10.1</mass>
<inertia>
<ixx>1.000166667</ixx>
<iyy>1.000166667</iyy>
<izz>1.000166667</izz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>0.1 0.1 0.1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>0.1 0.1 0.1</size>
</box>
</geometry>
</visual>
<sensor name="camera" type="camera">
<camera>
<horizontal_fov>1.047</horizontal_fov>
<image>
<width>320</width>
<height>240</height>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>true</visualize>
<plugin name="camera_controller" filename="libgazebo_ros_camera.so">
<alwaysOn>true</alwaysOn>
<updateRate>0.0</updateRate>
<cameraName>free_camera</cameraName>
<imageTopicName>/free_camera/image_raw</imageTopicName>
<cameraInfoTopicName>/free_camera/camera_info</cameraInfoTopicName>
<frameName>camera_link</frameName>
<hackBaseline>0.07</hackBaseline>
<distortionK1>0.0</distortionK1>
<distortionK2>0.0</distortionK2>
<distortionK3>0.0</distortionK3>
<distortionT1>0.0</distortionT1>
<distortionT2>0.0</distortionT2>
</plugin>
</sensor>
</link>
</model>
</sdf>