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

Use roscore, roslaunch and rosrun in bash script

asked 2016-04-27 10:45:31 -0500

mitch1993 gravatar image

Hello! I want to start roscore and several ros nodes from a other program with a bash script:

source /opt/ros/indigo/setup.bash
source /catkin_ws/devel/setup.bash

when I call the script manually everything works, but when i call it from the other program (with system( nothing happens. Any ideas what I'm doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-27 10:55:11 -0500

mitch1993 gravatar image

Solved it by exporting my ros path in the bash script!

edit flag offensive delete link more


Also don't forget to to source setup.bash in your script.

felixcra gravatar image felixcra  ( 2018-05-10 10:51:00 -0500 )edit

Question Tools

1 follower


Asked: 2016-04-27 10:45:31 -0500

Seen: 3,347 times

Last updated: Apr 27 '16