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

Add system to an entity through Component Inspector #1549

Merged
merged 58 commits into from
Aug 3, 2022

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jun 22, 2022

🎉 New feature

depends on #1524

Summary

Adds a tool button to the Component Inspector for adding Systems to a model. When the button is clicked, a dialog pops up and lets you fill the name, filename, and innerxml fields of the System / plugin. Once confirmed, it invokes a service call introduced in #1524 that adds the System to the selected model entity.

Test it

  1. launch the diff_drive_no_plugin test world:

    ign gazebo -v 4 ./src/ign-gazebo/test/worlds/diff_drive_no_plugin.sdf
    
  2. Click on the vehicle model - The Component Inspector should now show properties of the vehicle model

  3. Click the + button in the toolbar in the Component Inspector - A dialog should pop out

  4. Fill the name field with:

    ignition::gazebo::systems::DiffDrive
    
  5. Fill the filename field with:

    ignition-gazebo-diff-drive-system
    
  6. Fill the innerxml field with:

        <left_joint>left_wheel_joint</left_joint>
        <right_joint>right_wheel_joint</right_joint>
        <wheel_separation>1.25</wheel_separation>
        <wheel_radius>0.3</wheel_radius>
        <max_linear_acceleration>1</max_linear_acceleration>
        <min_linear_acceleration>-1</min_linear_acceleration>
        <max_angular_acceleration>2</max_angular_acceleration>
        <min_angular_acceleration>-2</min_angular_acceleration>
        <max_linear_velocity>0.5</max_linear_velocity>
        <min_linear_velocity>-0.5</min_linear_velocity>
        <max_angular_velocity>1</max_angular_velocity>
        <min_angular_velocity>-1</min_angular_velocity>    
    
  7. Click Ok to add the System to the model - You should see the + System Plugin Info appear in the Component Inspector to indicate that the model now has a System.

  8. Hit Play - The plugin should be running and read to accept vel commands

  9. Publish a message to move the vehicle:

    ign topic -t "/model/vehicle/cmd_vel" -m ignition.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}"
    

add_system_gui

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • 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 and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Nate Koenig and others added 30 commits February 10, 2022 20:59
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
@chapulina chapulina added OOBE 📦✨ Out-of-box experience GUI Gazebo's graphical interface (not pure Ignition GUI) 🏯 fortress Ignition Fortress labels Jun 22, 2022
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.

Nice! It works for me! I just have some minor comments.

Signed-off-by: Ian Chen <[email protected]>
Base automatically changed from entity_system_add to ign-gazebo6 June 23, 2022 23:03
@chapulina chapulina changed the title Add system to a model through Component Inspector Add system to an entity through Component Inspector Jun 23, 2022
@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #1549 (f14b79c) into ign-gazebo6 (d6e69d0) will increase coverage by 0.03%.
The diff coverage is 54.81%.

@@               Coverage Diff               @@
##           ign-gazebo6    #1549      +/-   ##
===============================================
+ Coverage        64.02%   64.05%   +0.03%     
===============================================
  Files              317      317              
  Lines            25649    25788     +139     
===============================================
+ Hits             16422    16519      +97     
- Misses            9227     9269      +42     
Impacted Files Coverage Δ
include/ignition/gazebo/SystemLoader.hh 100.00% <ø> (ø)
src/ServerConfig.cc 90.69% <ø> (ø)
.../plugins/component_inspector/ComponentInspector.hh 28.57% <ø> (ø)
...rc/systems/ackermann_steering/AckermannSteering.hh 100.00% <ø> (ø)
src/systems/diff_drive/DiffDrive.hh 100.00% <ø> (ø)
.../plugins/component_inspector/ComponentInspector.cc 5.07% <2.77%> (-0.26%) ⬇️
...rc/systems/ackermann_steering/AckermannSteering.cc 85.67% <76.47%> (-0.50%) ⬇️
src/SystemLoader.cc 67.46% <94.11%> (+3.95%) ⬆️
src/EntityComponentManager.cc 89.35% <100.00%> (-0.01%) ⬇️
src/SystemManager.cc 97.63% <100.00%> (+0.55%) ⬆️
... and 4 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 417609c...f14b79c. 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.

LGTM so far, but let's not merge it until we have a dropdown to choose the plugin.

@chapulina chapulina added the enhancement New feature or request label Jul 23, 2022
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.

Just pending #1581

chapulina and others added 2 commits July 28, 2022 14:43
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
@chapulina chapulina merged commit aef3020 into ign-gazebo6 Aug 3, 2022
@chapulina chapulina deleted the entity_system_add_gui branch August 3, 2022 03:30
@iche033 iche033 mentioned this pull request Sep 1, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress GUI Gazebo's graphical interface (not pure Ignition GUI) OOBE 📦✨ Out-of-box experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants