[JdeRobot] Error in Navdata Ice server
Jose Antonio
cbyte18 at gmail.com
Sat Feb 25 12:45:07 CET 2017
Hi all
I'm on serve navdata interface in Ice but i found a "little" problem.
The problem is when I connect the client. When I receive the first
object in traces i can see my server stops so i not receive objects
anymore. I find another strange thing when this happens i don't receive
ANY ICE objects anymore.
I can't find the reason and I need a fresh look.
I'm testing the server with the uav_viewer_py and my server code is in
my git
https://github.com/RoboticsURJC-students/2014-pfc-JoseAntonio-Fernandez/blob/master/APMServer/
The code involved in is:
*Server*
https://github.com/RoboticsURJC-students/2014-pfc-JoseAntonio-Fernandez/blob/master/APMServer/Server.py:
/ def openNavdataChannel(self, navdata):
'''
Open a Ice Server to serve all the navigation data
:return:
'''
status = 0
ic = None
navdata2Tx = navdata
try:
ic = Ice.initialize(sys.argv)
adapter =
ic.createObjectAdapterWithEndpoints("NavdataAdapter", "default -p 8805")
object = navdata2Tx
adapter.add(object, ic.stringToIdentity("ardrone_navdata"))
adapter.activate()
ic.waitForShutdown()
except:
traceback.print_exc()
status = 1
if ic:
# Clean up
try:
ic.destroy()
except:
traceback.print_exc()
status = 1
sys.exit(status)/
*Interface
*https://github.com/RoboticsURJC-students/2014-pfc-JoseAntonio-Fernandez/blob/master/APMServer/interfaces/NavdataI.py
/import jderobot, threading
lock = threading.Lock()
class NavdataI(jderobot.Navdata):
def __init__(self):
self.data = jderobot.NavdataData()
def getNavdata(self, current=None):
lock.acquire()
return self.data
lock.release()
def setNavdata(self, data):
lock.acquire()
self.data=data
lock.release()/
Thanks for all
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://gsyc.urjc.es/pipermail/jde-developers/attachments/20170225/3c315d85/attachment.html>
More information about the Jde-developers
mailing list