jaspreeth / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

APM planner SIM lag, freezing and errors #328

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using APM 2.012 HIL
2. Open Xplane 9 and do settings 
3. open APM planner and connect
4. move rc stick

What is the expected output? What do you see instead?
I am moving the rc stick on transmitter. APM SIM gives me 2 seconds delay. 
After 30 seconds delay is about 5 seconds. APM can not steer airplane, becouse 
delay. I see servos moving instantly on my plane and long delay on computer. It 
still write the data on charts, only long after I move the stick.
I also got exception on MAVLINK access to disposed object. See screenshot. 

Sometimes it work perfectly and often I got this error above and can't figure 
out why sometimes work and sometimes nothing help. Tried computer restart, APM 
reinstall, APM HIL reinstall, reset APM board, connect and reconnect COM, 
restart Xplane. Tried without opening Xplane and got the same. 
I think some combination of above eliminate error, but I am unable to figure it 
out. Sometimes it start to work OK,

When I got this errors, APM planner sometimes freezes completly.

What version of the product are you using? On what operating system?
win XP
APM planner 0.4.20 
Xplane 9
AMP 2.012 HIL uploaded with APM planner 0.4.20

Please provide any additional information below.

Using computer:
intel core 2 duo CPU 3Ghz
2 Gb RAM

Sometimes linking with HK GCS help, but not much. I close APM and connect on 
same port. I see telemetry. Close GCS. Open AMP planner again. Now lag is 1 
second instead 2. Maybe telemetry rate is different. 

I am also programming C++ and c# software. I think that maybe APM planner is 
encoutering exceptions on MAVLINK and tries to catch it. This couse lags. I had 
similar issue before. I removed catch sentence and lag was gone. Only fast 
timers did this to my program (20 ms).

Original issue reported on code.google.com by metod.iv...@gmail.com on 27 Apr 2011 at 8:14

GoogleCodeExporter commented 8 years ago
that error is because you closed ardupilotsim without disconnecting first, and 
is normal in this case. In Ardupilotsim do you have the graph turned on? i 
beleive this is a cpu/processor issue. Turn the frame rate counter on in 
xplanes to check if it stalling.

Original comment by Meee...@gmail.com on 27 Apr 2011 at 11:22

GoogleCodeExporter commented 8 years ago
the other cause of some problems is firewalls, causing delays. My best guess 
would be your pc isnt realy fast enough with what your trying to do. turn down 
xplanes settings and check the framerate, turn on the graph in ardupilotsim. 
and check firewall rules. etc

Original comment by Meee...@gmail.com on 27 Apr 2011 at 11:48

GoogleCodeExporter commented 8 years ago
I did not solved issue. 

I turned on framerate. I have it 200 fr/s and minimum 150 fr/s when turning on 
APM SIM. It is good framerate.
I disable firewall, antivirus, unplug wire for modem (no network anymore).
No difference. Lag is still here (1-3 seconds). 
X-plane setup is ok. (screenshot)

Strange that only me gets this error. It must be computer problem or what? 
Any ideas?
I will try this on another computer. I will post results tommorow. 

Original comment by metod.iv...@gmail.com on 28 Apr 2011 at 1:26

GoogleCodeExporter commented 8 years ago
Solved! It is confirmed computer problem. After testing on another computer 
with fresh installed windows it works perfectly. 
I don't know what is wrong with my computer :( but thanks very much for 
support. 

Original comment by metod.iv...@gmail.com on 28 Apr 2011 at 2:02

GoogleCodeExporter commented 8 years ago

Original comment by dewei...@gmail.com on 30 Apr 2011 at 8:29

GoogleCodeExporter commented 8 years ago
Try to decrease UDP rate in Xplane. I have a identical problem and that change 
appears to work.

Original comment by Tiago.R....@gmail.com on 24 May 2011 at 2:38