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

Jenkins: add iris optical flow SITL test #11665

Closed
wants to merge 1 commit into from
Closed

Conversation

lamping7
Copy link
Member

@lamping7 lamping7 commented Mar 16, 2019

Initial step to get optical flow into CI.

Do we want to add this to ASan and coverage as well @dagar? The same question goes for MC_avoidance that was just merged in.

@lamping7 lamping7 self-assigned this Mar 16, 2019
@dagar
Copy link
Member

dagar commented Mar 16, 2019

Do we want to add this to ASan and coverage as well @dagar? The same question goes for MC_avoidance that was just merged in.

Yes, I was hoping to find a non-terrible way to keep them in sync (or a single source).

@lamping7
Copy link
Member Author

lamping7 commented Mar 17, 2019

There are a few issues to fix that are known so far:

  1. Jenkins doesn't have the sitl_gazebo lib for optical flow in the package
  2. The current mission test scripts require valid home and global position before starting
  3. Running the attitude control test and the position control test back to back crashes -- [Err] [gazebo_mavlink_interface.cpp:405] bind failed: Address already in use, aborting

If I work around all that, the position control test passes when I run this locally. However, the attitude test fails:

  1. x, y position is reset mid-flight for some unknown reason

Examples:

I think the dropping altitude is unrelated. I haven't checked the mass associated with the sensor.

I see this regarding the x, y local position:

header: 
  seq: 2398
  stamp: 
    secs: 82
    nsecs: 176464035
  frame_id: "map"
pose: 
  position: 
    x: 69.7704467773
    y: 34.4448814392
    z: 120.961540222
  orientation: 
    x: 0.120540329184
    y: -0.245032036052
    z: -0.0309482201273
    w: -0.961494495646
---
header: 
  seq: 2399
  stamp: 
    secs: 82
    nsecs: 208463064
  frame_id: "map"
pose: 
  position: 
    x: -1.48350703954e-14
    y: 2.98627098781e-30
    z: 121.137542725
  orientation: 
    x: 0.120590278468
    y: -0.245054747935
    z: -0.030939959345
    w: -0.961482694528
---

@lamping7 lamping7 force-pushed the pr-jenkins_opt_flow branch from 7ce8c41 to 0f1b530 Compare March 18, 2019 15:22
@lamping7
Copy link
Member Author

lamping7 commented Mar 19, 2019

Getting Jenkins to have access that that optical flow lib broke other stuff with the package. It seems like we'll have to have the lib in two different places. I'm not sure of all the players here. Adding the lib needs to be optional for packages that don't build sitl_gazebo first.

Number two above is fixed so far.

# sitl_gazebo built optical flow plugin
install(
FILES
${PROJECT_SOURCE_DIR}/build/px4_sitl_default/build_gazebo/OpticalFlow/libOpticalFlow.so
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes it in the path for our test

@lamping7 lamping7 force-pushed the pr-jenkins_opt_flow branch 2 times, most recently from 3f34198 to d3d2a5b Compare March 19, 2019 18:32
@lamping7
Copy link
Member Author

Number 1 is fixed.

@lamping7
Copy link
Member Author

Number 3 involves waiting on the solution to PX4/PX4-SITL_gazebo-classic#289.

@lamping7
Copy link
Member Author

lamping7 commented Apr 5, 2019

Because of ports and gzserver not closing quick enough, the make commands that launch multiple tests back-to-back don't work anymore either (tests_mission and tests_offboard). Ideas on a fix here @dagar @julianoes ?

For this test, I could split them out in Jenkins, but that doesn't solve the problem with this test file or the make targets.

@dagar
Copy link
Member

dagar commented Apr 7, 2019

Because of ports and gzserver not closing quick enough, the make commands that launch multiple tests back-to-back don't work anymore either (tests_mission and tests_offboard). Ideas on a fix here @dagar @julianoes ?

For this test, I could split them out in Jenkins, but that doesn't solve the problem with this test file or the make targets.

Do you know if it's gzserver not closing quickly enough or questionable PX4 SITL shutdown/cleanup?

@julianoes
Copy link
Contributor

That's probably related to PX4/PX4-SITL_gazebo-classic#289.

We could try to use SO_REUSEPORT as a workaround to allow binding to already bound port.

@julianoes
Copy link
Contributor

This would still be nice!

@lamping7 lamping7 force-pushed the pr-jenkins_opt_flow branch from 86ef3c3 to c7d23b5 Compare August 12, 2019 15:33
@lamping7
Copy link
Member Author

I just rebased. The Jenkins output looks different. I'll try this again.

@lamping7
Copy link
Member Author

lamping7 commented Aug 12, 2019

So it looks like my 3. above is no longer an issue, but we have that the position control test is no longer passing. Attitude control test still fails. Here are the logs from jenkins:

Attitude: https://logs.px4.io/plot_app?log=739b637d-945a-4e7e-a082-3a9984c21bd5
Position: https://logs.px4.io/plot_app?log=4029b2e6-bf33-48da-9a05-15f1599f0074

I got similar results when running this locally. Full console output can be found at: https://pastebin.com/jmqqg7U8

For the position test, I saw this locally, which doesn't show up in the logged messages in flight review from the Jenkins run:

WARN  [mc_pos_control] Auto activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Altitude-Ctrl activation failed with error: Activation Failed
WARN  [mc_pos_control] Position-Control Setpoint-Update failed
WARN  [mc_pos_control] Position-Control Setpoint-Update failed

@TSC21
Copy link
Member

TSC21 commented Oct 16, 2019

@lamping7 can we reboot this?

@lamping7
Copy link
Member Author

Yes. I can rebase again and compare.

@lamping7
Copy link
Member Author

I rebased just now. I'll check Jenkins in a bit and will edit this.

@stale
Copy link

stale bot commented Jan 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Jan 19, 2020
@lamping7 lamping7 force-pushed the pr-jenkins_opt_flow branch from e198eeb to 77906db Compare January 23, 2020 14:12
@stale stale bot removed the stale label Jan 23, 2020
@stale
Copy link

stale bot commented Apr 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Apr 23, 2020
@LorenzMeier LorenzMeier deleted the pr-jenkins_opt_flow branch January 10, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants