Rviz robot model will not open via script
Without bash and python script: master and rviz works successfully
When I run "roscore" in first terminal. Master runs successfully
process[master]: started with pid [4355] ROS_MASTER_URI=http://userid:11311/
New terminal I type in "roslaunch /home/userid/catkin_ws/src/robot/launch/robot.launch". This basically open RVIZ with the robot model in grid successfully
Above steps are implemented as follows in bash and python script and it does NOT work.
##bashscript.sh
source ~/.bashrc
python pythonscript.py
##pythonscript.py
def init():
os.system("gnome-terminal -e 'bash -c \"pwd; roslaunch /home/userid/catkin_ws/src/robot/launch/robot.launch; exec bash\"'")
if (__name__ == '__main__'):
init()
This fails. RVIZ opens with a white blob in center on grid NOT the robot model. and left hand panel it says robot model error. status error.
Why rviz wouldn't work with script?