Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odas_ros (ROS2) in a Dockerfile #34

Open
kyle-redyeti opened this issue Jun 3, 2024 · 1 comment
Open

odas_ros (ROS2) in a Dockerfile #34

kyle-redyeti opened this issue Jun 3, 2024 · 1 comment

Comments

@kyle-redyeti
Copy link

kyle-redyeti commented Jun 3, 2024

I have been trying to set up odas_ros from the ros2-migration branch and I keep getting errors when attempting to build
my Dockerfile looks like this:

"""
FROM ros:humble-ros-base
RUN apt update && apt upgrade -y
RUN apt install -y git-all cmake gcc build-essential libfftw3-dev libconfig-dev libasound2-dev libpulse-dev libgfortran-*-dev perl
RUN apt install -y python3-pip
RUN apt-get install -y gfortran texinfo

RUN /bin/bash -c 'source /opt/ros/humble/setup.bash &&
mkdir -p ~/ament_ws/src &&
cd ~/ament_ws/src &&
git clone -b ros2-migration https://github.com/introlab/audio_utils.git &&
pip install libconf &&
cd audio_utils &&
git submodule update --init --recursive &&
cd ~/ament_ws/src &&
git clone -b ros2-migration https://github.com/introlab/odas_ros.git &&
cd odas_ros &&
git submodule update --init --recursive &&
cd ~/ament_ws &&
source /opt/ros/humble/setup.bash &&
rosdep install --from-paths src -i -r -n -y &&
colcon build &&
source install/setup.bash'

ADD config/respeaker_usb_4_mic_array.cfg ~/ament_ws/src/odas_ros/config/configuration.cfg
"""

It seems to fall apart trying to build audio_utils...

CMake Error at /opt/ros/humble/share/ament_cmake_python/cmake/ament_python_install_package.cmake:122 (add_custom_target):
add_custom_target cannot create target
"ament_cmake_python_copy_audio_utils" because another target with the same
name already exists. The existing target is a custom target created in
source directory "/root/ament_ws/src/audio_utils". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_python/cmake/ament_python_install_package.cmake:39 (_ament_cmake_python_install_package)
CMakeLists.txt:125 (ament_python_install_package)

CMake Error at /opt/ros/humble/share/ament_cmake_python/cmake/ament_python_install_package.cmake:141 (add_custom_target):
add_custom_target cannot create target
"ament_cmake_python_build_audio_utils_egg" because another target with the
same name already exists. The existing target is a custom target created
in source directory "/root/ament_ws/src/audio_utils". See documentation
for policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_python/cmake/ament_python_install_package.cmake:39 (_ament_cmake_python_install_package)
CMakeLists.txt:125 (ament_python_install_package)

Oh... and I am trying to build and run the docker container on a RaspberryPi 5

Thanks!

Kyle

@philippewarren
Copy link
Contributor

The ros2-migration branch was a work in progress. Can you try again using the new ros2 branch? Also, make sure to use the ros2 branch for audio_utils too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants