ArduPilot / ArduPilot/ardupilot
SITL: Failed to load defaults from ... when trying to start multi-aircraft SITL
- Dominant language
- C++
- Stars
- 15.9k
- Forks
- 21.4k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 127
Description
## Bug report
**Issue details**
When trying to start a simulation with:
`sim_vehicle.py -v ArduPlane --map --console -n 2 --auto-sysid`
the output in the main window is:
```
SIM_VEHICLE: Using defaults from (../../git/ardupilot/Tools/autotest/default_params/copter.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: "/home/felix/git/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduCopter" "/home/felix/git/ardupilot/build/sitl/bin/arducopter" "-S" "--model" "+" "--speedup" "1" "--slave" "0" "--defaults" "../../git/ardupilot/Tools/autotest/default_params/copter.parm" "-I0" "--sysid" "1"
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: "/home/felix/git/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduCopter" "/home/felix/git/ardupilot/build/sitl/bin/arducopter" "-S" "--model" "+" "--speedup" "1" "--slave" "0" "--defaults" "../../git/ardupilot/Tools/autotest/default_params/copter.parm" "-I1" "--sysid" "2"
RiTW: Starting ArduCopter : /home/felix/git/ardupilot/build/sitl/bin/arducopter -S --model + --speedup 1 --slave 0 --defaults ../../git/ardupilot/Tools/autotest/default_params/copter.parm -I0 --sysid 1
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: "mavproxy.py" "--out" "127.0.0.1:14550" "--out" "127.0.0.1:14551" "--master" "tcp:127.0.0.1:5760" "--sitl" "127.0.0.1:5501" "--out" "127.0.0.1:14560" "--out" "127.0.0.1:14561" "--master" "tcp:127.0.0.1:5770" "--sitl" "127.0.0.1:5511" "--map" "--console"
RiTW: Starting ArduCopter : /home/felix/git/ardupilot/build/sitl/bin/arducopter -S --model + --speedup 1 --slave 0 --defaults ../../git/ardupilot/Tools/autotest/default_params/copter.parm -I1 --sysid 2
Connect tcp:127.0.0.1:5760 source_system=255
Connect tcp:127.0.0.1:5770 source_system=255
Loaded module console
Loaded module map
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from tcp:127.0.0.1:5760
MAV>
```
and all plane simulations fail with the following error:
```
Setting SIM_SPEEDUP=1.000000
Setting SYSID_THISMAV=1
Starting sketch 'ArduPlane'
Starting SITL input
Using Irlock at port : 9005
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection ....
Connection on serial port 5760
PANIC: Failed to load defaults from ../../git/ardupilot/Tools/autotest/default_params/plane.parm
Running: sh dumpstack.sh 30301 >dumpstack.sh_arduplane.30301.out 2>&1
Failed
Running: sh dumpcore.sh 30301 >dumpcore.sh_arduplane.30301.out 2>&1
Failed
```
(the second window has `SYSID_THISMAV=2` and other ports, but the same error)
The path to the defaults file is correct, I can access it using the path listed above.
The command:
`sim_vehicle.py -v ArduPlane --map --console --auto-sysid`
out of the same or any other directory works as expected.
Does somebody have the same problem?
**Version**
current master (020262b)
**Platform**
[ x ] All (tested with plane and also copter)
[ ] AntennaTracker
[ x ] Copter
[ x ] Plane
[ ] Rover
[ ] Submarine
Contributor guide
Research direction
Start with sim_vehicle.py and the default_params/plane.parm path shown in the report, then reproduce the multi-aircraft command with -n 2 and --auto-sysid. Compare it with the single-aircraft invocation and inspect how each ArduPlane process receives its defaults path; done means both plane simulations load plane.parm successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- embedded-iot, robotics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100