Problem in setting up SITL in Ubuntu 15.10 machine

I have been trying to set up SITL on my machine from instructions given in this link -> dev.ardupilot.com/wiki/setting-up-sitl-on-linux/
All steps go smooth until starting an SITL simulator using

The following bug crops up the sol’n to which I am unable to find anywhere on the web. I even tried manually cloning but that didn’t work either.

[code]koustubh@koustubh-HP-242-G2-Notebook-PC:~$ cd ardupilot/ArduPlane/
koustubh@koustubh-HP-242-G2-Notebook-PC:~/ardupilot/ArduPlane$ sim_vehicle.sh -w~/ardupilot/ArduPlane ~/ardupilot/ArduPlane
Building sitl
fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
'git […] – […]'
Checking modules
modules/PX4NuttX missing - need module init

  • git submodule init
  • git submodule update
    fatal: Needed a single revision
    Unable to find current revision in submodule path ‘modules/PX4Firmware’
  • echo git submodule update failed
    git submodule update failed
  • git submodule status
    b020f59dab4fb8a6420ada31939e051008ab21a3 modules/PX4Firmware
    -d48fa3072b2396c489966c4ab10183ac7cf3dea9 modules/PX4NuttX
    -006d23ccca1375a973b7fae0cc351cedb41b812a modules/gbenchmark
    -c99458533a9b4c743ed51537e25989ea55944908 modules/gtest
    -c47a4e6e1d008baa7af20818906b8275df49694d modules/mavlink
    -6dd432c9742c22e1dd1638c7f91cf937e4bdb2f1 modules/uavcan
    -878ab1e29494e28236a260212a5021b1de35d9a3 modules/waf
  • exit 1
    …/mk/modules.mk:8: recipe for target ‘CHECK_MODULES’ failed
    make: *** [CHECK_MODULES] Error 1
    fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
    Use ‘–’ to separate paths from revisions, like this:
    'git […] – […]'
    fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
    Use ‘–’ to separate paths from revisions, like this:
    'git […] – […]'
    Checking modules
    modules/PX4NuttX missing - need module init
  • git submodule init
  • git submodule update
    fatal: Needed a single revision
    Unable to find current revision in submodule path ‘modules/PX4Firmware’
  • echo git submodule update failed
    git submodule update failed
  • git submodule status
    b020f59dab4fb8a6420ada31939e051008ab21a3 modules/PX4Firmware
    -d48fa3072b2396c489966c4ab10183ac7cf3dea9 modules/PX4NuttX
    -006d23ccca1375a973b7fae0cc351cedb41b812a modules/gbenchmark
    -c99458533a9b4c743ed51537e25989ea55944908 modules/gtest
    -c47a4e6e1d008baa7af20818906b8275df49694d modules/mavlink
    -6dd432c9742c22e1dd1638c7f91cf937e4bdb2f1 modules/uavcan
    -878ab1e29494e28236a260212a5021b1de35d9a3 modules/waf
  • exit 1
    …/mk/modules.mk:8: recipe for target ‘CHECK_MODULES’ failed
    make: *** [CHECK_MODULES] Error 1
    /home/koustubh/ardupilot/Tools/autotest/sim_vehicle.sh: Build failed

when I type

sim_vehicle.sh

the git cloning get stuck at the following stage->

koustubh@koustubh-HP-242-G2-Notebook-PC:~/ardupilot/ArduPlane$ sim_vehicle.sh
~/ardupilot/ArduPlane ~/ardupilot/ArduPlane
Building sitl
fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
'git […] – […]'
Checking modules
modules/PX4Firmware missing - need module init

  • git submodule init
  • git submodule update
    Cloning into ‘modules/PX4Firmware’…
    [/code]

Please Help.

You need to have gotten the code from git. Then in the ardupilot directory you need to run
git pull --rebase
git submodule update
and then try again.
Thanks, Grant.