ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Ros launch command not found

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

UsmanArif gravatar image

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

I am trying to auto launch a roslaunch file, whenever ubuntu starts. I have written a shell command file "" 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 :

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

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


This is my shell file. Its works fine when i run ./ 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 -0600 )edit

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 -0600 )edit

Question Tools



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

Seen: 14,588 times

Last updated: Jun 25 '17