catkin_make doesn't find all the targets
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.
Well, I'm not sure what your problem is, but it seems you have nested ROS packages. The
CMakeLists.txt
you posted is from yourmybot_description
package...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.
It might work, but is not good practice. You can have pacakges in subdirectories, but they should not be nested, IMO.
OK. I think that's my mistake. I'll reorganize and give it another try. Thanks.
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?
Actually, try this link: https://github.com/HumaRobotics/mybot...
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
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.