-
Notifications
You must be signed in to change notification settings - Fork 0
ROS Plan Installation NIGHTMARE
🔗 the main doc page of ROS Plan
🔗 the gitHub page of ROS Plan
🔗 in particular see the README, Installation
sudo apt install flex bison freeglut3-dev libbdd-dev python-catkin-tools ros-$ROS_DISTRO-tf2-bullet
--- ISSUE ---
Reading package lists... Done
Building dependency tree
Reading state information... Done
freeglut3-dev is already the newest version (2.8.1-3).
freeglut3-dev set to manually installed.
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:
python-catkin-tools : Depends: python-catkin-pkg (>= 0.2.9) but it is not installable
Depends: python-osrf-pycommon but it is not installable
E: Unable to correct problems, you have held broken packages.
-- UNABLE TO SOLVE THE ISSUE --
(base) root@35ff54b0625c:~/test_ws/src# sudo apt-get install python-osrf-pycommon
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-osrf-pycommon is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-osrf-pycommon' has no installation candidate
(base) root@35ff54b0625c:~/test_ws/src# sudo apt-get install python-osrf-pycommon^C
(base) root@35ff54b0625c:~/test_ws/src# sudo apt-get install python-catkin-pkg
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-catkin-pkg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-catkin-pkg
E: Package 'python-catkin-pkg' has no installation candidate
🔗 About this issue Can I still use catkin init and catkin build when I can't install python-catkin-tools?, see the log message: it's pretty much the same.
It seems to be a common issue of python-catkin-tools
.
🔗 the post above suggests this page, which however is not so helpful.
🔗 the repo of Catkin Tools on GitHub
🔗 another promising post on ROS Answer, catkin build in Ubuntu 20.04 noetic?
The post recommend this workaround to solve the issue:
sudo apt install python3-catkin-tools python3-osrf-pycommon
sudo apt install python3-catkin-tools python3-osrf-pycommon
-- ISSUE --
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
python3-catkin-tools python3-osrf-pycommon
2 upgraded, 0 newly installed, 0 to remove and 631 not upgraded.
Need to get 182 kB of archives.
After this operation, 201 kB disk space will be freed.
Get:1 http://packages.ros.org/ros-testing/ubuntu focal/main amd64 python3-osrf-pycommon all 2.0.2-1 [23.3 kB]
Ign:2 http://packages.ros.org/ros-testing/ubuntu focal/main amd64 python3-catkin-tools all 0.8.5-1
Ign:2 http://repo.ros2.org/ubuntu/main focal/main amd64 python3-catkin-tools all 0.8.5-1
Err:2 http://repo.ros2.org/ubuntu/main focal/main amd64 python3-catkin-tools all 0.8.5-1
404 Not Found [IP: 64.50.236.52 80]
Fetched 23.3 kB in 2s (14.1 kB/s)
E: Failed to fetch http://repo.ros2.org/ubuntu/main/pool/main/p/python3-catkin-tools/python3-catkin-tools_0.8.5-1_all.deb 404 Not Found [IP: 64.50.236.52 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The machine has not the repositories updated.
🔗 Here is a solution for this issue, Docker - Update/Upgrade ROS
🔗 here are the reasons for this problem; see also this post
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
But unfortunately this doesn't solve the issue:
(base) root@35ff54b0625c:~/test_ws/src# curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
OK
(base) root@35ff54b0625c:~/test_ws/src# sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
(base) root@35ff54b0625c:~/test_ws/src#
(base) root@35ff54b0625c:~/test_ws/src# sudo apt install python3-catkin-tools python3-osrf-pycommon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
python3-catkin-tools python3-osrf-pycommon
2 upgraded, 0 newly installed, 0 to remove and 631 not upgraded.
Need to get 159 kB/182 kB of archives.
After this operation, 201 kB disk space will be freed.
Ign:1 http://packages.ros.org/ros-testing/ubuntu focal/main amd64 python3-catkin-tools all 0.8.5-1
Ign:1 http://repo.ros2.org/ubuntu/main focal/main amd64 python3-catkin-tools all 0.8.5-1
Err:1 http://repo.ros2.org/ubuntu/main focal/main amd64 python3-catkin-tools all 0.8.5-1
404 Not Found [IP: 64.50.236.52 80]
E: Failed to fetch http://repo.ros2.org/ubuntu/main/pool/main/p/python3-catkin-tools/python3-catkin-tools_0.8.5-1_all.deb 404 Not Found [IP: 64.50.236.52 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
even with --fix-missing
the issue seems not solved:
sudo apt install --fix-missing python3-catkin-tools python3-osrf-pycommon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
python3-catkin-tools python3-osrf-pycommon
2 upgraded, 0 newly installed, 0 to remove and 631 not upgraded.
Need to get 159 kB/182 kB of archives.
After this operation, 201 kB disk space will be freed.
Ign:1 http://packages.ros.org/ros-testing/ubuntu focal/main amd64 python3-catkin-tools all 0.8.5-1
Ign:1 http://repo.ros2.org/ubuntu/main focal/main amd64 python3-catkin-tools all 0.8.5-1
Err:1 http://repo.ros2.org/ubuntu/main focal/main amd64 python3-catkin-tools all 0.8.5-1
404 Not Found [IP: 64.50.236.52 80]
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 203548 files and directories currently installed.)
Preparing to unpack .../python3-osrf-pycommon_2.0.2-1_all.deb ...
Unpacking python3-osrf-pycommon (2.0.2-1) over (1.0.0-1) ...
Setting up python3-osrf-pycommon (2.0.2-1) ...
E: Failed to fetch http://repo.ros2.org/ubuntu/main/pool/main/p/python3-catkin-tools/python3-catkin-tools_0.8.5-1_all.deb 404 Not Found [IP: 64.50.236.52 80]
Inside the same post, there's a second workaround:
pip3 install --user git+https://github.com/catkin/catkin_tools.git
It worked, even if with some warning:
pip3 install --user git+https://github.com/catkin/catkin_tools.git
Collecting git+https://github.com/catkin/catkin_tools.git
Cloning https://github.com/catkin/catkin_tools.git to /tmp/pip-req-build-04o3q_vb
Running command git clone -q https://github.com/catkin/catkin_tools.git /tmp/pip-req-build-04o3q_vb
Resolved https://github.com/catkin/catkin_tools.git to commit 69964db93d2639c84ee59911d27e51e46003b661
Requirement already satisfied: setuptools in /root/anaconda3/lib/python3.9/site-packages (from catkin-tools==0.9.0) (58.0.4)
Requirement already satisfied: PyYAML in /root/anaconda3/lib/python3.9/site-packages (from catkin-tools==0.9.0) (6.0)
Collecting osrf-pycommon>0.1.1
Downloading osrf_pycommon-2.0.2-py3-none-any.whl (36 kB)
Requirement already satisfied: catkin_pkg>=0.3.0 in /root/anaconda3/lib/python3.9/site-packages (from catkin-tools==0.9.0) (0.4.24)
Requirement already satisfied: pyparsing in /root/anaconda3/lib/python3.9/site-packages (from catkin_pkg>=0.3.0->catkin-tools==0.9.0) (3.0.4)
Requirement already satisfied: docutils in /root/anaconda3/lib/python3.9/site-packages (from catkin_pkg>=0.3.0->catkin-tools==0.9.0) (0.17.1)
Requirement already satisfied: python-dateutil in /root/anaconda3/lib/python3.9/site-packages (from catkin_pkg>=0.3.0->catkin-tools==0.9.0) (2.8.2)
Requirement already satisfied: six>=1.5 in /root/anaconda3/lib/python3.9/site-packages (from python-dateutil->catkin_pkg>=0.3.0->catkin-tools==0.9.0) (1.16.0)
Building wheels for collected packages: catkin-tools
Building wheel for catkin-tools (setup.py) ... done
Created wheel for catkin-tools: filename=catkin_tools-0.9.0-py3-none-any.whl size=225069 sha256=aae0ee048cce8a4971f05e4ac9639adb66f096aa712a2dcb8509bccf92be2ece
Stored in directory: /tmp/pip-ephem-wheel-cache-mq6lr92u/wheels/72/a3/9c/09e06e0d77d66a0f326bfacc1f81f91c17a94905e0f064a78c
Successfully built catkin-tools
Installing collected packages: osrf-pycommon, catkin-tools
WARNING: The script catkin is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed catkin-tools-0.9.0 osrf-pycommon-2.0.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Let's go on with the installation of ROS plan, hoping the issue has been solved in the previous step.
sudo apt install flex bison freeglut3-dev libbdd-dev ros-$ROS_DISTRO-tf2-bullet
Installation done! Here's the console log:
Reading package lists... Done
Building dependency tree
Reading state information... Done
freeglut3-dev is already the newest version (2.8.1-3).
freeglut3-dev set to manually installed.
The following additional packages will be installed:
libbdd0c2 libfl-dev libfl2
Suggested packages:
bison-doc flex-doc
The following NEW packages will be installed:
bison flex libbdd-dev libbdd0c2 libfl-dev libfl2 ros-noetic-tf2-bullet
0 upgraded, 7 newly installed, 0 to remove and 632 not upgraded.
Need to get 1,505 kB of archives.
After this operation, 4,044 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [228 B]
Ign:4 http://giano.com.dist.unige.it/ubuntu focal/universe amd64 libbdd0c2 amd64 2.4-11build1
Get:7 http://ubuntu.connesi.it/ubuntu focal/main amd64 libfl-dev amd64 2.6.4-6.2 [6,316 B]
Ign:6 https://it2.mirror.vhosting-it.com/ubuntu focal/main amd64 libfl2 amd64 2.6.4-6.2
Ign:4 http://ubuntu.connesi.it/ubuntu focal/universe amd64 libbdd0c2 amd64 2.4-11build1
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 bison amd64 2:3.5.1+dfsg-1 [657 kB]
Ign:6 https://it1.mirror.vhosting-it.com/ubuntu focal/main amd64 libfl2 amd64 2.6.4-6.2
Ign:4 https://it1.mirror.vhosting-it.com/ubuntu focal/universe amd64 libbdd0c2 amd64 2.4-11build1
Get:2 http://ubuntu.mirror.garr.it/ubuntu focal/main amd64 flex amd64 2.6.4-6.2 [317 kB]
Get:8 http://packages.ros.org/ros-testing/ubuntu focal/main amd64 ros-noetic-tf2-bullet amd64 0.7.5-1focal.20210423.225948 [8,080 B]
Get:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 libbdd-dev amd64 2.4-11build1 [454 kB]
Get:6 http://ubuntu.mirror.garr.it/ubuntu focal/main amd64 libfl2 amd64 2.6.4-6.2 [11.5 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 libbdd0c2 amd64 2.4-11build1 [51.4 kB]
Fetched 1,505 kB in 1s (1,560 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package flex.
(Reading database ... 203548 files and directories currently installed.)
Preparing to unpack .../0-flex_2.6.4-6.2_amd64.deb ...
Unpacking flex (2.6.4-6.2) ...
Selecting previously unselected package bison.
Preparing to unpack .../1-bison_2%3a3.5.1+dfsg-1_amd64.deb ...
Unpacking bison (2:3.5.1+dfsg-1) ...
Selecting previously unselected package libbdd0c2.
Preparing to unpack .../2-libbdd0c2_2.4-11build1_amd64.deb ...
Unpacking libbdd0c2 (2.4-11build1) ...
Selecting previously unselected package libbdd-dev.
Preparing to unpack .../3-libbdd-dev_2.4-11build1_amd64.deb ...
Unpacking libbdd-dev (2.4-11build1) ...
Selecting previously unselected package libfl2:amd64.
Preparing to unpack .../4-libfl2_2.6.4-6.2_amd64.deb ...
Unpacking libfl2:amd64 (2.6.4-6.2) ...
Selecting previously unselected package libfl-dev:amd64.
Preparing to unpack .../5-libfl-dev_2.6.4-6.2_amd64.deb ...
Unpacking libfl-dev:amd64 (2.6.4-6.2) ...
Selecting previously unselected package ros-noetic-tf2-bullet.
Preparing to unpack .../6-ros-noetic-tf2-bullet_0.7.5-1focal.20210423.225948_amd64.deb ...
Unpacking ros-noetic-tf2-bullet (0.7.5-1focal.20210423.225948) ...
Setting up ros-noetic-tf2-bullet (0.7.5-1focal.20210423.225948) ...
Setting up flex (2.6.4-6.2) ...
Setting up libbdd0c2 (2.4-11build1) ...
Setting up libfl2:amd64 (2.6.4-6.2) ...
Setting up bison (2:3.5.1+dfsg-1) ...
update-alternatives: using /usr/bin/bison.yacc to provide /usr/bin/yacc (yacc) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/yacc.1.gz because associated file /usr/share/man/man1/bison.yacc.1.gz (of link group yacc) doesn't exist
Setting up libfl-dev:amd64 (2.6.4-6.2) ...
Setting up libbdd-dev (2.4-11build1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
The other steps: download and install the package
# from inside the workspace/src folder
git clone https://github.com/KCL-Planning/rosplan
cd ..
rm -rf devel build
catkin build
Error with catkin build
:
(base) root@35ff54b0625c:~/test_ws# rm -rf devel build
(base) root@35ff54b0625c:~/test_ws# catkin build
--------------------------------------------------
Profile: default
Extending: [env] /opt/ros/noetic
Workspace: /root/test_ws
--------------------------------------------------
Build Space: [exists] /root/test_ws/build
Devel Space: [exists] /root/test_ws/devel
Install Space: [unused] /root/test_ws/install
Log Space: [missing] /root/test_ws/logs
Source Space: [exists] /root/test_ws/src
DESTDIR: [unused] None
--------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
--------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
--------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
--------------------------------------------------
Workspace configuration appears valid.
--------------------------------------------------
[build] Found '10' packages in 0.0 seconds.
[build] Updating package table.
Warning: generated devel space setup files have been deleted.
Starting >>> catkin_tools_prebuild
__________________________________________________________________________________________________________________________________________________________________________________________________________________
Errors << catkin_tools_prebuild:cmake /root/test_ws/logs/catkin_tools_prebuild/build.cmake.000.log
CMake Error at /opt/ros/noetic/share/catkin/cmake/empy.cmake:30 (message):
Unable to find either executable 'empy' or Python module 'em'... try
installing the package 'python3-empy'
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:4 (find_package)
cd /root/test_ws/build/catkin_tools_prebuild; catkin build --get-env catkin_tools_prebuild | catkin env -si /usr/bin/cmake /root/test_ws/build/catkin_tools_prebuild --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/root/test_ws/devel/.private/catkin_tools_prebuild -DCMAKE_INSTALL_PREFIX=/root/test_ws/install; cd -
..................................................................................................................................................................................................................
Failed << catkin_tools_prebuild:cmake [ Exited with code 1 ]
Failed <<< catkin_tools_prebuild [ 0.4 seconds ]
Abandoned <<< rosplan [ Unrelated job failed ]
Abandoned <<< rosplan_action_interface [ Unrelated job failed ]
Abandoned <<< rosplan_dispatch_msgs [ Unrelated job failed ]
Abandoned <<< rosplan_knowledge_msgs [ Unrelated job failed ]
Abandoned <<< rosplan_dependencies [ Unrelated job failed ]
Abandoned <<< rosplan_knowledge_base [ Unrelated job failed ]
Abandoned <<< rosplan_planning_system [ Unrelated job failed ]
Abandoned <<< rosplan_rqt [ Unrelated job failed ]
Abandoned <<< rosplan_sensing_interface [ Unrelated job failed ]
Abandoned <<< rt2_assignment_2 [ Unrelated job failed ]
[build] Summary: 0 of 11 packages succeeded.
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: 10 packages were abandoned.
[build] Failed: 1 packages failed.
[build] Runtime: 0.5 seconds total.
Error with catkin_make
: (I don't have Anaconda on this Docker container!)
(base) root@35ff54b0625c:~/test_ws# catkin_make
Base path: /root/test_ws
Source space: /root/test_ws/src
Build space: /root/test_ws/build
Devel space: /root/test_ws/devel
Install space: /root/test_ws/install
####
#### Running command: "cmake /root/test_ws/src -DCATKIN_DEVEL_PREFIX=/root/test_ws/devel -DCMAKE_INSTALL_PREFIX=/root/test_ws/install -G Unix Makefiles" in "/root/test_ws/build"
####
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /root/test_ws/devel
-- Using CMAKE_PREFIX_PATH: /root/test_ws/devel;/opt/ros/noetic
-- This workspace overlays: /root/test_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /root/anaconda3/bin/python3 (found suitable version "3.9.7", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /root/anaconda3/bin/python3
-- Using Debian Python package layout
-- Could NOT find PY_em (missing: PY_EM)
CMake Error at /opt/ros/noetic/share/catkin/cmake/empy.cmake:30 (message):
Unable to find either executable 'empy' or Python module 'em'... try
installing the package 'python3-empy'
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:58 (find_package)
-- Configuring incomplete, errors occurred!
See also "/root/test_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed
It seems like a catkin config error.
🔗 the error reported in this GitHub Issue is identical to the one I had with catkin_make
.
Use this to compile:
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
It almost works. Only one error is issued:
[ 73%] Building CXX object rosplan/rosplan_dependencies/CMakeFiles/rddl_parser.dir/rddl_parser/logical_expressions.cc.o
/root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.cc: In member function \u2018void TaskAnalyzer::analyzeTask(int, int)\u2019:
/root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.cc:29:43: error: implicitly-declared \u2018State& State::operator=(const State&)\u2019 is deprecated [-Werror=deprecated-copy]
29 | currentState = State(nextState);
| ^
In file included from /root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.h:4,
from /root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.cc:1:
/root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/states.h:22:5: note: because \u2018State\u2019 has user-provided \u2018State::State(const State&)\u2019
22 | State(State const& other) : state(other.state) {}
| ^~~~~
/root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.cc:31:44: error: implicitly-declared \u2018State& State::operator=(const State&)\u2019 is deprecated [-Werror=deprecated-copy]
31 | currentState = State(task->CPFs);
| ^
In file included from /root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.h:4,
from /root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/task_analyzer.cc:1:
/root/test_ws/src/rosplan/rosplan_dependencies/rddl_parser/states.h:22:5: note: because \u2018State\u2019 has user-provided \u2018State::State(const State&)\u2019
22 | State(State const& other) : state(other.state) {}
| ^~~~~
🔗 here's a promising post about this problem in Noetic.
🔗 in particular, here's the pull request for Noetic
ROSPlan is compatible with Kinetic only! Wonderful...
🔗 his branch should be a good base, already compiled for Kinetic.
# run this inside the root folder of the workspace
git clone https://github.com/programmatoroSeduto/ros-plan -b rosplan-devel .
git remote add repo https://github.com/programmatoroSeduto/ros-plan
The package is ready to be used. catkin_make
doesn't recompile a package already compiled, hence it should work.