A launcher for program.c++ that launches roscore [closed]
Hi, I have a question. I´m use ROS Hydro in Ubuntu 12.04. I have a program in C++ that launch ros --> roscore and others nodes, as are: hokuyo_node or hector_slam.
I want launch this program.c++ with double-click.
If I launch this program in a ubuntu-terminal, the program run is OK, but I can´t do a launcher for this program. I try:
1) gnome-desktop-item-edit {ubication} --create-new
---> In order, I write the program.c++ path and select terminal aplication. The window terminal open with this launcher said:
sh: 1: rosnode: not found
2) gnome-desktop-item-edit {ubication} --create-new
---> In order, I write the program.c++ path and select aplication. The launcher not do nothing.
3) I do a script for launch the program.c++ :
#!/bin/sh
cd
cd /home/lab18/terese3_adq/data/principal
./mainexecut > mainbash.log &
disown -h %1
bg 1
mainexecut = program.c++ and "/home/lab18/terese3_adq/data/principal" is the path to is this program. The result is similar, if I launch this script in a terminal, the program run is Ok, but if I do a launcher or launch with double-click on the script, the result is:
sh: 1: rosnode: not found
4) I do other script for launch the program.c++ :
#!/bin/sh
gnome-terminal -e "bash -c \"cd; cd /home/lab18/terese3_adq/data/principal/; ./mainexecut; exec bash\""
This script has the same result.
I haven't idea from where is the error, or the possible solution.
I thank for some idea.