0
$\begingroup$

Rosanswers logo

Hello everyone

Im new to ROS platform and im about to build my first real world robot using ROS. M question might sound bad or something but i have to ask since im only a beginner.

which is the best practice for installing ROS packages, apt-get or git clone. For example if i want to install the gmapping package for my robot, should i:

  • Install the gmapping package using sudo apt-get command and as far as i know if i use this command, the gmapping package will be available for all workspaces and packages.

  • Install the gmapping package using git clone command.


Originally posted by Celebrimbor on ROS Answers with karma: 23 on 2021-05-15

Post score: 2


Original comments

Comment by gvdhoorn on 2021-05-17:
@miura: why did you add the ros2 tag?

Comment by miura on 2021-05-17:
@gvdhoorn , from your answer and comment, I decided that the question applies to ROS2 as well.

Comment by Celebrimbor on 2021-05-19:
Thank you very much, sir, the answer was veryy helpful

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It's just my opinion of course -- and there will certainly be others with different opinions -- but see #q320046 for an earlier Q&A on this topic.

Technically that Q&A is about how to install packages, but I took the time there to add some more context and guidelines as to when to choose which method of installation.

Summarising: always prefer apt (or dnf now with RPM distributions supported), unless there is no release of a package for a specific OS, platform, CPU architecture or with a specific patch included. And for that last case building from source is really only necessary / acceptable until the main release (ie: the one installable using apt) gets the patch.

And a final comment:

Install the gmapping package using git clone command.

git clone-ing a repository is not the same as installing a package.

It's only one step in a (potentially involved and time consuming) process.

But see #q320046.


Originally posted by gvdhoorn with karma: 86574 on 2021-05-16

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by gvdhoorn on 2021-05-16:
And although you mark this as ros1, I don't believe I'd change my answer in the context of ROS 2 (except of course the ROS 1 wiki is not used for ROS 2 packages).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.