Cannot build power_supplies (rosmake) package

asked 2017-11-27 03:20:15 -0500

Gorgo gravatar image

updated 2017-12-05 10:13:23 -0500

gvdhoorn gravatar image

Newbye here. Hi all. I'm trying to compile this ros project ( https://github.com/ktossell/power_sup... ) in my Elementary OS Loki (Ubuntu 16.04).

I correctly install ROS following this guide ( https://elementaryos.stackexchange.co... ); I created build folder, cmake .., but make doesn't show anything and I cannot create a binary file.

What should I do? Thanks

EDIT: Ok let's start saying that it's my first ROS attempt and I have to compile a project that I have no knowledge of :/ It seems to be a ROS project than I'm here to ask help :) Thanks in advance. Now, I removed the old custom cmake build folders and after installing and setting env I did

gorgo@dago:~/power_supplies$ catkin_make --source .

I cannot just catkin_make because it says:

The specified source space "/home/gorgo/power_supplies/src" does not exist

This is the output:

Base path: /home/gorgo/power_supplies
Source space: /home/gorgo/power_supplies
Build space: /home/gorgo/power_supplies/build
Devel space: /home/gorgo/power_supplies/devel
Install space: /home/gorgo/power_supplies/install
####
#### Running command: "cmake /home/gorgo/power_supplies -DCATKIN_DEVEL_PREFIX=/home/gorgo/power_supplies/devel -DCMAKE_INSTALL_PREFIX=/home/gorgo/power_supplies/install -G Unix Makefiles" in "/home/gorgo/power_supplies/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CATKIN_DEVEL_PREFIX


-- Build files have been written to: /home/gorgo/power_supplies/build
####
#### Running command: "make -j8 -l8" in "/home/gorgo/power_supplies/build"
####

Finally,

gorgo@dago:~/power_supplies/build$ make -j8 -l8

doesn't output anything and in my build folder I have:

gorgo@dago:~/power_supplies/build$ ls
catkin_make.cache  CMakeCache.txt  CMakeFiles  cmake_install.cmake  Makefile
edit retag flag offensive close merge delete

Comments

I created build folder, cmake ..

this confuses me: that is not a typical ROS development practice.

Can you add some more detail to your post describing what it is that you did/do exactly?

Guessing: do you have a compiler installed? What is the output of which gcc and which g++?

gvdhoorn gravatar image gvdhoorn  ( 2017-11-27 05:32:58 -0500 )edit

Of course I have compiler installed: gcc/g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609

Gorgo gravatar image Gorgo  ( 2017-12-05 09:18:37 -0500 )edit

If that is the case then you're going to have to show us the output of catkin_make.

Just to reiterate: running cmake .. and make yourself is not how you typically build ROS pkgs.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-05 09:20:42 -0500 )edit

I edited the original post with catkin_make output and more info

Gorgo gravatar image Gorgo  ( 2017-12-05 09:47:18 -0500 )edit

Two things:

  1. the package you link to is not a Catkin package. So catkin_make and friends will not touch it
  2. ROS workspaces are not package directories. They are directories containing package directories.

For 2) see the tutorial.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-05 10:10:24 -0500 )edit

For 1): if you really want/need to use the package, either build it using rosmake or convert it to a Catkin package. If you're just starting out, neither is very simple.

For future proofing this, I'd convert the pkgs to Catkin: tutorial.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-05 10:12:03 -0500 )edit

Actually I only want to compile them (ctx2140 and m4atx monitors) in order to use them in a Ubuntu 16.04 env. Since you have a clearer vision than me, what's the best way to do it? Thank you for the patience

Gorgo gravatar image Gorgo  ( 2017-12-05 13:55:04 -0500 )edit

I would take those packages and convert them into Catkin pkgs. See the migration tutorial I linked you to.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-06 07:25:03 -0500 )edit