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

simulator: fix TCP on Cygwin-Windows and updated two world files for Gazebo #11101

Merged
merged 2 commits into from Dec 27, 2018

Conversation

julianoes
Copy link
Contributor

@julianoes julianoes commented Dec 26, 2018

It turns out that sendto does not work for TCP on Cygwin-Windows, instead we need to use send. This required some refactoring since we need to have the internet protocol and the port stored as a member
variable.

This should fix that lockstep SITL simulation was not working on Windows.

Fixes #11090.

I've also updated sitl_gazebo since that fixes a worldfile which needed updating for lockstep.

It turns out that `sendto` does not work for TCP on Cygwin-Windows,
instead we need to use `send`. This required some refactoring since we
need to have the internet protocol and the port stored as a member
variable.

This should fix that lockstep SITL simulation was not working on
Windows.
This fixes the worlds for tailsitter and plane for the lockstep
simulation.
@julianoes julianoes changed the title simulator: fix TCP on Cygwin-Windows simulator: fix TCP on Cygwin-Windows and updated two world files for Gazebo Dec 26, 2018
@julianoes julianoes merged commit 3e87013 into master Dec 27, 2018
@julianoes julianoes deleted the fix-win-tcp branch December 27, 2018 06:49
@MaEtUgR
Copy link
Member

MaEtUgR commented Dec 27, 2018

Nice! Thanks a lot!
Messages are successfully sent again. Sadly SITL is still not working properly like before. The drone for some reson takes off on simulation boot without being armed and I was able to get the whole stepping to freeze at some point. I'll debug further, this helps a lot in any case. Thanks again.

@LorenzMeier
Copy link
Member

That suggests that uninitialized memory might be sent - have you checked that the packets are only sent to the simulator once the first uORB message was received?

@MaEtUgR
Copy link
Member

MaEtUgR commented Dec 28, 2018

The drone for some reson takes off on simulation boot without being armed

No uninitialized memory, this also happens on Linux because arming gets ignored now here:
https://github.com/PX4/Firmware/pull/10648/files#diff-2ce77a8bbb7b5dc57a3e7b1db5dacb18R234
I'm making a pr to fix this. (EDIT: #11112)

I was able to get the whole stepping to freeze

It looks to me (without evidence) like the cause was there before and the symptom was #10693 Now it just stops the whole simulation at this point in time.

@julianoes
Copy link
Contributor Author

I have never seen that behavior with Linux or Windows, that's odd.

@MaEtUgR
Copy link
Member

MaEtUgR commented Jan 3, 2019

@julianoes

I have never seen that behavior with Linux or Windows, that's odd.

It only happened when the current mode was producing setpoints that result in higher than hover thrust. The drone starts in Manual mode and if you had no RC it didn't fly up, if you had RC and the throttle is high it took off and flew away without arming. Fixed now.

@julianoes
Copy link
Contributor Author

Ah!

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

Successfully merging this pull request may close these issues.

New simulator TCP link do not work with Windows Cygwin Toolchain
4 participants