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

hector_slam Install Question

asked 2019-12-15 09:32:06 -0600

Aust gravatar image

Sorry for asking a simple question but I am new to using ROS and Linux and want to make sure that I install the package correctly to use. I am wanting to install hector_slam to use with a Tim 561 LiDAR, I already have ROS and sick_scan installed and working to be able to visualize the LiDAR data. After reading through the hector_slam documentation I found a line to use for installing the package shown bellow.

sudo apt-get install ros-indigo-hector-slam

When using this to install the package do I need to be within a specific working directory like the catkin work space I have made for my project? Also I have Kinetic not indigo so I should replace that with the word kinetic to install the correct version right?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-12-16 07:17:03 -0600

ermanas gravatar image

updated 2019-12-16 07:53:31 -0600

First and important note, hector_slam is a metapackage. It includes hector_mapping and related packages.

If you want to install a package or a metapackage you can use install from the source option. As you mentioned, you need to use your distro when you want to install a package

 sudo apt-get install ros-kinetic-hector-slam

Method 1: You can be sure about that you've installed the specific package when you use the 'from the source' installation method by simply cheking the installation folder of the packages. So simply go to "/opt/ros/kinetic/share" folder by typing this:

cd /opt/ros/kinetic/share

if you want to list all of the hector_slam metapackage packages, you can list them with grep:

cd /opt/ros/indigo/share && ls | grep hector

Method 2: if you want see the packages are installed or not, you can use rospack find command. It will give you the location of the package. For example type this to the command line,

 rospack find hector_mapping

But if you try to search directly hector_slam, it will say it's not installed. Because this command doesn't work with the metapackages. You can use this command to find your manually installed or created packges.

Method 3: You can use the roscd command to go directly to the installation directory if the package is installed. For example:

 roscd hector_mapping

then type pwd to see which directory that you're in.

I hope this answer is satisfying for you. If you have any question about hector, you can ask as well.

Note: You can find other packages with typing it's name instead of typing 'hector_mapping'.

edit flag offensive delete link more

answered 2019-12-16 05:40:35 -0600

Reamees gravatar image

The apt install part of the command indicates that this is installing the program system wide. So no, you do not have to be in any specific folder to use that command.

As for replacing the indigo part to kinetic or what ever else distro you might be using. Yes that is correct, replace the indigo part to kinetic.

edit flag offensive delete link more

Question Tools


Asked: 2019-12-15 09:32:06 -0600

Seen: 1,777 times

Last updated: Dec 16 '19