Cannot identify gazebo error
I was trying to run a 3D simulation with a depth and point cloud camera and gazebo would not start. It just gave me the following error message:
[gazebo-2] process has died [pid 17326, exit code 139, cmd /opt/ros/melodic/lib/gazebo_ros/gzserver --verbose -e ode worlds/empty_underwater.world __name:=gazebo __log:=/home/makinohara/.ros/log/317cf8d0-05d2-11eb-84f1-000c29b81a2f/gazebo-2.log].
log file: /home/makinohara/.ros/log/317cf8d0-05d2-11eb-84f1-000c29b81a2f/gazebo-2*.log
I tried to look for the log file but could not find it in the log folder. I am wondering how can I identify what's the cause for gazebo crashing.
Here is how I implemented the sensor
<xacro:macro name="modified_camera_plugin_macro"
params="namespace suffix parent_link topic mass update_rate
hfov width height stddev scale
*inertia *origin">
<!-- Sensor link -->
<link name="${namespace}/camera${suffix}_link">
<inertial>
<xacro:insert_block name="inertia" />
<mass value="${mass}" />
<origin xyz="0 0 0" rpy="0 0 0" />
</inertial>
<visual>
<geometry>
<mesh filename="file://$(find uuv_sensor_ros_plugins)/meshes/oe14-372.dae" scale="${scale} ${scale} ${scale}"/>
</geometry>
</visual>
<xacro:no_collision/>
</link>
<joint name="${namespace}/camera${suffix}_joint" type="revolute">
<xacro:insert_block name="origin" />
<parent link="${parent_link}" />
<child link="${namespace}/camera${suffix}_link" />
<limit upper="0" lower="0" effort="0" velocity="0" />
<axis xyz="1 0 0"/>
</joint>
<link name="${namespace}/camera${suffix}_link_optical">
<xacro:box_inertial x="0.0001" y="0.0001" z="0.0001" mass="0.001">
<origin xyz="0 0 0" rpy="0 0 0"/>
</xacro:box_inertial>
<collision>
<!-- todo: gazebo needs a collision volume or it will ignore the pose of
the joint that leads to this link (and assume it to be the identity) -->
<geometry>
<cylinder length="0.000001" radius="0.000001"/>
</geometry>
<origin xyz="0 0 0" rpy="0 ${0.5*pi} 0"/>
</collision>
</link>
<joint name="${namespace}/camera${suffix}_optical_joint" type="revolute">
<origin xyz="0 0 0" rpy="${-pi/2} 0 ${-pi/2}"/>
<parent link="${namespace}/camera${suffix}_link"/>
<child link="${namespace}/camera${suffix}_link_optical"/>
<limit upper="0" lower="0" effort="0" velocity="0" />
<axis xyz="1 0 0"/>
</joint>
<gazebo reference="${namespace}/camera${suffix}_link">
<sensor type="camera" name="camera${suffix}">
<update_rate>${update_rate}</update_rate>
<camera name="camera${suffix}">
<horizontal_fov>${hfov}</horizontal_fov>
<image>
<width>${width}</width>
<height>${height}</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.05</near>
<far>3000</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>${stddev}</stddev>
</noise>
</camera>
<plugin name="camera${suffix}_controller" filename="libgazebo_ros_openni_kinect.so">
<baseline>0.2</baseline>
<alwaysOn>true</alwaysOn>
<updateRate>${update_rate}</updateRate>
<cameraName>${namespace}/camera${suffix}</cameraName>
<frameName>camera${suffix}_link_optical</frameName>
<attenuationR>0.0</attenuationR>
<attenuationG>0.0</attenuationG>
<attenuationB>0.0</attenuationB>
<backgroundR>0</backgroundR>
<backgroundG>0</backgroundG>
<backgroundB>0</backgroundB>
<pointCloudCutoff>0.5</pointCloudCutoff>
<pointCloudCutoffMax>3.0</pointCloudCutoffMax>
<distortionK1>0</distortionK1>
<distortionK2>0</distortionK2>
<distortionK3>0</distortionK3>
<distortionT1>0</distortionT1>
<distortionT2>0</distortionT2>
<CxPrime>0</CxPrime>
<Cx>0</Cx>
<Cy>0</Cy>
<focalLength>0</focalLength> ...
@MakinoharaShouko Since the thing that is crashing is
gzserver
, I am sure this is something related with your world (empty_underwater.world
) having something bad instantiated or any bad tag.@Weasfas I am not sure if there is something wrong with the world. The world has been working fine until I changed the camera. And after changing back to the original camera the gazebo launched without any error.