Created
February 13, 2017 15:19
-
-
Save annesteenbeek/f4d939e897010b30b673d4f105c69618 to your computer and use it in GitHub Desktop.
A simple function for init.d to have a roslaunch run at startup at tty8 and tty9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_ros () { | |
source /opt/ros/setup.sh | |
roscore <>/dev/tty8 2>/dev/tty8 & disown | |
until rostopic list ; do sleep 1; done | |
roslaunch YOUR_PACKAGE YOUR_LAUNCH_FILE.launch <> /dev/tty9 2>/dev/tty9 & disown | |
} | |
stop_ros () { | |
source /opt/ros/setup.sh | |
#killall nodes | |
for i in $( rosnode list ); do | |
rosnode kill $i; | |
done | |
#stop roscore | |
killall roscore | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment