ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Without any code or details it'll be hard for anyone here to support you. Given how old the code is you will likely run into issue when trying to compile it on more recent operating systems. As the instructions above refer to ROS Indigo you may have the most luck using that ROS EOL distro.

docker run -it --rm ros:indigo

apt update && apt upgrade -y
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
# creating a fake package with your packages as dependencies
# here you should mount / clone your package instead
catkin_create_pkg package_needing_pcl_ros roscpp pcl_ros sensor_msgs
cd ~/catkin_ws
rosdep update --include-eol-distro
rosdep install -y --from-paths src --ignore-src --rosdistro indigo

Without any code or details it'll be hard for anyone here to support you. Given how old the code is you will likely run into issue when trying to compile it on more recent operating systems. As the instructions above refer to ROS Indigo you may have the most luck using that ROS EOL distro.

docker run -it --rm ros:indigo

apt update && apt upgrade -y
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
# creating a fake package with your packages as dependencies
# here you should mount / clone your package instead
catkin_create_pkg package_needing_pcl_ros roscpp pcl_ros sensor_msgs
cd ~/catkin_ws
rosdep update --include-eol-distro
rosdep install -y --from-paths src --ignore-src --rosdistro indigo

EDIT:

I did try source, or I think I did, because source wont work in docker so I simply did /bin/bash /opt/ros/____/setup.bash

Docker uses sh, you can use . instead of source: . /opt/ros/kinetic/setup.sh. This should be done after installing dependencies via rosdep and before building your workspace

You don't need to build catkin from source it'll be installed by rosdep.

the installation of the 3 dependencies now work

Are you sure ?

The rosdep invocation seems off as it's pointing to the src folder while the current directory is already the ROS package directory. I don't think it's installing any dependencies. But I guess it doesnt matter as you're already installing ros-kinetic-desktop-full that happens to bring in all your dependencies


Removing the commented out code, removing catkin from source build and fixing up the rosdep + compile invocation, the Dockerfile would look like:

FROM ubuntu:xenial

COPY quanergy_client-master_xenial.zip /home/project/quanergy_client-master.zip
COPY quanergy_client_ros-master_xenial.zip /home/project/quanergy_client_ros-master.zip

RUN apt-get update && apt-get install -y cmake build-essential lsb-core unzip

RUN cd /home/project/ && unzip quanergy_client-master.zip && unzip quanergy_client_ros-master.zip

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cmake git build-essential libboost-all-dev libpcl-dev libproj-dev libvtk6-dev libusb-1.0-0.dev

RUN cd /home/project/quanergy_client-master_xenial/quanergy_client-master && cmake . && make && make install && cd ..

RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'\
    && apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654\
    && apt-get update && apt-get install -y python-rosdep \
    && rosdep init && rosdep update 

RUN cd /home/project/ && cd quanergy_client_ros-master && ls\
    && rosdep install -y --from-paths . --ignore-src --rosdistro kinetic
RUN ln -s /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0
RUN cd /home/project/ && cd quanergy_client_ros-master \
    && . /opt/ros/kinetic/setup.sh && cmake . && make

Without any code or details it'll be hard for anyone here to support you. Given how old the code is you will likely run into issue when trying to compile it on more recent operating systems. As the instructions above refer to ROS Indigo you may have the most luck using that ROS EOL distro.

docker run -it --rm ros:indigo

apt update && apt upgrade -y
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
# creating a fake package with your packages as dependencies
# here you should mount / clone your package instead
catkin_create_pkg package_needing_pcl_ros roscpp pcl_ros sensor_msgs
cd ~/catkin_ws
rosdep update --include-eol-distro
rosdep install -y --from-paths src --ignore-src --rosdistro indigo

EDIT:

I did try source, or I think I did, because source wont work in docker so I simply did /bin/bash /opt/ros/____/setup.bash

Docker uses sh, you can use . instead of source: . /opt/ros/kinetic/setup.sh. This should be done after installing dependencies via rosdep and before building your workspace

You don't need to build catkin from source it'll be installed by rosdep.

the installation of the 3 dependencies now work

Are you sure ?

The rosdep invocation seems off as it's pointing to the src folder while the current directory is already the ROS package directory. I don't think it's installing any dependencies. But I guess it doesnt matter as you're already installing ros-kinetic-desktop-full that happens to bring in all your dependencies


Removing the commented out code, removing catkin from source build and fixing up the rosdep + compile invocation, the Dockerfile would look like:

FROM ubuntu:xenial

COPY quanergy_client-master_xenial.zip /home/project/quanergy_client-master.zip
COPY quanergy_client_ros-master_xenial.zip /home/project/quanergy_client_ros-master.zip

RUN apt-get update && apt-get install -y cmake build-essential lsb-core unzip

RUN cd /home/project/ && unzip quanergy_client-master.zip && unzip quanergy_client_ros-master.zip

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cmake git build-essential libboost-all-dev libpcl-dev libproj-dev libvtk6-dev libusb-1.0-0.dev

RUN cd /home/project/quanergy_client-master_xenial/quanergy_client-master && cmake . && make && make install && cd ..

RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'\
    && apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654\
    && apt-get update && apt-get install -y python-rosdep \
    && rosdep init && rosdep update 

RUN cd /home/project/ && cd quanergy_client_ros-master && ls\
    && rosdep install -y --from-paths . --ignore-src --rosdistro kinetic
RUN ln -s /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0
RUN cd /home/project/ && cd quanergy_client_ros-master \
    && . /opt/ros/kinetic/setup.sh && cmake . && make