I don't know if this is something just with my setup or not because I'm curious why this hasn't come up before (unless no one has tried to tweak slam.yaml) but for me, the test as to whether ROS_DISTRO was galactic always failed because it was testing an EnvironmentVariable object against a string. This meant that all changes to slam.yaml in the linorobot2_navigation package was ignored since it loaded its default from the slamtoolbox package.
Anyway, I found in the unit tests you needed to use .perform(lc) where lc is the LaunchContext to get the string from the EnvironmentVariable object. And since humble is out, it made more sense to me to test whether the distro was foxy and if so, use the old parameter and if not, use the new one.
* [#43 Update slam.launch.py (backport #42)](https://github.com/linorobot/linorobot2/pull/43) has been created for branch `foxy`
* [#44 Update slam.launch.py (backport #42)](https://github.com/linorobot/linorobot2/pull/44) has been created for branch `humble`
I don't know if this is something just with my setup or not because I'm curious why this hasn't come up before (unless no one has tried to tweak slam.yaml) but for me, the test as to whether ROS_DISTRO was galactic always failed because it was testing an EnvironmentVariable object against a string. This meant that all changes to slam.yaml in the linorobot2_navigation package was ignored since it loaded its default from the slamtoolbox package.
Anyway, I found in the unit tests you needed to use .perform(lc) where lc is the LaunchContext to get the string from the EnvironmentVariable object. And since humble is out, it made more sense to me to test whether the distro was foxy and if so, use the old parameter and if not, use the new one.