Edison+ubilinux auto launch ROS file at startup

asked 2016-07-03 12:55:12 -0600

Glen gravatar image

Hi

I met problems in setting my "edison+ubilinux" to launch a ROS launch file on startup.

I write a "startup.sh" script as follow,

> . /home/tmac/.bashrc 
> . /home/tmac/.profile
> export ROS_IP=192.168.98.33 
> source ~/pixfcu_ws/devel/setup.bash  
> roslaunch pixfcu fcu.launch
> echo "fcu.sh CHECK!" >> ~/test.sh

If I run it via,

. ~/startup.sh

It working totally fine and my ROS nodes are launched.

Then, I tried to launch this file via "/etc/rc.local" or "/etc/init.d/". The last command,

echo "fcu.sh CHECK!" >> ~/test.sh

it is executed. But, all other commands are not executed at all. Either I put the startup.sh in "rc.local" or "/etc/init.d/", none of them are executed.

I just want to auto-run my ROS script at startup. Any advice appreciated !

Chuhao

edit retag flag offensive close merge delete