Unable to compile a project using catkin_make on ROS foxy
Hi all, I tried to compile a workspace using catkinmake for my ROS project. First I went to the home directory of linux system (Ubuntu 20.04) and create a new folder name Workspaces. Then I opened the Workspaces folder and create a new folder named **testws** under the workspaces. Then I created a new folder named src under the testws. Then I went to terminal and typed the command **cd Workspaces/testws/src/** to follow that path. Then I create a catkin package from the terminal following the command catkincreatepkg testpkg roscpp rospy stdmsgs sensor_msgs. Then I came back to home directory and entered to the test_pkg to create a folder named scripts. The test_pkg contained include, scripts, src, cmakeList.txt, and package.xml. After that I tried to compile the project using the command catkin_make. I got an error "Command 'catkin_make' not found, but can be installed with: sudo apt install catkin". Then I tried this command on terminal "~/Workspaces/test_ws$ source /opt/ros/foxy/setup.bash". Then tried "~/Workspaces/testws$ catkinmake". I again got the previous error. Then I tried "~/Workspaces/test_ws$ sudo apt install catkin" and get the following messages
Reading package lists... Done Building
dependency tree Reading state
information... Done Some packages
could not be installed. This may mean
that you have requested an impossible
situation or if you are using the
unstable distribution that some
required packages have not yet been
created or been moved out of Incoming.
The following information may help to
resolve the situation:
The following packages have unmet dependencies:
catkin : Depends: python3-catkin-pkg (>= 0.4.14-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
After that I tried "~/Workspaces/test_ws$ sudo apt install ros-foxy-catkin". I received the following messages
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-foxy-catkin
Then I tried "sudo apt install ros2-foxy-catkin" I got following messages
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros2-foxy-catkin
Then I updated the all using sudo apt update and ran the same commands again. The errors remained same. I tried all the solution that I found on web for this error but nothing worked.
I also checked the gcc version which produced "gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc."
Following is my ROS version "/Workspaces/testws$ echo $ROSDISTRO foxy "
Asked by Ellena on 2023-05-19 11:57:45 UTC
Comments
Quick comment:
catkin_make
does not exist in ROS 2. You can't install it usingapt
, but even if you could, you can't really use it to build ROS 2 packages.You may want to take a step back and check why you believe you want/need
catkin_make
."Creating a workspace" is just a matter of creating a directory. It seems that works.
Asked by gvdhoorn on 2023-05-20 01:28:59 UTC
I modify my query. I would like to compile the project using catkin_make.
Asked by Ellena on 2023-05-20 18:13:09 UTC
well, as I wrote:
catkin_make
is not a tool you would use with ROS 2.Is the project you want to build actually a ROS 2 project?
Your post confuses me, because:
this is also not what you would do with ROS 2.
What made you decide to install ROS 2 Foxy?
Asked by gvdhoorn on 2023-05-21 03:30:01 UTC