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

Fixed IMU system plugin #1043

Merged
merged 6 commits into from
Oct 12, 2021
Merged

Fixed IMU system plugin #1043

merged 6 commits into from
Oct 12, 2021

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Sep 22, 2021

Signed-off-by: ahcorde [email protected]

🦟 Bug fix

While I was developing ign_ros2_control I found an issue which is related with adding new model, for example, using ign_ros to add a URDF.

The IMU system plugin is added after the IMU is in the scene which means _ecm.EachNew is was called and IMU will be added to the plugin. To fix this I used a similar approach that you can find in RenderUtils.cc

For this reason I used _ecm.Each in the first iteration and then we should stick with the current behaviour.

I think this should be extended to the other sensor plugins.

Summary

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

@ahcorde ahcorde self-assigned this Sep 22, 2021
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Sep 22, 2021
@chapulina chapulina added the bug Something isn't working label Sep 22, 2021
@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #1043 (c976830) into ign-gazebo3 (d9195c4) will increase coverage by 0.27%.
The diff coverage is 78.03%.

❗ Current head c976830 differs from pull request most recent head dc0547b. Consider uploading reports for the commit dc0547b to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           ign-gazebo3    #1043      +/-   ##
===============================================
+ Coverage        77.56%   77.83%   +0.27%     
===============================================
  Files              208      221      +13     
  Lines            11385    12694    +1309     
===============================================
+ Hits              8831     9881    +1050     
- Misses            2554     2813     +259     
Impacted Files Coverage Δ
include/ignition/gazebo/EntityComponentManager.hh 100.00% <ø> (ø)
include/ignition/gazebo/Link.hh 100.00% <ø> (ø)
include/ignition/gazebo/Server.hh 100.00% <ø> (ø)
...nclude/ignition/gazebo/components/ContactSensor.hh 100.00% <ø> (ø)
include/ignition/gazebo/components/Factory.hh 96.05% <ø> (ø)
...nclude/ignition/gazebo/components/LogicalCamera.hh 100.00% <ø> (ø)
include/ignition/gazebo/components/Sensor.hh 100.00% <ø> (ø)
...nclude/ignition/gazebo/components/Serialization.hh 90.32% <ø> (ø)
include/ignition/gazebo/gui/GuiSystem.hh 0.00% <0.00%> (ø)
.../plugins/component_inspector/ComponentInspector.cc 8.58% <0.00%> (-0.90%) ⬇️
... and 111 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bed3a93...dc0547b. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

I like the approach. In general, we may need to do this for most systems, especially when we make it easier for users to insert systems at runtime (#190)

src/systems/imu/Imu.cc Outdated Show resolved Hide resolved
@chapulina chapulina mentioned this pull request Oct 11, 2021
7 tasks
@chapulina chapulina merged commit e9be884 into ign-gazebo3 Oct 12, 2021
@chapulina chapulina deleted the ahcorde/fix/sensors branch October 12, 2021 17:31
@ahcorde ahcorde mentioned this pull request Oct 13, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏰 citadel Ignition Citadel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants