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

Port: 7 to main #2103

Merged
merged 34 commits into from
Aug 31, 2023
Merged

Port: 7 to main #2103

merged 34 commits into from
Aug 31, 2023

Conversation

mjcarroll
Copy link
Contributor

➡️ Forward port

Port gz-sim7 to main

Branch comparison: main...gz-sim7

Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

azeey and others added 30 commits May 2, 2023 23:14
…usly (#1962)

The main reason that the Resource Spawner took a long time to load is that it tried to fetch the list of all available models on Fuel instead of just the selected owner. And it did that while blocking the Qt thread, so the user was unable to interact with the GUI while the model list was being fetched. The approach I've taken is to only fetch the list of models for the default owner ("openrobotics") and allow users to add/remove any owner they want. The fetching is also done in a separate thread so as to not block the GUI.
---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
* Include gz/msgs.hh instead of ignition
* Install components.hh to gz/sim

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
…ts on a topic (#1994)

* Working on marker topic

Signed-off-by: Nate Koenig <natekoenig@gmail.com>

* Fixed build

Signed-off-by: Nate Koenig <natekoenig@gmail.com>

* Fixed test

Signed-off-by: Nate Koenig <natekoenig@gmail.com>

* Cleanup

Signed-off-by: Nate Koenig <natekoenig@gmail.com>

* codecheck

Signed-off-by: Nate Koenig <natekoenig@gmail.com>

---------

Signed-off-by: Nate Koenig <natekoenig@gmail.com>
Extending the feature for detachable_joint plugin to support re-attaching the joint again. By publishing to a topic, the child link can be easily reattached with a fixed joint to its parent link. 

Signed-off-by: Liam Han <liam@openrobotics.org>
Signed-off-by: Liam Han <liamhan0905@gmail.com>
Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
…in a `<world>` (#1998)

Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
Signed-off-by: Crola1702 <cristobal.arroyo@ekumenlabs.com>
…2006)

Signed-off-by: Silvio Traversaro <silvio@traversaro.it>

* TriggeredPublisher: don't catch FatalException
  It has been removed from recent versions of protobuf.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Merge ign-gazebo3 ➡️  ign-gazebo6
…2006)

Signed-off-by: Silvio Traversaro <silvio@traversaro.it>

* TriggeredPublisher: don't catch FatalException
  It has been removed from recent versions of protobuf.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
…fore `Finalize` (#2047)

* Adds a warning if the `Server` method of a `TestFixture` is called
before `Finalize

This commit adds a warning if someone were to call `Server()` before
`Finalize`. The rationale for this is because I made the mistake of not
calling `Finalize` ina program I was writing. It took me some time to
track down the root cause of the problem. I figure if we warn users it
should be immediately obvious.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* switch to gzwarn over ignwarn

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* ignwarn cause citadel :(

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

---------

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
#2052)

This fixes errors such as
```
Error [Utils.cc:174] Missing element description for [persistent]
```

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
* Fix Joint Position Controller Behaviour Described in #1997 

There are several issues at play. First the target velcity calculation
was wrong as described in #1997. Secondly, even if we corrected that
there was still incorrect behaviour. This is due to the fact that we use
the PID's CmdMax to determine what the maximum velocity for the joint
is. However, in the event a user does not set a `<cmd_max>` this
defaults to zero and the joint does not move. Finally this PR updates
the tests. Previously our tests were only testing the case where the
position command was well above the position's maximum velocity, hence
it would slide into position. This PR introduces a test where we snap
the position of the joint into place instead.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Address PR feedback with regards to style.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Just one more thing

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* style

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* More minor style fixes

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* More minor style fixes

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Tracks periodic changes in scene broadcaster (#2010)

* Tracks periodic changes in scene broadcaster

This commit proposes a change to the scene broadcaster which enables
tracking of all components with periodic changes. This way if a
component has a periodic change the scene broadcaster does not miss it.

For more info see this discussion #2001 (comment) where @azeey proposes this solution.

This commit is WIP and I still need to handle entity/component removal
and add tests.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Rework changes

* Removes clone made of BaseComponent.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* More reworks of added APIs to ECM.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Fix tests

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Add ECM related tests.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Address spelling issue

Co-authored-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>

* Get rid of TODO

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

---------

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>
Co-authored-by: Michael Carroll <mjcarroll@intrinsic.ai>

* Migrate to new header.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Update test paths

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Update include/gz/sim/EntityComponentManager.hh

Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>

* Rename methods

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* style

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Flipped data structure around

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

* Fix GCC warning

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>

---------

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>
Co-authored-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Merge ign-gazebo3 ➡️  ign-gazebo6
Merge ign-gazebo3 ➡️  ign-gazebo6
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
This fixes the error

[Err] [Conversions.cc:1791] Tried to convert SDF [world] into [plugin]

The error comes from AddSystem passing an sdf::ElementPtr that corresponds to a <world> tag instead of a <plugin> tag when it's optional _sdf element is empty, which occurs mostly in tests when AddSystem is used to add Relay plugin which doesn't have an associated SDFormat file.


---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Adds support for specifying the offset of the force application point through the GUI in the ApplyForceTorque plugin. This offset is also reflected in the visualization of the force vector.

Also adds fields for the magnitude of the force and torque vectors on the interface. Changing the components of a vector automatically updates the value of its magnitude, while changing the vector's magnitude automatically scales its components, maintaining its direction.

---------

Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Merge ign-gazebo6 ➡️  gz-sim7
Henrique-BO and others added 2 commits August 29, 2023 12:46
Adds tutorials for the new ApplyForceTorque plugin (including the features added in #2051 and #2056) and for the new MouseDrag plugin.
---------

Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
This PR adds odometry output to the track controller system, publishing position and instantaneous velocity. That way a conveyor with an encoder and/or resolver for respectively position and velocity feedback can be simulated.

The default topic is /model/<model name>/link/<link name>/odometry.
An alternative can be chosen by specifying the odometry_topic parameter of the plugin in the SDF.
The publication frequency is set through parameter odometry_publish_frequency.
---------

Signed-off-by: Johan Rutgeerts <johan.rutgeerts@lancewood.eu>
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Aug 31, 2023
@mjcarroll mjcarroll mentioned this pull request Aug 31, 2023
9 tasks
@mjcarroll mjcarroll changed the title Port/7 to main Port: 7 to main Aug 31, 2023
@azeey azeey added the beta Targeting beta release of upcoming collection label Aug 31, 2023
src/Server.cc Outdated
@@ -160,6 +160,14 @@ Server::Server(const ServerConfig &_config)
return;
}

if (this->dataPtr->sdfRoot.WorldCount() == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, this shouldn't have made it in gz-sim7 since it's now possible to load a model file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will go ahead and add a PR to fix that so we don't lose it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I cherry-picked it in here and squashed it down into the merge commit.

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@mjcarroll mjcarroll marked this pull request as ready for review August 31, 2023 03:29
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@iche033 iche033 merged commit 8e7f612 into main Aug 31, 2023
@iche033 iche033 deleted the port/7_to_main branch August 31, 2023 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.