Re: Native control protocol not working in 2.10?

martín bianco <[email protected]> Sun, 10 Mar 2013 00:56:36 +0000
Newsgroups gmane.games.flightgear.general
Message-ID <[email protected]>
--===============8992192973343820713==
Content-Type: multipart/alternative;
	boundary="_9311ef68-2c3f-4855-8f4d-95927363267c_"

--_9311ef68-2c3f-4855-8f4d-95927363267c_
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable



----------
Enviado v=EDa Nokia Email


-----Original Message-----
From: Viktor Radnai
Sent: 3/9/2013 8:18:06 PM
To: FlightGear user discussions
Subject: [Flightgear-users] Native control protocol not working in 2.10?
Hi there,

I'm developing an UAV and using FG for simulation. I have successfully
set up a control loop using the native-ctrls option (and a few others)
like this:
fgfs (various options) \
     --native-ctrls=3Dsocket,in,$AP_FREQ,$AP_HOST,5600,udp \
     --native-ctrls=3Dsocket,out,$AP_FREQ,$AP_HOST,5700,udp \
     (more options)

This means that FG will send control packets to UDP port 5700 where my
software listens, it gets the packet, changes a few things (mostly
throttle, elevator, rudder and aileron) and sends the packet back to FG
on udp port 5600. This used to work perferctly on 2.8. On 2.10 I get
control packets, I modify them and send them back but they have no
effect whatsoever. It also seems that FG just doesn't process these
packets, netstat shows a backlog of 2304 bytes that are waiting for
processing almost immediately after my software begins sending data:

efti@valkyrie:~/Projects/uav/autopilot$ netstat -anp
(Not all processes could be identified, non-owned process info
  will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
<snip>
udp     2304      0 127.0.0.1:5600  0.0.0.0:*  20773/fgfs
<snip>

According to man netstat, Recv-Q means "The count of bytes not copied by
the user program connected to this socket". Could someone please test to
see if this is actually broken or I should be doing something
differently? I'd rather not roll back to 2.8 if I can get this to work
again (I'm also happy to change the code and recompile if someone has a
fix).

Thanks in advance.

Cheers,
Vik

---------------------------------------------------------------------------=
---
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users

--_9311ef68-2c3f-4855-8f4d-95927363267c_
Content-Type: text/html; charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

<br>=0A=
<br>=0A=
----------<br>=0A=
Enviado v=EDa Nokia Email<br><br><html>
<head>

</head>
<body>
<br>
-----Original Message----- <br>
From: Viktor Radnai <[email protected]><br>
Sent: 3/9/2013 8:18:06 PM <br>
To: FlightGear user discussions <[email protected]><br=
>
Subject: [Flightgear-users] Native control protocol not working in 2.10? <b=
r>
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; pad=
ding-left: 4pt; border-left: #800000 2px solid; } --></style><font size=3D"=
2">
<div class=3D"PlainText">Hi there,<br>
<br>
I'm developing an UAV and using FG for simulation. I have successfully <br>
set up a control loop using the native-ctrls option (and a few others) <br>
like this:<br>
fgfs (various options) \<br>
&nbsp;&nbsp;&nbsp;&nbsp; --native-ctrls=3Dsocket,in,$AP_FREQ,$AP_HOST,5600,=
udp \<br>
&nbsp;&nbsp;&nbsp;&nbsp; --native-ctrls=3Dsocket,out,$AP_FREQ,$AP_HOST,5700=
,udp \<br>
&nbsp;&nbsp;&nbsp;&nbsp; (more options)<br>
<br>
This means that FG will send control packets to UDP port 5700 where my <br>
software listens, it gets the packet, changes a few things (mostly <br>
throttle, elevator, rudder and aileron) and sends the packet back to FG <br=
>
on udp port 5600. This used to work perferctly on 2.8. On 2.10 I get <br>
control packets, I modify them and send them back but they have no <br>
effect whatsoever. It also seems that FG just doesn't process these <br>
packets, netstat shows a backlog of 2304 bytes that are waiting for <br>
processing almost immediately after my software begins sending data:<br>
<br>
efti@valkyrie:~/Projects/uav/autopilot$ netstat -anp<br>
(Not all processes could be identified, non-owned process info<br>
&nbsp; will not be shown, you would have to be root to see it all.)<br>
Active Internet connections (servers and established)<br>
Proto Recv-Q Send-Q Local Address Foreign Address State <br>
PID/Program name<br>
&lt;snip&gt;<br>
udp&nbsp;&nbsp;&nbsp;&nbsp; 2304&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 127.0.0.1:=
5600&nbsp; 0.0.0.0:*&nbsp; 20773/fgfs<br>
&lt;snip&gt;<br>
<br>
According to man netstat, Recv-Q means &quot;The count of bytes not copied =
by <br>
the user program connected to this socket&quot;. Could someone please test =
to <br>
see if this is actually broken or I should be doing something <br>
differently? I'd rather not roll back to 2.8 if I can get this to work <br>
again (I'm also happy to change the code and recompile if someone has a <br=
>
fix).<br>
<br>
Thanks in advance.<br>
<br>
Cheers,<br>
Vik<br>
<br>
---------------------------------------------------------------------------=
---<br>
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester&nbs=
p; <br>
Wave(TM): Endpoint Security, Q1 2013 and &quot;remains a good choice&quot; =
in the&nbsp; <br>
endpoint security space. For insight on selecting the right partner to <br>
tackle endpoint security challenges, access the full report. <br>
<a href=3D"http://p.sf.net/sfu/symantec-dev2dev">http://p.sf.net/sfu/symant=
ec-dev2dev</a><br>
_______________________________________________<br>
Flightgear-users mailing list<br>
[email protected]<br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/flightgear-users">h=
ttps://lists.sourceforge.net/lists/listinfo/flightgear-users</a><br>
</div>
</font>
</body>
</html>

--_9311ef68-2c3f-4855-8f4d-95927363267c_--


--===============8992192973343820713==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
--===============8992192973343820713==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users

--===============8992192973343820713==--