-
Notifications
You must be signed in to change notification settings - Fork 103
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
Change the SDF spec to make <plugin> less gazebo-specific #93
Comments
Original comment by sylvainjoyeux (Bitbucket: sylvainjoyeux). Ping ! |
Original comment by Nate Koenig (Bitbucket: Nathan Koenig). Thanks for the proposal. This is a very good idea. How about the following?
Where the |
Original comment by sylvainjoyeux (Bitbucket: sylvainjoyeux). Not sure. Let's try to describe my use case and see if that makes sense. My use case is that the same "thrusters SDF extension" is being interpreted by different elements in the system. There's a gazebo plugin for the physics, then there is a component that exports the plugin to the rest of the framework. That's what led me to propose having a single tag with various sub-tags. This way, different software parts can share the common parameters but have the software-specific parts isolated. Does that make sense ? |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). Can you expand your example to include some of the common parameters that you mentioned? |
Original comment by sylvainjoyeux (Bitbucket: sylvainjoyeux). The plugin expects a list of links and thruster parameters. The thruster limits are used both in the physics and in the gazebo-to-rock interface. By the way, why is a plugin name even needed ?
|
Original comment by Nate Koenig (Bitbucket: Nathan Koenig). The plugin name is there so that it be referenced by a program. Gazebo used to have the ability to unload a plugin based on a name. The contents of a
Gazebo will be happy with this, and your program should just ignore the |
Original comment by sylvainjoyeux (Bitbucket: sylvainjoyeux). Yes. That is indeed a very obvious solution. With the extension of the type= attribute, and file= being optional, it would definitely cover all my use-cases. |
Original comment by sylvainjoyeux (Bitbucket: sylvainjoyeux). I'd like to go back to this. What would it take to get the type and optional file parameter implemented ? I don't mind doing the work, but I'm not entirely sure about the way forward ... How I see it, I would need to:
Am I missing anything ? |
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina). I'd suggest we make If we make |
Original comment by sylvainjoyeux (Bitbucket: sylvainjoyeux). Does it make a lot of sense to use the plugin class as the 'type' attribute ? I would think that the plugin type is constrained by where the plugin tag is (i.e. a plugin inside a can only be a ModelTask), in which case just |
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters). cc @mxgrey since he has been improving plugin support in ignition-common |
Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey). I think there are a lot of great ideas here. In the hopefully-not-too-distant future, we're going to have the ability to load arbitrary plugins in a completely generic way, so I'm not sure that we even need to worry much about a "type" specifier, except maybe to be used as an extra sanity check somewhere. Basically, pending the ignition-common pull request 59, your plugin can be loaded into a generic That being said, it's conceivable that you might have your own plugin loading framework which you'd like to utilize instead of the existing Gazebo plugin loading framework or the upcoming |
Original comment by Shane Loretz (Bitbucket: Shane Loretz, GitHub: sloretz). I agree with @mxgrey's last paragraph and think the <plugin name="thrusters" type="ignition::gui::Plugin" filename="libgazebo_thrusters_gui.so">
<max_thrust>200</max_thrust>
<min_thrust>-200</min_thrust>
</plugin> Backwards compatibility options:
I mention bumping the |
Original comment by Lorenzo Rapetti (Bitbucket: lorrapetti). Discussion in The aim here is to add a custom
Making the attribute |
Original comment by Silvio Traversaro (Bitbucket: traversaro). Another aspect that is Gazebo-specific is the attribute |
Original report (archived issue) by sylvainjoyeux (Bitbucket: sylvainjoyeux).
I am sorry if this is not the right place. I asked on answers.gazebo.org about where to create a proposal to change the SDF spec and someone suggested here. Since it seemed to be as good a suggestion as any, here I am.
The current tag requires that a library name is given, and that library name must be a gazebo plugin. Plugin tags without a valid gazebo plugin generate an error.
I'm in a situation where we use SDF as an overall scene/world/robot description format in a robot framework (Rock, http://rock-robotics.org). We naturally started creating gazebo plugins for things that were missing (e.g. underwater thursters) but also wanted to add "plugins" for dealing externally with some things (for reasons that are beyond this proposal, we for instance want to simulate cameras outside of gazebo). We even had cases (the thrusters) where some parts of the infrastructure need to load plugins of their own, and need to know about the parameters given to the gazebo plugin.
In any case, to me, this is a matter of making SDF less gazebo-specific and more a general-purpose format, something it is already pretty good at. What I want to propose is to remove the 'file' attribute and instead define reserved tags within the element:
A software environment would simply ignore a plugin tag which does not have the required inside tag (i.e. gazebo would ignore plugin elements that do not have a element and so on).
The text was updated successfully, but these errors were encountered: