How to bring two instances of sim_vehicle.sh?

sorry @khancyr

still get the same…

 hugo@hugo-X202E:~/ardupilot$ ./waf configure
Setting top to                           : /home/hugo/ardupilot 
Setting out to                           : /home/hugo/ardupilot/build 
Autoconfiguration                        : enabled 
Setting board to                         : sitl 
Checking for 'g++' (C++ compiler)        : /usr/lib/ccache/g++ 
Checking for 'gcc' (C compiler)          : /usr/lib/ccache/gcc 
Checking for need to link with librt     : not necessary 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : no 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Checking for program 'size'                    : /usr/bin/size 
Benchmarks                                     : disabled 
Unit tests                                     : enabled 
'configure' finished successfully (4.353s)

Ok @khancyr, I’ve got some news

I tried on a clean install of ubuntu 16.04 LTS (same gcc version and some computer architecture) and I was able to compile running just ../Tools/autotest/sim_vehicle.py -v ArduCopter

running ./waf configure in the ardupilot folder already discovers isnan

Setting top to                           : /home/student/ardupilot 
Setting out to                           : /home/student/ardupilot/build 
Autoconfiguration                        : enabled 
Setting board to                         : sitl 
Checking for 'g++' (C++ compiler)        : /usr/lib/ccache/g++ 
Checking for 'gcc' (C compiler)          : /usr/lib/ccache/gcc 
Checking for need to link with librt     : not necessary 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : yes 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 --use-dir copter0
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Checking for program 'size'                    : /usr/bin/size 
Benchmarks                                     : disabled 
Unit tests                                     : enabled 
'configure' finished successfully (0.513s)

Nevertheless when I run [quote=“khancyr, post:2, topic:18653”]
…/Tools/autotest/sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10 --map --console --use-dir copter0 -I 0
[/quote]

i still get

SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at -35.363261,149.165230,584,353 (CMAC)
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/student/ardupilot/ArduCopter/modules/waf/waf-light" "configure" "--board" "sitl"
Traceback (most recent call last):
  File "../Tools/autotest/sim_vehicle.py", line 745, in <module>
    do_build(vehicle_dir, cmd_opts, frame_infos)
  File "../Tools/autotest/sim_vehicle.py", line 331, in do_build
    return do_build_waf(opts, frame_options)
  File "../Tools/autotest/sim_vehicle.py", line 297, in do_build_waf
    run_cmd_blocking("Configure waf", cmd_configure, check=True)
  File "../Tools/autotest/sim_vehicle.py", line 410, in run_cmd_blocking
    p = subprocess.Popen(cmd, **kw)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
SIM_VEHICLE: Killing tasks

it is only when I remove --use-dir copter0 that I’m able to compile with all the other options. do you think there might be any reason in particular for this to happen?

also… the map doesn’t appear…

cheers,
Hugo

Ok!

So… if I am at directiry ardupilot/Arducopter and run

it shows what was described in the previous post… but if I run only

sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10 --map --console --use-dir copter0 -I 0

i get

SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at -35.363261,149.165230,584,353 (CMAC)
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/student/ardupilot/modules/waf/waf-light" "configure" "--board" "sitl"
Setting top to                           : /home/student/ardupilot 
Setting out to                           : /home/student/ardupilot/build 
Autoconfiguration                        : enabled 
Setting board to                         : sitl 
Checking for 'g++' (C++ compiler)        : /usr/lib/ccache/g++ 
Checking for 'gcc' (C compiler)          : /usr/lib/ccache/gcc 
Checking for need to link with librt     : not necessary 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : yes 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Checking for program 'size'                    : /usr/bin/size 
Benchmarks                                     : disabled 
Unit tests                                     : enabled 
'configure' finished successfully (0.507s)
SIM_VEHICLE: Building
SIM_VEHICLE: "/home/student/ardupilot/modules/waf/waf-light" "build" "--target" "bin/arducopter"
Waf: Entering directory `/home/student/ardupilot/build/sitl'
Waf: Leaving directory `/home/student/ardupilot/build/sitl'

BUILD SUMMARY
Build directory: /home/student/ardupilot/build/sitl
Target          Text     Data  BSS    Total  
---------------------------------------------
bin/arducopter  1535683  1962  37088  1574733

Build commands will be stored in build/sitl/compile_commands.json
'build' finished successfully (2.476s)
SIM_VEHICLE: Using defaults from (/home/student/ardupilot/Tools/autotest/default_params/copter.parm,/home/student/ardupilot/Tools/autotest/default_params/gazebo-iris.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: "/home/student/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduCopter" "/home/student/ardupilot/build/sitl/bin/arducopter" "-S" "-I0" "--home" "-35.363261,149.165230,584,353" "--model" "gazebo-iris" "--speedup" "1" "--defaults" "/home/student/ardupilot/Tools/autotest/default_params/copter.parm,/home/student/ardupilot/Tools/autotest/default_params/gazebo-iris.parm"
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: "mavproxy.py" "--master" "tcp:127.0.0.1:5760" "--sitl" "127.0.0.1:5501" "--out" "127.0.0.1:14550" "--out" "127.0.0.1:14551" "--mav10" "--map" "--console"
RiTW: Starting ArduCopter : /home/student/ardupilot/build/sitl/bin/arducopter -S -I0 --home -35.363261,149.165230,584,353 --model gazebo-iris --speedup 1 --defaults /home/student/ardupilot/Tools/autotest/default_params/copter.parm,/home/student/ardupilot/Tools/autotest/default_params/gazebo-iris.parm
Usage: mavproxy.py [options]

mavproxy.py: error: no such option: --mav10
SIM_VEHICLE: MAVProxy exited
SIM_VEHICLE: Killing tasks

deleted --mav10 and it worked but sitll map didn’t show…
uprgaded mavproxy version

it seems to be working! =D

Nice !
About the …/Tools/autotest/ it was because your were using it before. Normally, if you follow the wiki, you should have sim_vehicle.py to your path!

According to your screen, it should be working with gazebo ! Launching default iris world should work !

Hey @khancyr

when I launch the default iris world

roslaunch ardupilot_sitl_gazebo_plugin iris_spawn.launch

straight from the ardupilot_sitl_gazebo_plugin I get these messages in in the roslaunch window:

[ INFO] [1498501769.706079223, 39.112500000]: ARI: Ardupilot connection off, no messages
[ INFO] [1498501769.709283018, 39.112500000]: ARI: Connected with Ardupilot

Continuously, over and over again…
while on the mavproxy window I keep getting this:

arm throttle
GUIDED> APM: PreArm: Waiting for Nav Checks
APM: PreArm: gyros still settling
Got MAVLink msg: COMMAND_ACK {command : 400, result : 4}

Any ideas?

Thanks,
Hugo

Hey @khancyr,

Sorry to bother you again, but is there any chance you could share your .launch file? i’m asking this because when I run[quote=“khancyr, post:2, topic:18653”]
sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10 --map --console --use-dir copter1 -I 1
[/quote]

and start a quadcopter in gazebo the connection doesn’t happen… and I sure I’m changing the port to 127.0.0.1:5770

Also I should add, it works with the option -I 0 and the port set to 127.0.0.1:5760
thanks