Package 'ros1_bridge' not found
Hello , I am trying to build the ros1_bridge between ros 2 humble and ros 1 from Ubuntu packages. I am using docker (ubuntu 22 image) and I follow the instructions mentioned here https://docs.ros.org/en/humble/How-To... .
After building the bridge inside the docker container successfully (using the command : colcon build --symlink-install --cmake-force-configure
) and sourcing the bridge workspace , I run the command : ros2 run ros1_bridge dynamic_bridge
and I end up with error : Package 'ros1_bridge' not found
. The package ros1_bridge
is located in the src
folder of the bridge workspace and also available in the install
folder. Does anyone have a solution ? Thanks in advance.
Here is my dockerfile :
FROM ubuntu:jammy
CMD ["bash"]
RUN apt update && apt install locales
RUN locale-gen en_US en_US.UTF-8
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
RUN export LANG=en_US.UTF-8
RUN apt -y install software-properties-common
RUN add-apt-repository universe
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
wget \
gnupg2 \
lsb-release \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
RUN apt-get update && \
apt-get install -yq tzdata && \
ln -fs /usr/share/zoneinfo/Europe/Germany /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt update && apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-flake8 \
python3-flake8-blind-except \
python3-flake8-builtins \
python3-flake8-class-newline \
python3-flake8-comprehensions \
python3-flake8-deprecated \
python3-flake8-docstrings \
python3-flake8-import-order \
python3-flake8-quotes \
python3-pip \
python3-pytest \
python3-pytest-cov \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget
RUN mkdir -p ~/ros2_humble/src
WORKDIR /root/ros2_humble
RUN vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos src
RUN apt -y upgrade \
&& rosdep init \
&& rosdep update \
&& rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers"
WORKDIR /root/ros2_humble
RUN colcon build --symlink-install
#--------------------------------------------------------------------------------
RUN mkdir -p ~/bridging
RUN mkdir -p /root/bridging/ros2ws/src
WORKDIR /root/bridging/ros2ws
RUN . ~/ros2_humble/install/local_setup.sh \
&& colcon build
#--------------------------------------------------------------------------------
RUN rm -r /etc/apt/sources.list.d/ros2.list
#--------------------------------------------------------------------------------
WORKDIR /root
RUN apt-get update \
&& apt remove -y python3-catkin-pkg-modules \
&& apt-get install -q -y --no-install-recommends ros-core-dev \
&& rm -rf /var/lib/apt/lists/*
#--------------------------------------------------------------------------------
RUN mkdir -p /root/bridging/ros1ws/src
WORKDIR /root/bridging/ros1ws
RUN export ROS_VERSION=1 \
&& catkin_make
#--------------------------------------------------------------------------------
RUN mkdir -p /root/bridging/bridgews/src
WORKDIR /root/bridging/bridgews/src
RUN git clone https://github.com/ros2/ros1_bridge.git
local_setup.sh
before runningros1_bridge
?printenv | grep PYTHONPATH
?I tried to reproduce your error. But the Dockerfile provided by you is not leading to a succesfull build...
Where are you compiling
ros1_bridge
? This dockerfile does not seem to be following the src build procedure documented in the Readme at https://github.com/ros2/ros1_bridge.git