Community
cancel
Showing results for 
Search instead for 
Did you mean: 
CLIU37
Beginner
976 Views

Ubilinux run ROS launch file on startup

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

1 Reply
idata
Community Manager
96 Views

Hello chuhao,

 

 

I believe what you are trying to do is a system service. If you were using Yocto, you could learn how to create one by following the guide found in https://communities.intel.com/docs/DOC-111103 https://communities.intel.com/docs/DOC-111103.

 

 

Since Ubilinux uses init.d, I'd suggest you to read http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/boot.html. And if you still have issues, I'd suggest you to contact Emutex ( http://www.emutex.com/contact) for more help in Ubilinux.

 

 

-Peter.
Reply