Ask Your Question
1

Ros launch command not found

asked 2017-06-25 08:36:46 -0500

UsmanArif gravatar image

updated 2017-06-25 13:26:27 -0500

I am trying to auto launch a roslaunch file, whenever ubuntu starts. I have written a shell command file "start.sh" and it contains "roslaunch pkg_name file.launch" When i try to execute this shell file in terminal, it runs successfully. But when it runs automatically on start up, the terminal shows "source not found", "roslaunch not found" . Can any one help me correct it. the link to autostarting a sh file is : http://ros-users.122217.n3.nabble.com...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-25 13:15:47 -0500

tfoote gravatar image

If roslaunch isn't found it's likely that you have not done the first thing in the linked example script of sourcing the setup.bash file in your script. If you'd like more information please share a minimal reproduction of your script that doesn't work, using standard tools that will make it easy for us to reproduce.

edit flag offensive delete link more

Comments

This is my shell file. Its works fine when i run ./start.sh in terminal, but not at startup.

#! /bin/sh source /opt/ros/indigo/setup.bash source /home/ubuntu/guidance_ws/devel/setup.bash echo "launching the launch file" roslaunch rfly_launch main.launch

UsmanArif gravatar image UsmanArif  ( 2017-06-26 22:44:09 -0500 )edit
2

i found the problem. The sh file has to be run as a bash file. so by replacing first line (#! /bin/sh) by #! /bin/bash, works

UsmanArif gravatar image UsmanArif  ( 2017-06-27 02:45:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-06-25 08:36:46 -0500

Seen: 9,129 times

Last updated: Jun 25 '17