Sourcing husky setup inside subprocess
I'm working on a GUI built with PyQt4 and Python 2.7 that launches various console commands to run demos for the Clearpath Husky robot using python's subprocess. The GUI switches between launching the local husky_navigation demos and launching my own scripts on the husky. I'm having issues switching from the local environment to the husky's environment. Specifically, Rviz fails to load the correct tf frames and model for the robot and our axis camera stream fails to stream the live video. Our robot has a custom model and tf setup and in the instructions provided by Clearpath they say to source the devel/setup.bash on my local machine before visualizing so that Clearpath's custom packages are built. I want the GUI to be able to be able to switch between the tf frames and model used for the local husky_navigation demos and the custom tf frames and models provided by Clearpath. Because I can't source the setup with python's subprocess, whenever I try to launch Rviz the model and frames are broken. Does anyone have any workarounds to launching the setup.bash or some environment variables I could change so that Rviz doesn't break?