Open mark-nick-o opened 2 years ago
That's a Python2 vs Python 3 issue. I assume you're running Python3?
Python3 strings need to be converted to bytes for MAVLink. See https://github.com/ArduPilot/MAVProxy/blob/master/MAVProxy/modules/mavproxy_asterix.py#L254 for an example.
See https://stackoverflow.com/questions/7585435/best-way-to-convert-string-to-bytes-in-python-3 for the background of the string bytes issue in Python3
seems to work fine like this function returns good now
def mavlink_send_video_stream_information(self, the_connection):
print(" !!! sending the video stream information !!! \n")
try:
the_connection.mav.video_stream_information_send(
self.stream_id,
self.count,
self.stream_type,
self.Vflags,
self.framerate,
self.Vresolution_h,
self.Vresolution_v,
self.bitrate,
self.rotation,
self.hfov,
#self.videoname,
(self.videoname).encode('ascii'),
(self.video_uri).encode('ascii'))
ret = True
except Exception as err_msg:
print("Failed to send video stream information message : %s" % (err_msg))
ret = False
return ret
would you expect me to see this in mavlink inspector as i cant see it, the function is returning True now without error when i send it so it suggests all the parameters are good.
@stephendade I wanna work on this issue. Please assign this to me and since I'm new to this repo please guide me through.
How to recieve this information on the mavlink recieving end?
@rayyanInqline786,
If you're using ArduPilot, it doesn't send these messages yet but it's high on the to-do list.
@rayyanInqline786,
If you're using ArduPilot, it doesn't send these messages yet but it's high on the to-do list. @rmackay9 I want to send video stream through pymavlink and receive through the pymavlink. How can I do it?
Hello @rmackay9,
Does it mean that ArduPilot will not forward a VIDEO_STREAM_INFORMATION/STATUS MAVLink message? (i.e. from a companion computer implementing a camera protocol to a GCS via an ArduPilot).
Thanks,
@Ronan0912,
ArduPilot will forward messages received on the autopilot's serial ports to the GCS unless the SERIALx_OPTION bit has been set to disable forwarding
@rayyanInqline786,
I'm not really a pymavlink expert I'm afraid.
Thanks! All the messages look forwarded to the GCS except those two. I will add debug traces to understand what is happening.
FYI ArduPilot is correctly forwarding the VIDEO_STREAM_INFORMATION. It is the Herelink remote/airunit connected to the ArduPilot that is filtering it (https://discuss.cubepilot.org/t/video-streaming-issue-in-custom-qgc-for-herelink/12858).
but gets the following error relating to a bytestream ???