[ros-users] [Discourse.ros.org] [Quality Assurance] To avoid undesired change in .rviz

Matthew Barulic ros.discourse at gmail.com
Wed Oct 3 17:40:03 UTC 2018



I'd suggest you go with your first proposed solution. Files captured by gitignore rules can still be managed by git. For most people, the incidental changes they make will properly be ignored. If someone has a "real" change to the .rviz file that needs to be added, they can run
`git add -f <path to file>`
to force git to add the file despite the gitignore rules. 

This is nice as it's a source control solution to a source control problem. More generally, this solves the problem of "I need to distribute this file, but everyone's customizations to this file should not be carried back upstream."

Regarding the second solution, ROS uses a healthy does of environment variables under the hood. Running ROS applications as root requires a bit of extra setup and usually causes more headaches than it's worth.

As a third alternative, in some of my own projects, I include the .rviz files in our repositories as templates. Teammates are instructed to copy the file from the repository to the `/home/USER/.rviz/` directory. Any changes they make get saved to that copy instead of the git-controlled file. This adds an extra step if you need to distribute changes to the .rviz file, but we haven't had the need to do that very frequently.





---
[Visit Topic](https://discourse.ros.org/t/to-avoid-undesired-change-in-rviz/6270/2) or reply to this email to respond.




More information about the ros-users mailing list