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

What's the goal of the launch file? #14

Closed
chapulina opened this issue Jul 12, 2021 · 8 comments · Fixed by #102
Closed

What's the goal of the launch file? #14

chapulina opened this issue Jul 12, 2021 · 8 comments · Fixed by #102

Comments

@chapulina
Copy link
Contributor

I noticed that the instructions use ign-launch:

ign launch lrauv_world.ign

But inspecting that launch file, it doesn't seem to be doing anything that can't be done directly in the world file. In fact, running this does pretty much the same:

ign gazebo buoyant_tethys.sdf

Is there a long term goal to expand that launch file with non-gazebo functionality? If not, I'd recommend getting rid of the extra layer of abstraction and using ign-gazebo directly.

@mabelzhang
Copy link
Collaborator

mabelzhang commented Jul 13, 2021

I think eventually we might need to use the ugly syntax like in SubT launch files to instantiate multiple almost-identical vehicles without copy-pasting all the magic hydrodynamics and lift-drag numbers in buoyant_tethys.sdf, but we haven't convinced ourselves we want to live with the ugliness.

One of the things I was using from the launch file was I was changing the RTF a lot, so having the physics inspector present at startup saved testing time. Now that I'm not using it, I commented it out, but with the mission tests, I'm using it again.

@arjo129
Copy link
Member

arjo129 commented Jul 13, 2021

We could also dynamically add models without using templates via service calls. This could have us avoid the ruby template based madness. It would involve writing a small tool to do so probably, but its nothing too crazy.

@chapulina
Copy link
Contributor Author

instantiate multiple almost-identical vehicles without copy-pasting all the magic

@arjo129 's idea of spawning sounds interesting. Also, we could look into the brand new SDF params for that: http://sdformat.org/tutorials?tut=param_passing_proposal

having the physics inspector present at startup saved testing time

You can insert GUI plugins directly on the SDF world file too.

But in this situation, my recommendation would be to leave the world file without any GUI plugins, so it picks up each user's local ~/.ignition/gazebo/gui.config. So you can locally decide to load that plugin for yourself without hardcoding it on the world.

If you don't want to change your default GUI config, you can also pass a custom one with --gui-config.

@caguero
Copy link
Collaborator

caguero commented Jul 21, 2021

@chapulina , is it OK to close this issue?

@chapulina
Copy link
Contributor Author

My recommendation would be to remove the launch file and use the world directly instead. The advantage would be removing one layer of abstraction that is not providing any extra functionality. But if people are already used to the current approach I think it's fine to close this issue.

@caguero
Copy link
Collaborator

caguero commented Jul 21, 2021

Thanks, let's keep it open then and consider it for M3 then.

@mabelzhang
Copy link
Collaborator

mabelzhang commented Jul 28, 2021

Pros of the launch file:

  • User camera angle can be specified. This saves time rotating the world view to the horizontal vehicle to see pitch. We could change the vehicle pose in the world, but since having world +x pointing forward aligns with the canonical robot frame, having the world and robot in the same orientation is an easier pose for testing.
  • User config in ~/.ignition/gazebo/gui.config does not persist after Docker container exit, unless we mount ~/.ignition from host, which I guess we could do... but it isn't very clean if my Docker Ignition is overwriting my host Ignition's config... We could save config as, but then that would require reloading the config at every startup.

@chapulina
Copy link
Contributor Author

User camera angle can be specified.

That can also be done from the SDF's <gui> tag. Everything that's on that launch file can be done from SDF except for setting the window name (which I wouldn't encourage anyway). See #68.

that would require reloading the config at every startup.

If the default config is hardcoded in the world file, we can offer alternative configs to be passed at startup as needed. See on #68 an example of having the current launch file's config as the default, and an alternative plotting.config that opens the 2D plot. We could potentially have multiple of these configs installed for convenience.

@chapulina chapulina transferred this issue from another repository Nov 2, 2021
@chapulina chapulina mentioned this issue Nov 24, 2021
28 tasks
arjo129 added a commit that referenced this issue Dec 1, 2021
Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 linked a pull request Dec 1, 2021 that will close this issue
chapulina added a commit that referenced this issue Dec 1, 2021
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Louise Poubel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants