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

How do I create a desktop application for ROS?

asked 2016-02-14 09:05:34 -0600

VictorLamoine gravatar image

I have created a package and I want my end user to be able to use this package without having to type any command or even see a terminal.

How to do I create a desktop launcher file for Unity or GNOME?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
12

answered 2016-02-14 09:14:01 -0600

VictorLamoine gravatar image

updated 2017-01-10 04:23:56 -0600

UPDATE

Check this repository for a complete example including automatic desktop/icon file install : https://gitlab.com/InstitutMaupertuis...

Read below if you want to manually create a desktop launcher.


First, create a directory for your icons, then copy the application icon to the directory:

image description

sudo mkdir /usr/local/share/icons -p
sudo cp ros.png /usr/local/share/icons/

After that we need to create a .desktop file:

sudo mkdir /usr/local/share/applications/ -p
sudo gedit /usr/local/share/applications/ros_fanuc_m10ia_support.desktop

Make sure to have ros-indigo-fanuc package installed for this example:

[Desktop Entry]
Name=Fanuc M10iA support
Comment=ROS - Fanuc M10iA support
Exec=bash -c "source /opt/ros/indigo/setup.bash && roslaunch fanuc_m10ia_support test_m10ia.launch"
Icon=/usr/local/share/icons/ros.png
Type=Application
Categories=ROS;
StartupNotify=true

Once this is done, use the Unity launcher and search for fanuc: image description

Click to launch the application: image description

You can also pin the application in the launch bar like any other application: image description

Of course, this process would be ideally incorporated to the install target of your CMake script. This way the launcher would be automatically created at the application installation.

edit flag offensive delete link more

Question Tools

6 followers

Stats

Asked: 2016-02-14 09:05:34 -0600

Seen: 3,950 times

Last updated: Jan 10 '17