[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] Reading messages in python from a replayed log

From: Hector Garcia de Marina
Subject: [Paparazzi-devel] Reading messages in python from a replayed log
Date: Fri, 19 Aug 2016 10:54:47 +0200

Hi guys,

I have the following problem and I do not know whether it has a straightforward solution.

I am replaying a log, everything looks find (GCS, messages, real time plot, etc). I also have
an agent written in python that works fine for simulation and real flights but not with replays.

In particular, it complains about:

Exception happened during processing of request from ('', 50024)
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 596, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/", line 652, in __init__
  File "/usr/lib/python2.7/dist-packages/ivy/", line 1268, in handle
    keep_connection_alive = self.process_ivymessage(msg, client)
  File "/usr/lib/python2.7/dist-packages/ivy/", line 1334, in process_ivymessage
    self.server.handle_msg(client, num_id, *params)
  File "/usr/lib/python2.7/dist-packages/ivy/", line 1088, in handle_msg
    return self._get_fct_for_subscription(int(idx))(client, *params)
  File "/home/noether/Workspace/paparazzi/sw/ext/pprzlink/lib/v1.0/python/pprzlink/", line 95, in <lambda>
    bind_id = IvyBindMsg(lambda agent, *larg: self.parse_pprz_msg(callback, larg[0]), regex)
  File "/home/noether/Workspace/paparazzi/sw/ext/pprzlink/lib/v1.0/python/pprzlink/", line 156, in parse_pprz_msg
    callback(ac_id, msg)
UnboundLocalError: local variable 'ac_id' referenced before assignment

This error is triggered by

--->  message_recv(self, ac_id, msg): 

The same error can be reproduced by replaying a log and trying to run the python versions of the agents Messages and RealTimePlot.

It seems it is related with the following? the aircraft now it is "replay3" instead of "3" by
inspecting the format of the messages?

replay3 ATTITUDE 0.68112 -2.240519 0.333095

instead of

3 ATTITUDE xxx xxx



reply via email to

[Prev in Thread] Current Thread [Next in Thread]