aiorospy hangs creating a server
brean opened this issue · 3 comments
Hi,
I created some aiorospy-docker container as base to use in my research projects, but when I run it it just hangs instead of waiting <1s and printing three -
:
make up && make logs
aiorospy-example container log:
aiorospy | python3.7 -u --version
aiorospy | Python 3.7.3
aiorospy | python3.7 -u actions.py
aiorospy | Client: Asking server to work for 0.181s
ROS container log:
ros | ... logging to /root/.ros/log/4fdd5b82-ce59-11e9-a97f-0242ac1d0002/roslaunch-20987dbb560c-1.log
ros | Checking log directory for disk usage. This may take awhile.
ros | Press Ctrl-C to interrupt
ros | Done checking log file disk usage. Usage is <1GB.
ros |
ros | started roslaunch server http://ros:43571/
ros | ros_comm version 1.14.3
ros |
ros |
ros | SUMMARY
ros | ========
ros |
ros | PARAMETERS
ros | * /rosdistro: melodic
ros | * /rosversion: 1.14.3
ros |
ros | NODES
ros |
ros | auto-starting new master
ros | process[master]: started with pid [38]
ros | ROS_MASTER_URI=http://ros:11311/
ros |
ros | setting /run_id to 4fdd5b82-ce59-11e9-a97f-0242ac1d0002
ros | process[rosout-1]: started with pid [49]
ros | started core service [/rosout]
I am still quite new to ROS so can you maybe hint me some tips to debug this?
Am I just not seeing some exception that might get thrown or did I not install the environment correctly (I just run python3.7 -m pip install aiorospy/aiorospy
through the requirements.txt
on the checked out aiorospy folder).
Or might this also be a bug in aiorospy?
Hi @brean, sorry for the late reply. I've taken a look through the linked docker bringup, and I'm having some trouble following how the test is run.
How we use aiorospy is as a standard ROS package - you can clone it into a catkin workspace, run catkin build, and then run the tests (https://catkin-tools.readthedocs.io/en/latest/quick_start.html). It should work on top of ROS melodic, though at the moment you'd need to install python3.7 via https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.
To chase this issue further, I'd request you provide a reproducible example - adding a failing test to the aiorospy package is really the best possible version of this.
Hi Paul!
Thank you for taking the time to looking into it, really appreciate it!
I tried to install it using the ppa, but I am getting the error that it can not find packaging.requirements
.
Do you see what I am doing wrong here?
see also my Dockerfile: https://github.com/brean/aiorospy-docker/blob/install_catkin/ros-python3/Dockerfile
The build log:
-- Build files have been written to: /catkin_ws/build
Scanning dependencies of target test_catkin_virtualenv_generate_virtualenv
Scanning dependencies of target aiorospy_generate_virtualenv
Scanning dependencies of target aiorospy_examples_generate_virtualenv
Scanning dependencies of target test_catkin_virtualenv_inherited_generate_virtualenv
Scanning dependencies of target test_catkin_virtualenv_py3_generate_virtualenv
Scanning dependencies of target test_catkin_virtualenv_py3_isolated_generate_virtualenv
[ 11%] Generating ../../generated_requirements.txt
[ 11%] Generating ../../generated_requirements.txt
[ 16%] Generating ../../generated_requirements.txt
[ 22%] Generating ../../generated_requirements.txt
[ 33%] Generating ../../generated_requirements.txt
[ 33%] Generating ../../generated_requirements.txt
Traceback (most recent call last):
File "/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 27, in <module>
from packaging.requirements import Requirement, InvalidRequirement
ImportError: No module named packaging.requirements
aiorospy/aiorospy_examples/CMakeFiles/aiorospy_examples_generate_virtualenv.dir/build.make:71: recipe for target 'generated_requirements.txt' failed
make[2]: *** [generated_requirements.txt] Error 1
CMakeFiles/Makefile2:3113: recipe for target 'aiorospy/aiorospy_examples/CMakeFiles/aiorospy_examples_generate_virtualenv.dir/all' failed
make[1]: *** [aiorospy/aiorospy_examples/CMakeFiles/aiorospy_examples_generate_virtualenv.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 27, in <module>
Traceback (most recent call last):
File "/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 27, in <module>
from packaging.requirements import Requirement, InvalidRequirement
ImportError: No module named packaging.requirements
from packaging.requirements import Requirement, InvalidRequirement
ImportError: No module named packaging.requirements
make[2]: *** [generated_requirements.txt] Error 1
catkin_virtualenv/test_catkin_virtualenv/CMakeFiles/test_catkin_virtualenv_generate_virtualenv.dir/build.make:70: recipe for target 'generated_requirements.txt' failed
make[1]: *** [catkin_virtualenv/test_catkin_virtualenv/CMakeFiles/test_catkin_virtualenv_generate_virtualenv.dir/all] Error 2
CMakeFiles/Makefile2:1746: recipe for target 'catkin_virtualenv/test_catkin_virtualenv/CMakeFiles/test_catkin_virtualenv_generate_virtualenv.dir/all' failed
aiorospy/aiorospy/CMakeFiles/aiorospy_generate_virtualenv.dir/build.make:70: recipe for target 'generated_requirements.txt' failed
make[2]: *** [generated_requirements.txt] Error 1
CMakeFiles/Makefile2:1030: recipe for target 'aiorospy/aiorospy/CMakeFiles/aiorospy_generate_virtualenv.dir/all' failed
make[1]: *** [aiorospy/aiorospy/CMakeFiles/aiorospy_generate_virtualenv.dir/all] Error 2
Traceback (most recent call last):
File "/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 27, in <module>
from packaging.requirements import Requirement, InvalidRequirement
ImportError: No module named packaging.requirements
catkin_virtualenv/test_catkin_virtualenv_py3_isolated/CMakeFiles/test_catkin_virtualenv_py3_isolated_generate_virtualenv.dir/build.make:70: recipe for target 'generated_requirements.txt' failed
make[2]: *** [generated_requirements.txt] Error 1
CMakeFiles/Makefile2:2724: recipe for target 'catkin_virtualenv/test_catkin_virtualenv_py3_isolated/CMakeFiles/test_catkin_virtualenv_py3_isolated_generate_virtualenv.dir/all' failed
make[1]: *** [catkin_virtualenv/test_catkin_virtualenv_py3_isolated/CMakeFiles/test_catkin_virtualenv_py3_isolated_generate_virtualenv.dir/all] Error 2
Traceback (most recent call last):
File "/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 27, in <module>
from packaging.requirements import Requirement, InvalidRequirement
ImportError: No module named packaging.requirements
catkin_virtualenv/test_catkin_virtualenv_inherited/CMakeFiles/test_catkin_virtualenv_inherited_generate_virtualenv.dir/build.make:71: recipe for target 'generated_requirements.txt' failed
make[2]: *** [generated_requirements.txt] Error 1
CMakeFiles/Makefile2:2005: recipe for target 'catkin_virtualenv/test_catkin_virtualenv_inherited/CMakeFiles/test_catkin_virtualenv_inherited_generate_virtualenv.dir/all' failed
make[1]: *** [catkin_virtualenv/test_catkin_virtualenv_inherited/CMakeFiles/test_catkin_virtualenv_inherited_generate_virtualenv.dir/all] Error 2
Traceback (most recent call last):
File "/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 27, in <module>
from packaging.requirements import Requirement, InvalidRequirement
ImportError: No module named packaging.requirements
make[2]: *** [generated_requirements.txt] Error 1
catkin_virtualenv/test_catkin_virtualenv_py3/CMakeFiles/test_catkin_virtualenv_py3_generate_virtualenv.dir/build.make:70: recipe for target 'generated_requirements.txt' failed
CMakeFiles/Makefile2:2302: recipe for target 'catkin_virtualenv/test_catkin_virtualenv_py3/CMakeFiles/test_catkin_virtualenv_py3_generate_virtualenv.dir/all' failed
make[1]: *** [catkin_virtualenv/test_catkin_virtualenv_py3/CMakeFiles/test_catkin_virtualenv_py3_generate_virtualenv.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Base path: /catkin_ws
Source space: /catkin_ws/src
Build space: /catkin_ws/build
Devel space: /catkin_ws/devel
Install space: /catkin_ws/install
####
#### Running command: "cmake /catkin_ws/src -DCATKIN_DEVEL_PREFIX=/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/catkin_ws/install -G Unix Makefiles" in "/catkin_ws/build"
####
####
#### Running command: "make -j8 -l8" in "/catkin_ws/build"
####
Invoking "make -j8 -l8" failed
The command '/bin/bash -c source /catkin_ws/devel/setup.bash && cd /catkin_ws/src && git clone https://github.com/locusrobotics/catkin_virtualenv.git && git clone https://github.com/locusrobotics/aiorospy.git && cd /catkin_ws/src/aiorospy/aiorospy && cd /catkin_ws/ && catkin_make' returned a non-zero code: 1
Makefile:15: recipe for target 'build' failed
make: *** [build] Error 1
Sorry for the delay, here's something to poke at:
FROM ros:melodic-ros-base as ros-python3
# install python 3
RUN apt-get -y update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get -y update && \
apt-get install -y python3.7-dev python3.7-venv python-catkin-tools
SHELL ["/bin/bash", "-c"]
# create catkin workspace
RUN mkdir -p /catkin_ws/src && \
cd /catkin_ws/src && \
git clone https://github.com/locusrobotics/aiorospy.git && \
rosdep update && rosdep install --from-paths . --skip-keys python3.7 --ignore-src -y
RUN cd /catkin_ws && \
catkin config --extend /opt/ros/melodic && \
catkin build
RUN touch .bashrc && echo "source /catkin_ws/devel/setup.bash" >> ~/.bashrc
However, I still can't replicate any kind of issues with the action server wrapper. Feel free to re-open if you have a MWE I can work off.