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

[ros2] Add noise to imu test #801

Merged
merged 3 commits into from
Aug 20, 2018
Merged

[ros2] Add noise to imu test #801

merged 3 commits into from
Aug 20, 2018

Conversation

chapulina
Copy link
Contributor

See #799

It turns out that the noise is being loaded correctly, it was a local issue

Let's double-check when CI is done:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@chapulina chapulina requested a review from dhood August 18, 2018 01:36
@dhood
Copy link
Collaborator

dhood commented Aug 20, 2018

@chapulina I didn't understand what the CI was supposed to show. Is there maybe a way to get it to test gazebo_ros_pkgs somehow? (doesn't look like it did in those builds)

@chapulina
Copy link
Contributor Author

Sorry, I don't know why I expected the links to ci.ros2.org to include gazebo_ros_pkgs. The result from build.ros2.org should be the correct one and its output doesn't have the errors reported on #799:

18:48:35 8: [ RUN      ] GazeboRosImuSensorTest.ImuMessageCorrect
18:48:35 8: �[1;32m[Msg] �[0m�[1;32mWaiting for master.�[0m�[1;32m
18:48:35 8: �[0m�[1;32m�[0m�[1;32m[Msg] �[0m�[1;32mConnected to gazebo master @ �[0m�[1;32mhttp://127.0.0.1:11345�[0m�[1;32m
18:48:35 8: �[0m�[1;32m�[0m�[1;32m[Msg] �[0m�[1;32mPublicized address: �[0m�[1;32m172.17.0.2�[0m�[1;32m
18:48:35 8: �[0m�[1;32m�[0m�[1;31m[Err] [RenderEngine.cc:725] �[0m�[1;31mCan't open display: �[0m�[1;31m�[0m�[1;31m
18:48:35 8: �[0m�[1;33m[Wrn] [RenderEngine.cc:93] �[0m�[1;33mUnable to create X window. Rendering will be disabled
18:48:35 8: �[0m�[1;33m[Wrn] [RenderEngine.cc:293] �[0m�[1;33mCannot initialize render engine since �[0m�[1;33mrender path type is NONE. Ignore this warning if�[0m�[1;33mrendering has been turned off on purpose.
18:48:35 8: �[0mALSA lib confmisc.c:767:(parse_card) cannot find card '0'
18:48:35 8: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
18:48:35 8: ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
18:48:35 8: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
18:48:35 8: ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
18:48:35 8: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
18:48:35 8: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
18:48:35 8: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
18:48:35 8: AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
18:48:35 8: �[1;31m[Err] [OpenAL.cc:84] �[0m�[1;31mUnable to open audio device[�[0m�[1;31mdefault�[0m�[1;31m]
18:48:35 8:  Audio will be disabled.
18:48:35 8: �[0m�[1;36m[Dbg] [ServerFixture.cc:209] �[0m�[1;36mServerFixture load in �[0m�[1;36m0.3�[0m�[1;36m seconds, timeout after �[0m�[1;36m600�[0m�[1;36m seconds
18:48:35 8: �[0m�[1;36m[Dbg] [ServerFixture.cc:135] �[0m�[1;36mServerFixture::Unload�[0m�[1;36m
18:48:35 8: �[0m�[1;36m�[0m[       OK ] GazeboRosImuSensorTest.ImuMessageCorrect (789 ms)
18:48:35 8: [----------] 1 test from GazeboRosImuSensorTest (789 ms total)
18:48:35 8: 
18:48:35 8: [----------] Global test environment tear-down
18:48:35 8: [==========] 1 test from 1 test case ran. (789 ms total)
18:48:35 8: [  PASSED  ] 1 test.

@dhood
Copy link
Collaborator

dhood commented Aug 20, 2018

OK no worries.

Confirming that the test used to output errors when not using this change. CI from when https://github.com/ros-simulation/gazebo_ros_pkgs/pull/793/files#diff-d966e67ca1b4db645730d08da8e16054 was merged:

http://build.ros2.org/job/Bpr__gazebo_ros_pkgs__ubuntu_bionic_amd64/31/consoleFull

14:12:47 8: [ RUN      ] GazeboRosImuSensorTest.ImuMessageCorrect
14:12:47 8: �[1;32m[Msg] �[0m�[1;32mWaiting for master.�[0m�[1;32m
14:12:47 8: �[0m�[1;32m�[0m�[1;32m[Msg] �[0m�[1;32mConnected to gazebo master @ �[0m�[1;32mhttp://127.0.0.1:11345�[0m�[1;32m
14:12:47 8: �[0m�[1;32m�[0m�[1;32m[Msg] �[0m�[1;32mPublicized address: �[0m�[1;32m172.17.0.2�[0m�[1;32m
14:12:47 8: �[0m�[1;32m�[0m�[1;31m[Err] [RenderEngine.cc:725] �[0m�[1;31mCan't open display: �[0m�[1;31m�[0m�[1;31m
14:12:47 8: �[0m�[1;33m[Wrn] [RenderEngine.cc:93] �[0m�[1;33mUnable to create X window. Rendering will be disabled
14:12:47 8: �[0m�[1;33m[Wrn] [RenderEngine.cc:293] �[0m�[1;33mCannot initialize render engine since �[0m�[1;33mrender path type is NONE. Ignore this warning if�[0m�[1;33mrendering has been turned off on purpose.
14:12:47 8: �[0mALSA lib confmisc.c:767:(parse_card) cannot find card '0'
14:12:47 8: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
14:12:47 8: ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
14:12:47 8: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
14:12:47 8: ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
14:12:47 8: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
14:12:47 8: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
14:12:47 8: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
14:12:47 8: AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
14:12:47 8: �[1;31m[Err] [OpenAL.cc:84] �[0m�[1;31mUnable to open audio device[�[0m�[1;31mdefault�[0m�[1;31m]
14:12:47 8:  Audio will be disabled.
14:12:47 8: �[0m�[1;31m[Err] [Sensor.cc:454] �[0m�[1;31mGet noise index not valid�[0m�[1;31m
14:12:47 8: �[0m�[1;31m�[0m�[1;31m[Err] [Sensor.cc:454] �[0m�[1;31mGet noise index not valid�[0m�[1;31m
14:12:47 8: �[0m�[1;31m�[0m�[1;31m[Err] [Sensor.cc:454] �[0m�[1;31mGet noise index not valid�[0m�[1;31m
14:12:47 8: �[0m�[1;31m�[0m�[1;31m[Err] [Sensor.cc:454] �[0m�[1;31mGet noise index not valid�[0m�[1;31m
14:12:47 8: �[0m�[1;31m�[0m�[1;31m[Err] [Sensor.cc:454] �[0m�[1;31mGet noise index not valid�[0m�[1;31m
14:12:47 8: �[0m�[1;31m�[0m�[1;31m[Err] [Sensor.cc:454] �[0m�[1;31mGet noise index not valid�[0m�[1;31m
14:12:48 8: �[0m�[1;31m�[0m�[1;36m[Dbg] [ServerFixture.cc:209] �[0m�[1;36mServerFixture load in �[0m�[1;36m0.3�[0m�[1;36m seconds, timeout after �[0m�[1;36m600�[0m�[1;36m seconds
14:12:48 8: �[0m�[1;36m[Dbg] [ServerFixture.cc:135] �[0m�[1;36mServerFixture::Unload�[0m�[1;36m
14:12:48 8: �[0m�[1;36m�[0m[       OK ] GazeboRosImuSensorTest.ImuMessageCorrect (789 ms)
14:12:48 8: [----------] 1 test from GazeboRosImuSensorTest (789 ms total)

However, I'd imagine this will make the test flaky because it was written assuming no noise. I'll relax the tolerance

@dhood
Copy link
Collaborator

dhood commented Aug 20, 2018

I simplified the noise and relaxed the tolerance, so this passes when repeated now. (e.g. with colcon test --event-handlers console_direct+ --packages-select gazebo_plugins --retest-until-fail 100 --ctest-args -R imu)

@chapulina
Copy link
Contributor Author

Thanks for the tweaks, @dhood !

@chapulina chapulina merged commit 0d367ed into ros2 Aug 20, 2018
@chapulina chapulina deleted the ros2-imu-noise-test branch October 13, 2020 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants