0
$\begingroup$

Rosanswers logo

Hi!

Maybe this is more of an Linux-question instead of ROS. But anyway, maybe someone could help:

I would like to know how I can build a single file which runs a roslaunch by double click on it.

The goal is that someone could run my ros-project who is not familiar to any shell commands or anything regarding Linux. He would just click on one file and the whole thing just starts running.

Is that possible?

Edit: I already tried a bash file (test.sh) and in it is

#!/bin/bash
xterm -e "roslaunch test test.launch"

and gave the file the permission to execute ("Allow executing file as program" in file properties). But when I run it, nothing happens. Anybody knows what I'm doing wrong?


Originally posted by bluefish on ROS Answers with karma: 236 on 2015-10-21

Post score: 0


Original comments

Comment by gvdhoorn on 2015-10-21:
Have you made sure to make the script first source the correct ROS environment setup file (ie: setup.bash)?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Thanks to @gvdhoorn ! The following bash-file does the trick. :)

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

xterm -e "roslaunch test test.launch"

Originally posted by bluefish with karma: 236 on 2015-10-21

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.