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

Support editing air pressure sensor in the GUI #1171

Merged
merged 23 commits into from
Nov 17, 2021

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Nov 6, 2021

Signed-off-by: Nate Koenig nate@openrobotics.org

🎉 New feature

Summary

Adds support for editing the noise properties of the air pressure sensor in the component inspector.

Requires:

I've made some changes to the component inspector in an attempt to make it more modular, these include:

  1. We have ability to (mostly) encapsulate an inspector element into a set of three files consisting of a .cc, .hh, and .qml. See Added altimeter sensor inspector #1172 for an example of adding a new inspector element.
  2. There is a bit of ugliness where an inspector element has to callout to the componentInspector in order to then call the c++ function. Any help here would be appreciated.
  3. The header for a element can be customized. By default the header name is based on the QML filename.

Test it

  1. ign gazebo -v 4 sensors.sdf
  2. Take note of the output from ign model -m sensors_box -l link -s air_pressure
  3. Select the altimeter sensor in the entity tree.
  4. Make some changes to the values in the component inspector.
  5. Rerun ign model -m sensors_box -l link -s air_pressure and you should see the changes.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • 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

Nate Koenig added 3 commits November 5, 2021 17:44
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@github-actions github-actions bot added 🌱 garden Ignition Garden 🏯 fortress Ignition Fortress labels Nov 6, 2021
@mjcarroll
Copy link
Contributor

There is a bit of ugliness where an inspector element has to callout to the componentInspector in order to then call the c++ function. Any help here would be appreciated.

Here is an attempt at a different implementation that works by overloading the function protoype.

37eade4

Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll mjcarroll added the needs upstream release Blocked by a release of an upstream library label Nov 8, 2021
@nkoenig
Copy link
Contributor Author

nkoenig commented Nov 8, 2021

There is a bit of ugliness where an inspector element has to callout to the componentInspector in order to then call the c++ function. Any help here would be appreciated.

Here is an attempt at a different implementation that works by overloading the function protoype.

37eade4

Thanks, but I think the ugliness is still there. The componentInspector is still required in your approach. I can't figure out ho to call AirPressure::OnAirPressureNoise from AirPressure.qml. I'm only able to call the function from ComponentInspector.qml. Also, @chapulina mentioned in a separate conversation that slots/signals are preferred to function overloading. If it's okay with you, I'll revert this change.

@mjcarroll
Copy link
Contributor

If it's okay with you, I'll revert this change.

I didn't put it on your branch, made a new branch, so should still be good.

@chapulina chapulina added GUI Gazebo's graphical interface (not pure Ignition GUI) sensors Sensors and sensor data labels Nov 8, 2021
Nate Koenig added 2 commits November 8, 2021 10:51
Signed-off-by: Nate Koenig <nate@openrobotics.org>
…nrobotics/ign-gazebo into air_pressure_component_inspector
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.

There is a bit of ugliness where an inspector element has to callout to the componentInspector in order to then call the c++ function. Any help here would be appreciated.

I think I got it, see #1179


I think the new sensor noise is not taking effect. The ign-sensor objects are held at system::AirPressure:

https://github.com/ignitionrobotics/ign-gazebo/blob/ee8c3fd6e1a2cef3d999370033b9484b9d537f53/src/systems/air_pressure/AirPressure.cc#L53-L54

I checked it by plotting the sensor's readings and setting very high noise.

We should propagate the changes to the sensor there. The pattern we've been using is to create a service on UserCommands, which sets a component called XXXCmd, that's processed by the responsible system, in this case system::AirPressure. See an example in #536

src/gui/plugins/component_inspector/ComponentInspector.cc Outdated Show resolved Hide resolved
src/gui/plugins/component_inspector/AirPressure.qml Outdated Show resolved Hide resolved
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Nov 9, 2021

There is a bit of ugliness where an inspector element has to callout to the componentInspector in order to then call the c++ function. Any help here would be appreciated.

I think I got it, see #1179

Thanks!

I think the new sensor noise is not taking effect. The ign-sensor objects are held at system::AirPressure:

https://github.com/ignitionrobotics/ign-gazebo/blob/ee8c3fd6e1a2cef3d999370033b9484b9d537f53/src/systems/air_pressure/AirPressure.cc#L53-L54

I checked it by plotting the sensor's readings and setting very high noise.

We should propagate the changes to the sensor there. The pattern we've been using is to create a service on UserCommands, which sets a component called XXXCmd, that's processed by the responsible system, in this case system::AirPressure. See an example in #536

Yeah, the noise values will not take effect until: #1170. You should see the changes in the ECM, just not in simulation output. I'm trying not to utilize additional services via the UserCommands pattern.

Nate Koenig added 3 commits November 9, 2021 10:43
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>
@chapulina
Copy link
Contributor

Yeah, the noise values will not take effect until: #1170. You should see the changes in the ECM, just not in simulation output. I'm trying not to utilize additional services via the UserCommands pattern.

I see, so is the idea that the component inspector will add the Recreate component to the parent model whenever the user edits a value? Is that going to happen only while paused or also while playing?

I understand that the *Cmd pattern involves a lot of boilerplate and bloats the list of services, but that's efficient and works at runtime. Recreating the model just to edit a few sensor properties will be extremely inefficient if we do it every time the user clicks the spin arrows. For this particular use case, I think that a single components::SensorCmd and a ~/sensor_config service that handles all sensor modifications.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Nov 10, 2021

Yeah, the noise values will not take effect until: #1170. You should see the changes in the ECM, just not in simulation output. I'm trying not to utilize additional services via the UserCommands pattern.

I see, so is the idea that the component inspector will add the Recreate component to the parent model whenever the user edits a value? Is that going to happen only while paused or also while playing?

Yes , that's correct.

I understand that the *Cmd pattern involves a lot of boilerplate and bloats the list of services, but that's efficient and works at runtime.

We are currently only trying to get parameters editable by the GUI between play/pause. The service pattern would become quite large when we add in all the sensors and joints, and we don't want users to edit these parameters while simulation running (at least for right now). The ECM sync is a more efficient way to handle all of the parameter updating that we want to do via the GUI at the moment, and has a better user experience (see below). In the long run it would be nice to add in the concept of parameters, similar to ROS parameters.

Recreating the model just to edit a few sensor properties will be extremely inefficient if we do it every time the user clicks the spin arrows. For this particular use case, I think that a single components::SensorCmd and a ~/sensor_config service that handles all sensor modifications.

The ECM is only created/synced when a sensor is added or modified. Unless a user is making a change every step, then they shouldn't notice. An asynchronous service approach adds complexity and noticeable delays. For example, the pose update still uses the service method, and I see the following behavior:

  1. Translate a model in the GUI.
  2. The model bounces back to it's original position.
  3. Server gets the new pose and sends back the new correct pose.
  4. The model bounce to the location I set in step 1.

This is the type of user experience that I'd like to avoid.

@chapulina
Copy link
Contributor

chapulina commented Nov 10, 2021

we don't want users to edit these parameters while simulation running

Got it. I think this PR is missing the concept of a read-only mode for the new widgets then, so the user doesn't edit the sensor while playing by mistake.

The ECM sync is a more efficient way to handle all of the parameter updating that we want to do via the GUI at the moment

I can see how that's efficient if lots of changes are queued while paused and only handled on play. This important detail is missing from this PR though.

An asynchronous service approach adds complexity and noticeable delays

Yeah it would be nice to avoid the delay. But I'm not sure how the proposed approach can avoid the asynchronous requests while unpaused since it still requires a round-trip to the server.

@codecov
Copy link

codecov bot commented Nov 10, 2021

Codecov Report

Merging #1171 (26102a4) into model_editor (ba9403b) will decrease coverage by 0.20%.
The diff coverage is 16.32%.

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

@@               Coverage Diff                @@
##           model_editor    #1171      +/-   ##
================================================
- Coverage         61.34%   61.14%   -0.21%     
================================================
  Files               262      264       +2     
  Lines             20931    21025      +94     
================================================
+ Hits              12841    12855      +14     
- Misses             8090     8170      +80     
Impacted Files Coverage Δ
src/cmd/ModelCommandAPI.cc 0.00% <0.00%> (ø)
.../plugins/component_inspector/ComponentInspector.hh 28.57% <ø> (ø)
src/gui/plugins/component_inspector/Types.cc 0.00% <0.00%> (ø)
src/gui/plugins/component_inspector/AirPressure.cc 12.00% <12.00%> (ø)
.../plugins/component_inspector/ComponentInspector.cc 5.74% <13.63%> (+0.53%) ⬆️
src/systems/scene_broadcaster/SceneBroadcaster.cc 93.82% <100.00%> (+0.07%) ⬆️

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 ba9403b...f18db6c. Read the comment docs.

@nkoenig
Copy link
Contributor Author

nkoenig commented Nov 10, 2021

Got it. I think this PR is missing the concept of a read-only mode for the new widgets then, so the user doesn't edit the sensor while playing by mistake.

Yup, that is correct.

The ECM sync is a more efficient way to handle all of the parameter updating that we want to do via the GUI at the moment

I can see how that's efficient if lots of changes are queued while paused and only handled on play. This important detail is missing from this PR though.

I don't follow, what detail are you referring to?

An asynchronous service approach adds complexity and noticeable delays

Yeah it would be nice to avoid the delay. But I'm not sure how the proposed approach can avoid the asynchronous requests while unpaused since it still requires a round-trip to the server.

The problem is avoided because the GUI ECM has the most up-to-date ECM state, which is then sent to the server when the play button is pressed. The GUI registers the state change from pause to play when the server sends out a a new state message. The couple ECM from the server is the same as the ECM on the GUI. There is no visible jump.

@nkoenig nkoenig changed the base branch from ign-gazebo6 to model_editor November 10, 2021 19:24
@nkoenig
Copy link
Contributor Author

nkoenig commented Nov 10, 2021

Retargeting to the model_editor branch.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Nov 10, 2021

Added in a simulation state aware spin box that enables/disables based on the play/pause state of simulation.

Nate Koenig added 2 commits November 10, 2021 15:37
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig removed the needs upstream release Blocked by a release of an upstream library label Nov 11, 2021
@chapulina chapulina added editor Tools to edit entities in simulation and removed 🌱 garden Ignition Garden labels Nov 16, 2021
@nkoenig nkoenig requested a review from iche033 November 17, 2021 00:42
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

did some quick tests changing the air pressure values and it's working for me as advertised. Just one minor comment

src/systems/scene_broadcaster/SceneBroadcaster.cc Outdated Show resolved Hide resolved
Nate Koenig added 3 commits November 17, 2021 09:01
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig merged commit 9d4cd24 into model_editor Nov 17, 2021
@nkoenig nkoenig deleted the air_pressure_component_inspector branch November 17, 2021 19:05
@nkoenig nkoenig mentioned this pull request Dec 3, 2021
8 tasks
nkoenig added a commit that referenced this pull request Dec 10, 2021
* Model editor: Add links to model (#1165)

* add an add entity button to component inspector. Currently only enabled for models

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* add model editor gui plugin that inserts visuals to the scene in the render thread

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* write to ECM

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* support adding light links

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* notify other GUI plugins of added/removed entities via GUI events

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* use const ref for constructor input params

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* guarantee 64 bit entity IDs with gazebo::Entity instead of unsigned int

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* testing makr as new entity  func

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* rm printouts

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* register type

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* refactor render util

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* workaround for avoiding crash on exit

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* refactor, comment out unused menu items

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove commented out code, add CreateLight function

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* add model editor src files

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove more commented out code

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* use entity instead of entity name (#1176)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Add link menu updates (#1177)

* use entity instead of entity name

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update link add menu

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Ian Chen <ichen@osrfoundation.org>

* fix adding ellipsoid

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* merge model_editor into component_inspector

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* fixing warnings

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Adjust tool tips

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* fix adding light

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fixed documentation

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Ashton Larkin <ashton@openrobotics.org>
Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com>

* Support recreating model entities (#1170)

* add recreate component and implement recreate entities functionality, add test

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* update test and make recreate entities with same name work

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* revert add include

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* style

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* check recreate comp in ancestor

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Revert sdf version requirement

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* revert my bad merge

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* remvoe sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Together (#1187)

* add an add entity button to component inspector. Currently only enabled for models

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* add model editor gui plugin that inserts visuals to the scene in the render thread

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* write to ECM

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* support adding light links

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* notify other GUI plugins of added/removed entities via GUI events

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* use const ref for constructor input params

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* guarantee 64 bit entity IDs with gazebo::Entity instead of unsigned int

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* testing makr as new entity  func

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* rm printouts

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* register type

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* refactor render util

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* workaround for avoiding crash on exit

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* refactor, comment out unused menu items

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove commented out code, add CreateLight function

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* add model editor src files

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove more commented out code

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* use entity instead of entity name (#1176)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Add link menu updates (#1177)

* use entity instead of entity name

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update link add menu

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Ian Chen <ichen@osrfoundation.org>

* fix adding ellipsoid

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* merge model_editor into component_inspector

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* fixing warnings

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Adjust tool tips

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* fix adding light

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fixed documentation

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Working on model creation

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added debug statements

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* use each no cache

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* fix removing component from view

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Fix physics

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Ashton Larkin <ashton@openrobotics.org>
Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* update cameras list on sensor removal

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* update cameras list on sensor removal

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Require sensors 6.1

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* sensors 6.0.1

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Test model recreation with jointed models

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Fix multiple joints with same names

There was an issue in searching for joint parent_link and child_link frames
if there was another model with the same frame names.

This will correctly search for frame entity ids that are children of the
same model.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Recreate entities joints (#1206)

* Test model recreation with jointed models
* Fix multiple joints with same names

There was an issue in searching for joint parent_link and child_link frames
if there was another model with the same frame names.

This will correctly search for frame entity ids that are children of the
same model.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Fix the ecm test, which had bad parent-child relationships between links and joints

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added test for world joints

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com>
Co-authored-by: Ashton Larkin <ashton@openrobotics.org>

* Support editing air pressure sensor in the GUI (#1171)

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* missign width

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added simulation state aware spin box

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove console output

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added state awareness to add entity button

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove extra variable

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Added altimeter sensor inspector (#1172)

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added altimeter sensor inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* missign width

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added simulation state aware spin box

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove console output

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Documentation

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Added magnetometer inspector (#1173)

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added altimeter sensor inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added magnetometer inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* missign width

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added simulation state aware spin box

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove console output

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Cleanup build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Missing print call

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Add IMU component inspector (#1191)

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added altimeter sensor inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added magnetometer inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* missign width

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added simulation state aware spin box

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove console output

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add IMU component inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Cleanup build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Missing print call

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix all codecheck issues

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Added lidar component inspector (#1203)

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added altimeter sensor inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added magnetometer inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* missign width

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added simulation state aware spin box

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove console output

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add IMU component inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added lidar component inspector

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Model Editor: Add Joints to model (#1196)

* Model Editor: Add Joints to model

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Style and documentation

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Suppress physics warnings on newly-created joints

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Added a header

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Allow user to modify joint type (#1198)

* Support editing air pressure sensor in the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add noise to qrc

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update sensor icon

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Move AirPressure functions out of ComponentInspector (#1179)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Fix get decimals, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* cleanup and simplification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Require sdf 12.1.0

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* missign width

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added simulation state aware spin box

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove console output

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Allow user to modify joint type

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Updated to use a separate class, and consolidate the look

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added recreate to joint add

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Add sensors to a link via the GUI (#1188)

* add an add entity button to component inspector. Currently only enabled for models

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* add model editor gui plugin that inserts visuals to the scene in the render thread

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* write to ECM

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* get updated GUI ECM info in world control CB

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* support adding light links

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* working on adding tests

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* remove TODO note, issue fixed by #1131

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* notify other GUI plugins of added/removed entities via GUI events

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* use const ref for constructor input params

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* guarantee 64 bit entity IDs with gazebo::Entity instead of unsigned int

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* testing makr as new entity  func

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* rm printouts

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* register type

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* refactor render util

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* apply GUI ECM's diff to server ECM at end of pause interval

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* use gui event to update server

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* Working on sensor addition and editing

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* handle step and support original control service

Signed-off-by: Ashton Larkin <ashton@openrobotics.org>

* Reduced code duplication

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Set gazebo's default to use the event based system

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Testing things out

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* workaround for avoiding crash on exit

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* refactor, comment out unused menu items

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove commented out code, add CreateLight function

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* add model editor src files

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove more commented out code

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Fix build

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* use entity instead of entity name

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update link add menu

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added back in sensor menu

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* use entity instead of entity name (#1176)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Adding sensors

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Add link menu updates (#1177)

* use entity instead of entity name

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update link add menu

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Ian Chen <ichen@osrfoundation.org>

* fix adding ellipsoid

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* merge model_editor into component_inspector

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* fixing warnings

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Adjust tool tips

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* updates

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Adding lidar menu

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Comment out sensors not supported

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added segmentation camera

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* fix id

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix submenue

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Remove lidar menu, and address comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Merged

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Ashton Larkin <ashton@openrobotics.org>
Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Support setting pose on links, visuals, collision via the GUI (#1230)

* Working on pose modification

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Support setting pose on links, visuals, collision via the GUI

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix test

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* alphabetize

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Pimplize a class and added units, and 'joint'

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* remove laser

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added extra note

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Addressing comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Allow models to transform

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* remove console log

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* rename componentinspector in qml

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update based on comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Don't publish ECM changes when paused

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Apply patch

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix joint type dropdown

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Joint type spacing

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix codecheck

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* editor changes

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Recereate on sensors

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Don't allow world as child link

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix scene broadcaster test, and add another modelcommandapi test

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added model command api gpu lidar test

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* use MAX_VALUE

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added units to model command

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix tests

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Added ProcessNewWorldControlState test

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update test/worlds/gpu_lidar.sdf

Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Removed comments and plugins

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Update comments

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Ashton Larkin <ashton@openrobotics.org>
Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Tools to edit entities in simulation 🏯 fortress Ignition Fortress GUI Gazebo's graphical interface (not pure Ignition GUI) sensors Sensors and sensor data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants