Ask Your Question
0

catkin_make doesn't find all the targets

asked 2018-01-07 22:44:07 -0500

horseatinweeds gravatar image

updated 2018-01-08 07:09:07 -0500

When I run catkin_make, it gives the following output:

Base path: /home/ben/workspaces/ROS/smf1
Source space: /home/ben/workspaces/ROS/smf1/src
Build space: /home/ben/workspaces/ROS/smf1/build
Devel space: /home/ben/workspaces/ROS/smf1/devel
Install space: /home/ben/workspaces/ROS/smf1/install
####
#### Running command: "make cmake_check_build_system" in "/home/ben/workspaces/ROS/smf1/build"
####
####
#### Running command: "make -j4 -l4" in "/home/ben/workspaces/ROS/smf1/build"
####
Built target smf1_gazebo_pkg_xacro_generated_to_devel_space_

I don't know what "smf1_gazebo_pkg_xacro_generated_to_devel_space_" is. I have a package called simply "smf1_gazebo_pkg". It uses xacro. catkin_make works fine in my other workspaces, and I don't see a difference in the CMakeLists.txt files. It doesn't seem to find any .xacro files or .gazebo files. The CMakeLists.txt file for the package smf1_gazebo_pkg is this:

       cmake_minimum_required(VERSION 2.8.3)
        project(smf1_gazebo_pkg)

        ## Find catkin macros and libraries
        ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
        ## is used, also find other catkin packages
        find_package(catkin REQUIRED COMPONENTS
          geometry_msgs
          roscpp
          rviz
          tf
          urdf
          xacro
        )
include_directories(
      ${catkin_INCLUDE_DIRS}
    )

The CMakeLists.txt has the same thing for a sub package, but specifies its name, mybot_description, and also has install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}).

Here is what I get from running tree -L 3 ~/workspaces/ROS/smf1/src There should be files under urdf. That's where all the .xacro and .gazebo files are at. Also, the project runs. When I roslaunch the mybot_world.launch file, gazebo comes up and my robot appears. Changes don't reflect though, obviously. I'm getting really confussed.

├── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
└── smf1_gazebo_pkg
    ├── CMakeLists.txt
    ├── include
    │   └── smf1_gazebo_pkg
    ├── launch
    │   └── mybot_world.launch
    ├── mybot_control
    │   ├── CMakeLists.txt
    │   ├── config
    │   ├── launch
    │   └── package.xml
    ├── mybot_description
    │   ├── CMakeLists.txt
    │   ├── package.xml
    │   └── urdf
    ├── mybot.rviz
    ├── package.xml
    ├── src
    └── worlds
        └── mybot.world

Does anyone have any ideas about this? Thanks.

edit retag flag offensive close merge delete

Comments

Well, I'm not sure what your problem is, but it seems you have nested ROS packages. The CMakeLists.txt you posted is from your mybot_description package...

mgruhler gravatar image mgruhler  ( 2018-01-08 00:57:53 -0500 )edit

Does catkin_make find nested packages? A number of tutorials I've been following have them nested, unless I'm misunderstanding. I'm still trying to understand how packages are are intended to be organized in ROS.

horseatinweeds gravatar image horseatinweeds  ( 2018-01-08 09:25:07 -0500 )edit

It might work, but is not good practice. You can have pacakges in subdirectories, but they should not be nested, IMO.

mgruhler gravatar image mgruhler  ( 2018-01-08 10:08:48 -0500 )edit

OK. I think that's my mistake. I'll reorganize and give it another try. Thanks.

horseatinweeds gravatar image horseatinweeds  ( 2018-01-08 10:25:59 -0500 )edit

This is what has me so confused: https://github.com/LTU-AutoEV/mybot_g... It has a package mybot_gazebo, inside of which there are two packages, mybot_control and mybot_description. Is this correct?

horseatinweeds gravatar image horseatinweeds  ( 2018-01-08 10:35:23 -0500 )edit
horseatinweeds gravatar image horseatinweeds  ( 2018-01-08 12:58:05 -0500 )edit

Wow, I'm surprised there are no Errors (I can reproduce that)... Catkin packages need to be unique inside a workspace... Seems it does not detect nested work packages then.

The recommended layout is here.

But I can't reproduce your issue

mgruhler gravatar image mgruhler  ( 2018-01-09 00:52:37 -0500 )edit

I found the issue. ROS was finding the package in a separate workspace. I renamed the packages and put them just inside src and everything started working... All except join friction doesn't seem to work. Thanks mig.

horseatinweeds gravatar image horseatinweeds  ( 2018-01-10 17:52:11 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-01-11 20:21:55 -0500

horseatinweeds gravatar image

The main issue was that ROS was finding my packages in another workspace. I renamed the packages and the changes worked.

edit flag offensive delete link more

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: 2018-01-07 21:55:26 -0500

Seen: 688 times

Last updated: Jan 11 '18