PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.4k stars 13.46k forks source link

World not loading/gazebo gets hang #18136

Open kavin71 opened 3 years ago

kavin71 commented 3 years ago

I am running "roslaunch px4 multi_uav_mavros_sitl.launch" with iris model. It was running perfectly well until i edited the iris file and added the camera to it. A number of errors start coming as i run the launch file

INFO  [px4] PX4 daemon already running for instance 0 (Success)
failed to start local process: /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 0 -w sitl_iris_0 -d __name:=sitl_0 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav0-sitl_0-3.log
local launch of px4/px4 failed
process[uav0/iris_0_spawn-4]: started with pid [6732]
process[uav0/mavros-5]: started with pid [6733]
[uav0/sitl_0-3] process has died [pid -1, exit code 255, cmd /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 0 -w sitl_iris_0 -d __name:=sitl_0 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav0-sitl_0-3.log].
log file: /home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav0-sitl_0-3*.log
[ WARN] [1629799129.023355939, 2194.752000000]: Shutdown request received.
[ WARN] [1629799129.023393766, 2194.752000000]: Reason given for shutdown: [[/uav0/mavros] Reason: new node registered with same name]

[gazebo-1] process has died [pid 6662, exit code 255, cmd /opt/ros/melodic/lib/gazebo_ros/gzserver -e ode /home/kavin/Firmware/Tools/sitl_gazebo/worlds/empty.world __name:=gazebo __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/gazebo-1.log].
log file: /home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/gazebo-1*.log
INFO  [px4] PX4 daemon already running for instance 1 (Success)
[ INFO] [1629799130.339551125, 2195.268000000]: Plugin landing_target initialized
[ INFO] [1629799130.339710914, 2195.268000000]: Plugin local_position loaded
failed to start local process: /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 1 -w sitl_iris_1 -d __name:=sitl_1 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav1-sitl_1-6.log
local launch of px4/px4 failed
uav1/sitl_1-6] process has died [pid -1, exit code 255, cmd /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 1 -w sitl_iris_1 -d __name:=sitl_1 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav1-sitl_1-6.log].
log file: /home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav1-sitl_1-6*.log
[ INFO] [1629799130.452349615, 2195.308000000]: Plugin mount_control initialized
[ INFO] [1629799130.452480906, 2195.308000000]: Plugin obstacle_distance loaded
[ INFO] [1629799130.466083372, 2195.316000000]: Plugin obstacle_distance initialized
[ INFO] [1629799130.466223135, 2195.316000000]: Plugin odom loaded
[ WARN] [1629799130.496095109, 2195.332000000]: Shutdown request received.
[ WARN] [1629799130.496130121, 2195.332000000]: Reason given for shutdown: [[/uav1/mavros] Reason: new node registered with same name]
INFO  [px4] PX4 daemon already running for instance 2 (Success)
failed to start local process: /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 2 -w sitl_iris_2 -d __name:=sitl_2 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav2-sitl_2-9.log
local launch of px4/px4 failed
[uav2/sitl_2-9] process has died [pid -1, exit code 255, cmd /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 2 -w sitl_iris_2 -d __name:=sitl_2 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav2-sitl_2-9.log].
log file: /home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav2-sitl_2-9*.log
[ERROR] [1629799135.258525633, 2196.932000000]: SpawnModel: Failure - model name iris_0 already exist.
[INFO] [1629799135.262934, 2196.932000]: Spawn status: SpawnModel: Failure - entity already exists.
[ERROR] [1629799135.263679, 2196.932000]: Spawn service failed. Exiting.
[ INFO] [1629799135.383798921, 2196.984000000]: udp0: Remote address: 127.0.0.1:14582
[uav0/iris_0_spawn-4] process has died [pid 6732, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn_model -sdf -param model_description -model iris_0 -x 0 -y 0 -z 0 -R 0 -P 0 -Y 0 __name:=iris_0_spawn __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav0-iris_0_spawn-4.log].
log file: /home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav0-iris_0_spawn-4*.log

Could u please help me in sorting out the issue thanks in advance

potaito commented 3 years ago

Can you take a look at the log that it references here (hopefully it's not empty)?

failed to start local process: /home/kavin/Firmware/build/px4_sitl_default/bin/px4 /home/kavin/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS -i 1 -w sitl_iris_1 -d __name:=sitl_1 __log:=/home/kavin/.ros/log/cbc6fdd6-04a6-11ec-b1bc-0800279cdffe/uav1-sitl_1-6.log

Also it looks like you are launching mavros multiple times and that's why the previous instances of mavros are shutting down.