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

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:

#!/bin/bash
source /opt/ros/indigo/setup.bash
source /catkin_ws/devel/setup.bash
roscore

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

Comments

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

Stats

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

Seen: 3,351 times

Last updated: Apr 27 '16