Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot send mavlink messages on MacOS #1723

Closed
sreejithkrishnanr opened this issue Jan 21, 2019 · 1 comment
Closed

Cannot send mavlink messages on MacOS #1723

sreejithkrishnanr opened this issue Jan 21, 2019 · 1 comment
Labels

Comments

@sreejithkrishnanr
Copy link
Contributor

sreejithkrishnanr commented Jan 21, 2019

Hi,
I am unable to send mavlink messages to AirSim in PX4 Drone simulation mode.

This is happening because in MacOS, the message sender address in not populated by read(int fildes, void *buf, size_t nbyte) function used to read data from socket.

https://github.com/Microsoft/AirSim/blob/5223c26f86d93b7a3b5961dab170a829a9d5baab/MavLinkCom/src/serial_com/UdpClientPort.cpp#L185-L190

Since the message sender address is not populated, the received message is ignored.
https://github.com/Microsoft/AirSim/blob/5223c26f86d93b7a3b5961dab170a829a9d5baab/MavLinkCom/src/serial_com/UdpClientPort.cpp#L234-L238

Using the recvfrom function like for other platforms fixes the problem in MacOS high sierra. I am not sure whether this will break something in other versions of MacOS.

@msb336 msb336 added the osx label Jan 22, 2019
@msb336
Copy link
Contributor

msb336 commented Jan 23, 2019

Hi @sreejithkrishnanr
Thanks for your work on this! At this time, the airsim doesn't support osx builds, so all work towards compatibility is community driven. Please submit a pull request with the changes you have made and we'll review it as soon as we can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants