Failing to install Turtlebot3
I have followed the instructions to install Turtlebot3 of this video and when I reach the part of making catkin_make I got an error which says:
Could not find urdf(missing urdf_DIR) Could not find the required component 'urdf'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find package): Could not find a package configuration file provided by "urdf" with any of the following names:
urdfConfig.cmake urdf-config.cmake
Add the installation prefix of "urdf" to CMAKE=PREFIX=PATH or set "urdf_DIR" to a directory containing one of the above files. If "urdf" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first) turtlebot3/turtlebot3_description/CMakeLists.txt:10 (find package)
Can someone guide me how to solve this? Do I have to install urdf? How?
EDIT:
I kind of solve this first part by doing the following:
apt-get install -y ros-noetic-urdf-tutorial
with this catkin_make proceeded. So after this I tried to install the simulator by cloning it with
git clone https://github.com/ROBOTIS-GIT/turtle...
and then when doing catkin_make I find again another similar problem.
Could not find gazebo_ros(missing gazebo_ros_DIR) Could not find the required component 'gazebo_ros'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find package): Could not find a package configuration file provided by "gazebo_ros" with any of the following names:
gazebo_rosConfig.cmake gazebo_ros-config.cmake
Add the installation prefix of "gazebo_ros" to CMAKE=PREFIX=PATH or set "gazebo_ros_DIR" to a directory containing one of the above files. If "gazebo_ros" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first) turtlebot3_simulations/turtlebot3_gazebo/CMakeLists.txt:13 (find package)
So I guess I should find a way to install gazebo_ros?? How?
EDIT2: I kinda solve this too by running a
apt-get install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
Only cloning a repository is not enough to be able to build it successfully, as you've found out. You're missing a lot of dependencies, which will make CMake unhappy (as it can't find them), complain and then give up.
See #q252478 for an example workflow.
Tbh I'm a little surprised you weren't able to find existing Q&As about this topic, as there are many with almost the exact same error messages and solutions.