ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to install an individual package in ROS hydro

asked 2014-01-06 16:02:34 -0500

CathIAS gravatar image

updated 2014-01-28 17:06:39 -0500

ngrennan gravatar image

I want to install the hector_slam package in ROS. I downloaded the file from the URL, but I don't know where to put it and how to install the package. Instead of having package.xml in the root folder, it has a stack.xml. I don't know the difference and "rosmake" doesn't work here. If I put the files under the /src folder in my catkin workspace, when I run "catkin_make" it doesn't make the files in this package. I found a few methods online for the earlier versions of ROS, one of them is using "rosws", but it gave a lot of errors and I don't really know what to do when specifying a target workspace. It's my first time installing a package from source, could anyone kindly help me? If possible, I wish to know the general way to install packages in ROS.

Many thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-01-06 21:48:21 -0500

updated 2014-01-08 19:13:49 -0500

Below is one of multiple options. This is assuming you have a default hydro setup running, with "source /opt/ros/hydro/setup.bash" in your .bashrc file. It will also use the catkin version of hector_slam from source as it appears you want to use catkin (?). If you don´t absolutely require installation from source "sudo apt-get install ros-hydro-hector-slam" should also work.

Create a folder somewhere:

mkdir hector_slam_test

Enter folder, init workspace:

cd hector_slam_test
wstool init

Copy the following lines to a file named "hector_slam_catkin.rosinstall":

- git:
    uri: <a href=""></a>
    local-name: src/hector_slam
    version: catkin

/edit: It appears the link gets screwed up by ROS Answers. You can see the correct formatting here:

Merge the contents of this rosinstall file into your workspace:

wstool merge hector_slam_catkin.rosinstall

Update workspace (this updates/pulls all repos belonging to the workspace):

wstool update

Build contents of workspace:


Source the setup file in the workspace´s devel folder:

source devel/setup.bash

You should now be able to use hector_slam as expected. For example

 roslaunch hector_slam_launch tutorial.launch

should start without errors.

edit flag offensive delete link more


Yes. In fact I used sudo apt-get ros-hydro-hector-slam, and it also worked. To install from source and in a customized workspace, your method is better.

CathIAS gravatar image CathIAS  ( 2014-01-08 18:17:21 -0500 )edit

When I run: wstool merge hector_slam_catkin.rosinstall

There is an error: ERROR in config: Yaml for each element must be in YAML dict form

Kindly help me to resolve!


mudassar gravatar image mudassar  ( 2014-10-11 16:22:32 -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



Asked: 2014-01-06 16:02:34 -0500

Seen: 3,078 times

Last updated: Jan 08 '14