Skip to content

Add system to an entity through Component Inspector#1549

Merged
chapulina merged 58 commits intoign-gazebo6from
entity_system_add_gui
Aug 3, 2022
Merged

Add system to an entity through Component Inspector#1549
chapulina merged 58 commits intoign-gazebo6from
entity_system_add_gui

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 <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
iche033 added 2 commits June 16, 2022 13:53
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 requested a review from chapulina as a code owner June 22, 2022 01:51
@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 <ichen@osrfoundation.org>
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
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@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.

iche033 added 2 commits June 24, 2022 17:42
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
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: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
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.

6 participants