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

"getting required buffer size failed" on jmavsim simulation on Windows 10 #86

Open
copterspace opened this issue Dec 21, 2018 · 0 comments

Comments

@copterspace
Copy link

Hello, dear friends!
I derscribed problem and solution I found here: PX4/PX4-Autopilot#11030

But nobody replied me yet, I am not sure if this problem of jmavsim or PX4 Firmware, but file I corrected is in Firmware repository.

Description of the bug
On Windows 10 jmavsim simulation trying to broadcast mavlink (in jmavsim console):
param set MAV_BROADCAST 1
leading system to reproduce error message in endless cycle:
WARN [mavlink] getting required buffer size failed

To Reproduce
I need to connect external ROS system to jmavsim simulation via mavros, to write/test simple python programms for autonomous flight. I do the following steps:

Start simulator:
make px4_sitl jmavsim
In simulator - allow external broadcast of mavlink:
param set MAV_BROADCAST 1
Start mavros on external ros machine to connect to my simulation:
roslaunch mavros px4.launch fcu_url:="udp://@192.168.1.36:14557"
Test the mavros connection to fcu:
rostopic echo /mavros/state

On Linux Ubuntu it works OK, on 4th step I see continious mavlink heartbeat messages.
But when I try to do the same on Windows 10 simulation - on step 2 I have endless cycle of messages in jmavsim console:
WARN [mavlink] getting required buffer size failed
This cycle restarts even when I stop and restart simulation. It ends only after I switch off MAV_BROADCAST=0 on Windows machine via QGroundControl.

Expected behavior
Same good as on Linux.

Additional context
It seems the problem is in https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_main.cpp , lines 1029-1046. It has an option for Mac:
ifconf.ifc_len = 1024;
but on Windows program thinks it runs on Linux and because of this misbehaves.

I created Pull request PX4/PX4-Autopilot#11037, but yet there was also no comments.

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

No branches or pull requests

1 participant