I've setup SITL exactly as mentioned in the wiki. After running 

sim_vehicle.sh --console --map --aircraft test

I receive the message

MAV> Waiting for heartbeat from tcp:

I'm unable to do anything in the SITL because of this. Can anyone help me diagnose this issue?


Views: 2116

Reply to This

Replies to This Discussion

Did you do sim_vehicle.sh -w first to initialize the Params?
Ps also try an earlier tag, and not master HEAD is git checkout Copter-3.3

Oh and ignore the --aircraft param
Yep, I first ran that to erase the EEPROM and then ran the sim_vehicle with the aircraft and map parameters. Even the first command(sim_vehicle.sh -w) complains about the heartbeat. (It creates the .o files and then does the parameters process and then says no heartbeat message)

So far - both sim_vehicle.sh -w and the longer command complain about the heartbeat. I did a nmap on the localhost and that port has nothing on it(not open/active).
When in ArduCopter directory, do git checkout Copter-3.3 and try again. The issue is that the ArduCopter.elf is not being built.

Hey Bill, I did the following

sudo apt-get install realpath
git checkout Copter-3.3

git pull

went into the ArduCopter directory and ran sim_vehicle.sh -w

then I ran sim_vehicle.sh without the aircraft parameter.

Here's the output

Building /tmp/ArduCopter.build/ArduCopter.elf
%% ArduCopter.elf
Firmware is in ArduCopter.elf
Starting up at CMAC : -35.363261,149.165230,584,353
Starting ardupilot : /home/pi/ardupilot/ArduCopter/ArduCopter.elf -S -I0 --home -35.363261,149.165230,584,353 --model + --speedup=1
Window access not found, logging to /tmp/ardupilot.log
Connect tcp: source_system=255
Unable to access the X Display, is $DISPLAY set properly?
Loaded module console
Loaded module map
no script test/mavinit.scr
Log Directory: test/logs/2015-11-17/flight1
Telemetry log: test/logs/2015-11-17/flight1/flight.tlog
MAV> Waiting for heartbeat from tcp:
Same issue. You probably don't have all the dependencies installed for the firmware to build. You should be able to type make sitl in the ArduCopter folder and see it build. See dev.ardupilot.com for instructions on building.

Ok, how are you logging in to run SITL, It look like you don't have X setup.

If you are logging in remotely you can do two things

1) Run without Console/Map. Start screen session when you ssh in and then use sim_vehilce.sh

2) use ssh -Y when you connect e.g ssh -Y and this sets XDISPLAY to be your connectinh host. It will then show the console and the map 

If you are on the same machine and without X installed. you can do the same as step 2, run screen, then run sim_vehicle.sh from the ArduCopter directory. CTRL A,0 will switch you back to the MAVProxy command view. CTRL-A D detahces the screen and leaves it running. screen -r resumes the screen session. CTRL-C in the MACProxy command view quits

I followed the tutorial and ran the 

ardupilot/Tools/scripts/install-prereqs-ubuntu.sh -y

and then did

make sitl

and it returned.


I then tried

make px4-v2 
It put in several lines and completed

I'm currently using option 1 of your suggestions.

Starting up at CMAC : -35.363261,149.165230,584,353
Starting ardupilot : /home/ubuntu/ardupilot/ArduCopter/ArduCopter.elf -S -I0 --home -35.363261,149.165230,584,353 -w --model + --speedup=1
Window access not found, logging to /tmp/ardupilot.log
Connect tcp: source_system=255
(error(111, 'Connection refused'), 'sleeping')
(error(111, 'Connection refused'), 'sleeping')
Failed to connect to tcp: : [Errno 111] Connection refused

Figured out the error. when I type make sitl, I get a bunch of errors after

Building /tmp/ArduCopter.build/ArduCopter.elf%% ArduCopter.elf

These errors are

/tmp/ArduCopter.build/ArduCopter.o: In function `Copter::dataflash_periodic()':/home/ubuntu/zipquad/ardupilot/ArduCopter/ArduCopter.cpp:438: undefined reference to `DataFlash_Class::perio

all these errors vanished when I did make clean and then make sitl

but when it sets the params it gets timeouts

Connect tcp: source_system=255set FRAME to 0.000000
timeout setting FRAME to 0.000000
set MAG_ENABLE to 1.000000
timeout setting MAG_ENABLE to 1.000000
set FS_THR_ENABLE to 1.000000
timeout setting FS_THR_ENABLE to 1.000000

Hi everyone !

I'm testing sitl arducopter and i'm got some questions about it :

- Firstly, is this link still relevant ?

- Is it possible to send c++ code, which use mavlink, directly to sitl or it's also possible to make sitl with GCS ?

- If it's possible, is it possible to someone explain me how to make it ?

Thanks you very much !


Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service