Ask Your Question
1

How could I do an executable file in ROS?

asked 2015-11-11 10:05:28 -0500

Fredylucas gravatar image

Hi everybody! I already have a project, and I want to know if there is a way to make an executable file instead of writing the roslaunch command in the terminal. Thank you so much.

edit retag flag offensive close merge delete

Comments

2

What do you mean with 'make an executable file'?

dornhege gravatar image dornhege  ( 2015-11-11 11:13:09 -0500 )edit

I already have a launcher, I want to know if it is possible to make a file like "an .exe" on Windows, in order of let other people who know nothing about ROS neither Linux run my project (double click and thats it). Thank you so much.

Fredylucas gravatar image Fredylucas  ( 2015-11-12 10:12:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-11-12 02:34:46 -0500

updated 2015-11-13 06:30:18 -0500

I'm not aware of such a characteristic in ROS, but maybe the easiest way to do it is simply with a bash script (or another kind of script) which runs the 'roslaunch' command in terminal. In my robot I have a launch file which is run automatically at the startup of the robot, and I'm doing it that way.

EDIT: I suggest you to take a look at this question where there is an example script which could be valid for you.

edit flag offensive delete link more

Comments

I'm really interested in the way your bash works. I'll really appreciate if you can give me more information about it. Thank you so much.

Fredylucas gravatar image Fredylucas  ( 2015-11-12 14:17:41 -0500 )edit
1

Sure :) as I said, I want the .launch file to be launched with the boot of the robot, so in my .bashrc file I have this piece of code:

 TERMINAL = `tty`
 case $TERMINAL in
           "/dev/tty2") roslaunch YOURFILE.launch;
           sleep 2;;
 esac
S.Prieto gravatar image S.Prieto  ( 2015-11-13 01:51:42 -0500 )edit
1

As you can see, I look for the 'tty2' terminal, and then I launch my file. You can do it with any terminal, or If you just want to launch the file in any moment with the script, you don't need to look for a specific terminal, remember that I'm doing that way because I don't want to interact with it.

S.Prieto gravatar image S.Prieto  ( 2015-11-13 01:53:47 -0500 )edit
1

I'm running multiple launch files at the startup, and I need to be able to locate in which terminal are each one of them. That's why I'm using the tty "hack", to identify where they're running.

S.Prieto gravatar image S.Prieto  ( 2015-11-13 06:32:02 -0500 )edit

That is really useful for me, thank you very much.

Fredylucas gravatar image Fredylucas  ( 2015-11-14 13:59:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-11-11 10:05:28 -0500

Seen: 1,740 times

Last updated: Nov 13 '15