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

Replaced SetEnvironmentVariable with AppendEnvironmentVariable in ignition.launch.py #228

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from

Conversation

federicociresola
Copy link

Description

I discovered that if anyone had set up an environment variable such as IGN_GAZEBO_RESOURCE_PATH and GN_GAZEBO_PLUGIN_PATH, the launcher overwrote them with new path.
To fix this problem, I replaced SetEnvironmentVariable with AppendEnvironmentVariable in this way if the variables already existed, the launcher will append new paths otherwise it will create them.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I discovered this problem when I was trying to spawn a x500 of PX4 in the world with Gazebo Garden (I forked the code and I am making the porting from Ignition to Gazebo garden) but the same problem there is also in the ignition launcher.
Possible way to test it:

  • export IGN_GAZEBO_RESOURCE_PATH:=<custom model folder>
  • ros2 launch irobot_create_ignition_bringup create3_ignition.launch.py
  • spawn the custom model

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Copy link
Contributor

@alsora alsora left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

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 this pull request may close these issues.

2 participants