Closed IoannisDadiotis closed 2 years ago
Apparently, catkin build
isn't building the iit-centauro-ros-pkg
as a whole (as plain cmake
would do), but it is instead building all subprojects individually. This is probably causing the issue. Do you know of any way to avoid this, and build the root CMakeLists.txt
instead?
catkin build
does not seem to be the problem. I am getting the same error in a different workspace built by catkin_make
.
I think the behavior is the same. What if you try with plain cmake?
you mean building iit-centauro-ros-pkg
before the rest of the workspace? Something like cmake <path-to-repo-iit-centauro-ros-pkg>
?
I am trying proceeding with plain cmake as described in the readme file of iit-centauro-ros-pkg
.
After make generate
I get:
make generate
[ 12%] Built target generate_urdf_centauro
[ 25%] Generating /home/idadiotis/test_ws/src/iit-centauro-ros-pkg/build/centauro_srdf/centauro.srdf ..
/bin/sh: 1: moveit_compute_default_collisions: not found
make[3]: *** [centauro_srdf/CMakeFiles/generate_srdf_centauro.dir/build.make:64: centauro_srdf/centauro.srdf] Error 127
make[3]: *** Deleting file 'centauro_srdf/centauro.srdf'
make[2]: *** [CMakeFiles/Makefile2:634: centauro_srdf/CMakeFiles/generate_srdf_centauro.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:290: CMakeFiles/generate.dir/rule] Error 2
make: *** [Makefile:223: generate] Error 2
Notice that I have git clone this package of our organization. Is it really the one missing? I am getting errors when trying to build this package, I can provide the output if requested.
As an alternative I have been trying to install everything through the forest tool in a new workspace. The commands I have followed are:
Install forest and grow
some basic packages:
[sudo] pip3 install hhcm-forest
mkdir my_ws && cd my_ws
forest init
forest add-recipes git@github.com:advrhumanoids/multidof_recipes.git
forest grow xbot2_examples
forest grow centauro_cartesio
forest grow cartesio_collision_support
source setup.bash
Clone and build iit-centauro-ros-pkg
cd src
git clone git@github.com:ADVRHumanoids/iit-centauro-ros-pkg.git
cd iit-centauro-ros-pkg
mkdir build && cd build
cmake ..
make generate
make generate
gives me the following error:
idadiotis@IITAVR002DU001 ~/forest_ws/src/iit-centauro-ros-pkg/build (master)$ make generate
[ 12%] Generating /home/idadiotis/forest_ws/src/iit-centauro-ros-pkg/build/centauro_urdf/centauro.urdf ..
resource not found: centauro_urdf
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/home/idadiotis/forest_ws/install/share
ROS path [2]=/home/idadiotis/forest_ws/install/lib
ROS path [3]=/home/idadiotis/forest_ws/ros_src
ROS path [4]=/home/idadiotis/forest_ws/install/share
ROS path [5]=/opt/ros/noetic/share
ROS path [6]=/opt/xbot/share
when processing file: /home/idadiotis/forest_ws/src/iit-centauro-ros-pkg/centauro_urdf/urdf/centauro.urdf.xacro
make[3]: *** [centauro_urdf/CMakeFiles/generate_urdf_centauro.dir/build.make:82: centauro_urdf/centauro.urdf] Error 2
make[2]: *** [CMakeFiles/Makefile2:445: centauro_urdf/CMakeFiles/generate_urdf_centauro.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:290: CMakeFiles/generate.dir/rule] Error 2
make: *** [Makefile:223: generate] Error 2
So, generating urdf/srdf from xacro does require some dependencies in order to deal with, e.g., collision models. As of now, these dependencies are mandatory. On the other hand, the package does not need any build stage since the pre-generated urdf and srdf are already there.
The collision model pipeline, as I've just checked, does not compile anymore on focal due to some ROS libary changing its interface.. I'll look into it
Hi @alaurenzi ,
I think I have found a way to solve it. I just tried building iit-centauro-ros-pkg with:
ccmake <path to repo>
make -j install
(instead of cmake
and make generate
)
Notice that I configured cmake with the following:
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /home/idadiotis/forest_ws/install
The repo is build and installed with no problems. Up to now I can load the robot in gazebo and run xbot2 with no problem.
I will come back or close the issue later if there are no problems.
Some info after discussion with @alaurenzi:
make install
does not generate the urdf from xacros but just proceed with the pre-existed urdf srdf (in contrast to make generate
).
Errors like the following
Could not load resource [package://realsense_gazebo_description/meshes/t265_full.stl]: Unable to open file "package://realsense_gazebo_description/meshes/t265_full.stl".
can be because sensor-related packages (e.g. realsense_gazebo_description
) do not install all necessary stuff when built with forest grow
. The solution is to add ~/forest_ws/src
to ROS_PACKAGE_PATH
or git clone
and build these packages with catkin.
iit-centauro-ros-pkg
can be, also, built with forest grow
(as well as cmake
). I did not manage to build with catkin.
In order make generate
to work, capsule generation was necessary
(installed with forest grow
). The newly generated urdf, srdf will not replace the previous ones in the src folder, instead they exist in the build folder. To replace the ones in the src folder make publish
does the job.
I am trying to build my workspace on my Ubuntu 20.04 machine and I am getting the following output:
Notice that before
catkin build
, when I try to configurecentauro_cartesio
I get the folowing CMake Warning:iit-centauro-ros-pkg
is in master branch. @alaurenzi