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

How to install packages from github

asked 2016-07-23 17:48:04 -0500

Raisintoe gravatar image

So, I know how to clone a repository from github, but that's all. I would like to install the common_msgs collection of packages onto my Raspberry Pi which is running debian jessie. How do I go about installing ROS packages, or a collection of ROS packages from github?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2016-07-28 12:08:52 -0500

skr_robo gravatar image

I believe you have a catkin workspace set up already. If not you can follow this. Once that is done, you can go to the github page for your package. In this case, I believe you are looking for common_msgs.

Open terminal and navigate to src folder in your catkin workspace:

cd ~/catkin_ws/src

Then clone the repository using:

git clone -b <branch> <address>

For example, if you are looking to run it in ros hydro, your command could look like:

 git clone -b hydro-devel https://github.com/ros/common_msgs.git

Once it is completed, do the following:

cd ~/catkin_ws 
catkin_make
edit flag offensive delete link more

Comments

I am using ros indigo and I followed ur steps but I am getting error : 'fatal: Remote branch indigo-devel not found in upstream origin'

Please help @skr_robo

vacky11 gravatar image vacky11  ( 2017-02-08 11:59:37 -0500 )edit

In some cases, they may not have specific branch set up for your version of ROS. What I have posted here is only one possible example. Go to git and see what branches they have. If they haven't said anything about using a specific branch for indigo, the master branch should probably work.

skr_robo gravatar image skr_robo  ( 2017-02-08 17:09:20 -0500 )edit
1

If you still couldn't get it done, please post the git link here. Also, note that indigo-devel is only indigo development branch. It may not always be a good idea to use it. I strongly recommend you try:

git clone <address>
skr_robo gravatar image skr_robo  ( 2017-02-08 17:12:22 -0500 )edit

Thanks for your reply @skr_robo

vacky11 gravatar image vacky11  ( 2017-02-09 12:44:59 -0500 )edit

This time I got this error in the final step while doing catkin_make

Here is the link of github that has the package I want to install.

vacky11 gravatar image vacky11  ( 2017-02-09 12:46:11 -0500 )edit

Finally I was able to execute catkin_make successfully. I figured out that I was missing a package called wxWidgets. On installing this package everything worked well

vacky11 gravatar image vacky11  ( 2017-02-09 16:51:56 -0500 )edit
3

answered 2016-07-24 05:03:46 -0500

Chrissi gravatar image

Have a look at the Installing ROS from source tutorial. One of the notes for example states how to change the install target for catkin_make:

Note: The default catkin installation location would be ~/ros_catkin_ws/install_isolated, if you would like to install some where else then you can do this by adding the --install-space /opt/ros/kinetic argument to your catkin_make_isolated call.

edit flag offensive delete link more

Comments

I wanted to install a new package this way, however my user login does not have write privilege to /opt/ros/

When I tried using sudo, that didn't work either because root did not have the necessary environment from setup.bash

Managed to do it via a root shell (using sudo -s) but was awkward.

gb96 gravatar image gb96  ( 2018-05-25 02:18:48 -0500 )edit

Thank you, was exactly looking for that

Beshari gravatar image Beshari  ( 2019-10-07 10:32:10 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2016-07-23 17:48:04 -0500

Seen: 55,184 times

Last updated: Jul 28 '16