Ask Your Question
0

catkin_make is not building my bitbucket based ros packages

asked 2017-02-08 16:11:04 -0500

sharan100 gravatar image

updated 2017-02-08 16:53:09 -0500

Background

I have an existing project that I want to migrate to a different computer. I started building a project on my Raspberry Pi and then put the project up on github. The current name of the project/package is zlab_drone. Here is the hierarchy of my project

                                         /home 
                                            |
                                        /catkin_ws
                                            |
     ----------------------------------------------------------------------------------
     |                                      |                                         |
  /devel                                  /src                                     /build
     |                                      |                                         |
    ...                        -----------------------------                         ...
                               |             |             |
                  CMakeLists.txt     /ardrone_autonomy     /zlab_drone

Main Issue

Now my problem is the fact that whenever I clone my /zlab folder into my /src folder on a different computer and run catkin_make in my /catkin_ws folder, it does not build the /zlab_drone package that I have cloned. However, if I build the whole thing from ground up, using catkin_create_package, catkin_make recognizes the package /zlab_drone. In fact, to get ardrone_autonomy, I just git cloned it into my /src folder. Not sure why this isn't working for /zlab_drone.

Solutions that I have tried out

Looking at the CMakeLists.txt present in ardrone_autonomy, I noticed that they had this little section:

# Build [pathced] ardronelib from an external project
include(ExternalProject)
ExternalProject_Add(ardronelib
    GIT_REPOSITORY git://github.com/AutonomyLab/ardronelib.git
    GIT_TAG 2f987029c55531e4c0119c3600f9c57f935851ed
    PREFIX ${CATKIN_DEVEL_PREFIX}
    CONFIGURE_COMMAND echo "No configure"
    BUILD_COMMAND make
    INSTALL_COMMAND make install INSTALL_PREFIX=${CATKIN_DEVEL_PREFIX}/lib/ardrone
    BUILD_IN_SOURCE 1
)

I modified this for the current project that I am looking at:

include(ExternalProject)
ExternalProject_Add(zlab_drone
    GIT_REPOSITORY https://bitbucket.org/sharan_duggirala/zlab_drone
    PREFIX ${CATKIN_DEVEL_PREFIX}
    CONFIGURE_COMMAND echo "No configure"
    BUILD_COMMAND make
    INSTALL_COMMAND make install INSTALL_PREFIX=${CATKIN_DEVEL_PREFIX}/lib/zlab_drone
    BUILD_IN_SOURCE 1
)

Now the problem I face is that whenever I get the prompt for Username for 'https://bitbucket.org' catkin_make continues with Building ARDroneTool/Lib. I am going to try this out with github and check if a similar problem persists. However, I would like to discover a way to use bitbucket, as it allows private projects and such.

edit retag flag offensive close merge delete

Comments

Does your zlab project contain a package.xml and a CMakeLists.txt ? If it doesn't have a package.xml, or it isn't checked into git, catkin_make won't recognize it as a package and won't build it.

ahendrix gravatar imageahendrix ( 2017-02-08 17:49:54 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-02-08 18:59:47 -0500

ahendrix gravatar image

I found your project on github: https://github.com/sd12832/zlab_drone and it seems like there are no build commands in your CMakeLists.txt . It looks like your project isn't building because there are no build commands.

The ardrone package is using the ExternalProjectAdd command to download and build a second, separate repository that is not a ROS package (note that the git URL that they're pulling from isn't the same as the URL for their ROS package). Since all of your code is in one package, you don't need to do this.

edit flag offensive delete link more

Comments

Yup, that was exactly why nothing was being built. Not sure why github missed out on those commands.

sharan100 gravatar imagesharan100 ( 2017-02-09 10:03:46 -0500 )edit
-1

answered 2017-02-08 17:44:09 -0500

AndyZe gravatar image

updated 2017-02-08 17:44:40 -0500

There is a hidden .git folder that may be screwing things up when you migrate to bitbucket. At least, it should be deleted first. Hit Ctrl+H to see the hidden files.

edit flag offensive delete link more

Comments

The .git folder contains the local copy of the git repository. I don't see how removing it will improve the migration process or change whether catkin sees this directory as a package or not.

ahendrix gravatar imageahendrix ( 2017-02-08 17:53:01 -0500 )edit

Removing the .git directory will, however, remove all of the local git history and remove all reference to any upstream repositories, so it's not something that I'd blindly recommend.

ahendrix gravatar imageahendrix ( 2017-02-08 17:54:23 -0500 )edit

OK. But if he started a package in GitHub, then added the entire folder to a new bitbucket repo, there may be an incorrect, hidden .Git folder, right?

AndyZe gravatar imageAndyZe ( 2017-02-08 18:13:32 -0500 )edit

No, a git repository can have multiple remotes.

ahendrix gravatar imageahendrix ( 2017-02-08 18:55:44 -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

2 followers

Stats

Asked: 2017-02-08 16:11:04 -0500

Seen: 226 times

Last updated: Feb 08 '17