0
$\begingroup$

Rosanswers logo

I have been able to include a parameter.yaml file in my test.launch.py file. However if I modify the parameter.yaml file, I need to build the entire package again before seeing changes reflected when I rerun test.launch.py.

In ROS1 this was not an issue as we could just change our parameters config file and rerun roslaunch.

Is there a way to ensure we don't need to rebuild every time we modify the paramter.yaml file?


Originally posted by a.g on ROS Answers with karma: 35 on 2020-02-12

Post score: 0


Original comments

Comment by gvdhoorn on 2020-02-13:\

However if I modify the parameter.yaml file, I need to build the entire package again before seeing changes reflected when I rerun test.launch.py.

just to be clear: the "rebuild" is only needed to copy over the latest version of your .parameter.yaml. Not because the configuration is baked into the node.

Compare with pip when you have installed a locally developed package without -e.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I need to build the entire package again before seeing changes reflected when I rerun test.launch.py.

Well, is your configuration file in your package? That would then be true with colcon build. You can also have your launch file reference a non-package non-install path if its a global configuration so you won't have that issue. Its looking for the version of the yaml file in the package's install path which will not be updated unless you build again. You can instead look for a global path /path/to/yaml.yaml and that way its not being updated or searching in the install space of the package itself. That may not be appropriate for your applications but that's an option.

Symlink install in colcon will help with this issue with python files, but it may be able to work here as well, but I'm not certain off hand.


Originally posted by stevemacenski with karma: 8272 on 2020-02-12

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

colcon build --symlink-install

As Steve Macenski mentioned in the last line. The symlink option creates symlinks in the install directory instead of copying the files. As long as you dont add files to your project you dont have to keep colcon-building for py, urdf or yaml file changes.


Originally posted by guru_florida with karma: 280 on 2020-10-12

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by Karl on 2022-07-12:
This is not true. You should bother trying this out before commenting this solution. The python package is linked, but all resources, including .yaml and .launch.py files are just copied using --symlink-install.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.