How to install humanoid_navigation ROS kinetic Ubuntu 16.04?

When installing ROS Kinetic packages (Ubuntu 16.04), namely humanoid_navigation, it throws an error when executing catkin_make. Without this package, catkin_make runs without error. Everything was done according to the instructions https://emanual.robotis.com/docs/en/platform/op3/recovery/#op3-manual-installation

[ 97%] Building CXX object humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o
/home/user/catkin_ws/src/humanoid_navigation/humanoid_localization/src/HumanoidLocalization.cpp:23:42: fatal error: pcl/filters/uniform_sampling.h: No such file or directory
compilation terminated.
humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/build.make:62: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o' failed
make[2]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o] Error 1
CMakeFiles/Makefile2:12108: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all' failed
make[1]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 97%] Linking CXX executable /home/user/catkin_ws/devel/lib/footstep_planner/footstep_planner_node
[ 97%] Built target footstep_planner_node
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed

After this error, installed pcl from github https://github.com/PointCloudLibrary/pcl in src, ran catkin make, and gave an error

/home/user/catkin_ws/src/humanoid_navigation/humanoid_localization/src/HumanoidLocalization.cpp:23:42: fatal error: pcl/filters/uniform_sampling.h: No such file or directory
compilation terminated.
humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/build.make:62: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o' failed
make[2]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o] Error 1
CMakeFiles/Makefile2:12108: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all' failed
make[1]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Help please!

Upvotes: 3

Views: 349

Answers (4)

Micha93
Micha93

Reputation: 668

You can try following

cd ~/catkin_ws/src
wget https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.8.1.zip
unzip pcl-1.8.1.zip
cd pcl-pcl-1.8.1
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make -j4
sudo make install -j4
cd ~/catkin_ws && catkin_make

If you have installed another pcl version before go to this library and enter

sudo make uninstall
make uninstall

and then remove this directory.

Upvotes: 0

Micha93
Micha93

Reputation: 668

Okay, I have a working solution:

nano /home/<user>/catkin_ws/src/humanoid_navigation/humanoid_localization/src/HumanoidLocalization.cpp

And change to following:

//#include <pcl/filters/uniform_sampling.h>
#include <pcl/keypoints/uniform_sampling.h>

Then go and run catkin_make with cd ~/catkin_ws && catkin_make.

It now should work without any errors.

Upvotes: 0

Arjun Kumar
Arjun Kumar

Reputation: 173

The problem is that in PCL 1.7.2, UniformSampling is located in the "keypoints" module, and in 1.8.0, it has been moved to the "filters" module.

Please check your PCL version

Upvotes: 0

aadimishra
aadimishra

Reputation: 1

Did you terminate/interrupt any build recently? This might be due to the fact that the object code was not generated successfully. One way is to clean the build and devel folder's associated content with the package and then build again.

UPDATE!!! So I replicated your problem and followed my steps to solve them. In my case I had issues with my ros_control package and pcl. Not it works. Cheers!!!

[100%] Linking CXX executable 
/home/aadi/catkin_ws/devel/lib/robot_state_publisher/state_publisher
[100%] Built target joint_state_listener
[100%] Built target state_publisher
[100%] Built target robot_state_publisher
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

Upvotes: 0

Related Questions