Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. ROS foxy PCL ROS

ROS foxy PCL ROS

Scheduled Pinned Locked Moved Ask your questions right here!
7 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Darshit DesaiD Offline
    Darshit DesaiD Offline
    Darshit Desai
    Regular
    wrote on last edited by
    #1

    Hi for VOXL2 I have tried installing PCL ROS for foxy it always gives an error unable to locate packages, may I know any alternatives or plans to include this? I checked the same in my native desktop ubuntu18.04+foxy, it is able to install the same

    Darshit DesaiD 1 Reply Last reply
    0
    • Darshit DesaiD Darshit Desai

      Hi for VOXL2 I have tried installing PCL ROS for foxy it always gives an error unable to locate packages, may I know any alternatives or plans to include this? I checked the same in my native desktop ubuntu18.04+foxy, it is able to install the same

      Darshit DesaiD Offline
      Darshit DesaiD Offline
      Darshit Desai
      Regular
      wrote on last edited by
      #2

      @Moderator it seems that since the voxl-ros2-foxy is just using a rosinstall generator its just installing lesser than bare bones foxy which is needed for building mpatoros2. If I mention pcl_ros in the rosdep install line and the rosinstall generator line would that also make a .deb file with that installed in it?

      #!/bin/bash
      #
      # builds everything without installing
      #
      # Modal AI Inc. 2023
      # author: zachary.lowell@ascendengineer.com
      
      
      set -e
      
      AVAILABLE_PLATFORMS="qrb5165"
      
      print_usage(){
          echo ""
          echo " Build the current project based on platform target."
          echo ""
          echo " Usage:"
          echo ""
          echo "  ./build.sh qrb5165"
          echo "        Build 64-bit binaries for qrb5165"
          echo ""
          echo ""
      }
      
      
      
      case "$1" in
          qrb5165)
              ROS_DIST="foxy"
              ;;
      
          *)
              print_usage
              exit 1
              ;;
      esac
      
      current_dir=$(pwd)
      
      sudo apt purge --auto-remove -y cmake
      sudo apt update
      sudo apt install --fix-missing
      sudo apt install -y python3-pip
      sudo apt install -y software-properties-common
      sudo apt install -y ca-certificates gpg wget
      sudo apt-get update
      
      # manually obtain copy of keyring
      test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
      
      echo "adding kitware repository to sources"
      echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
      sudo apt-get update
      
      #sudo apt-get install kitware-archive-keyring
      
      sudo apt install -y cmake
      sudo apt install -y qtcreator qtbase5-dev qt5-qmake
      python3 -m pip install lark
      
      ROS_PKG=ros_base
      ROS_DISTRO=foxy
      # Core ROS2 workspace - the "underlay"
      ROS_BUILD_ROOT=/opt/ros/${ROS_DISTRO}-src
      ROS_INSTALL_ROOT=/opt/ros/${ROS_DISTRO}
      
      locale  # check for UTF-8
      
      sudo apt update && sudo apt install locales
      sudo locale-gen en_US en_US.UTF-8
      sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
      export LANG=en_US.UTF-8
      
      # Add the ROS 2 apt repository
      sudo apt-get update
      sudo apt-get install -y --no-install-recommends \
                      curl \
                      wget \
                      gnupg2 \
                      lsb-release
      sudo rm -rf /var/lib/apt/lists/*
      
      wget --no-check-certificate https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
      sudo apt-key add ros.asc
      sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
      
      # install development packages
      sudo apt-get update
      sudo apt-get install -y libeigen3-dev
      sudo cp -r /usr/include/eigen3/Eigen /usr/include
      sudo apt-get install -y --no-install-recommends \
                      build-essential \
                      git \
                      libbullet-dev \
                      libpython3-dev \
                      python3-flake8 \
                      python3-pip \
                      python3-pytest-cov \
                      python3-rosdep \
                      python3-setuptools \
                      python3-vcstool \
                      python3-rosinstall-generator \
                      python3-numpy \
      		libasio-dev \
                      libtinyxml2-dev \
                      libcunit1-dev
      sudo rm -rf /var/lib/apt/lists/*
      
      # install some pip packages needed for testing
      python3 -m pip install -U \
                      colcon-common-extensions \
                      argcomplete \
                      flake8-blind-except \
                      flake8-builtins \
                      flake8-class-newline \
                      flake8-comprehensions \
                      flake8-deprecated \
                      flake8-docstrings \
                      flake8-import-order \
                      flake8-quotes \
                      pytest-repeat \
                      pytest-rerunfailures \
                      pytest
      
      # compile yaml-cpp-0.6, which some ROS packages may use (but is not in the 18.04 apt repo)
      git clone --branch yaml-cpp-0.6.0 https://github.com/jbeder/yaml-cpp yaml-cpp-0.6 && \
          cd yaml-cpp-0.6 && \
          mkdir build && \
          cd build && \
          cmake -DBUILD_SHARED_LIBS=ON .. && \
          make -j$(nproc) && \
          sudo cp libyaml-cpp.so.0.6.0 /usr/lib/aarch64-linux-gnu/ && \
          sudo ln -s /usr/lib/aarch64-linux-gnu/libyaml-cpp.so.0.6.0 /usr/lib/aarch64-linux-gnu/libyaml-cpp.so.0.6
          
      
      # https://answers.ros.org/question/325245/minimal-ros2-installation/?answer=325249#post-id-325249
      sudo mkdir -p ${ROS_BUILD_ROOT}/src && \
        cd ${ROS_BUILD_ROOT}
      sudo sh -c "rosinstall_generator --deps --rosdistro ${ROS_DISTRO} ${ROS_PKG} pcl_ros pcl_conversions launch_xml launch_yaml example_interfaces > ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall && \
      cat ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall && \
          vcs import src < ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall"
      
      # download unreleased packages
      sudo sh -c "git clone --branch ros2 https://github.com/Kukanani/vision_msgs ${ROS_BUILD_ROOT}/src/vision_msgs && \
          git clone --branch ${ROS_DISTRO} https://github.com/ros2/demos demos && \
          cp -r demos/demo_nodes_cpp ${ROS_BUILD_ROOT}/src && \
          cp -r demos/demo_nodes_py ${ROS_BUILD_ROOT}/src && \
          rm -r -f demos"
      
      # install dependencies using rosdep
      sudo apt-get update
          cd ${ROS_BUILD_ROOT}
      sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list
      sudo rosdep init
          rosdep update && \
          rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers qt_gui" pcl_ros pcl_conversions && \
          sudo rm -rf /var/lib/apt/lists/*
      
      # build it!
      sudo mkdir -p ${ROS_INSTALL_ROOT}
      # sudo required to write build logs
      sudo colcon build --merge-install --install-base ${ROS_INSTALL_ROOT} --packages-skip vision_msgs_rviz_plugins
      
      cd $current_dir
      
      mkdir -p misc_files/opt/ros/${ROS_DIST}/
      cp -r /opt/ros/foxy/*  misc_files/opt/ros/${ROS_DIST}/
      chmod -R 777 misc_files
      
      
      Darshit DesaiD 1 Reply Last reply
      0
      • Darshit DesaiD Darshit Desai

        @Moderator it seems that since the voxl-ros2-foxy is just using a rosinstall generator its just installing lesser than bare bones foxy which is needed for building mpatoros2. If I mention pcl_ros in the rosdep install line and the rosinstall generator line would that also make a .deb file with that installed in it?

        #!/bin/bash
        #
        # builds everything without installing
        #
        # Modal AI Inc. 2023
        # author: zachary.lowell@ascendengineer.com
        
        
        set -e
        
        AVAILABLE_PLATFORMS="qrb5165"
        
        print_usage(){
            echo ""
            echo " Build the current project based on platform target."
            echo ""
            echo " Usage:"
            echo ""
            echo "  ./build.sh qrb5165"
            echo "        Build 64-bit binaries for qrb5165"
            echo ""
            echo ""
        }
        
        
        
        case "$1" in
            qrb5165)
                ROS_DIST="foxy"
                ;;
        
            *)
                print_usage
                exit 1
                ;;
        esac
        
        current_dir=$(pwd)
        
        sudo apt purge --auto-remove -y cmake
        sudo apt update
        sudo apt install --fix-missing
        sudo apt install -y python3-pip
        sudo apt install -y software-properties-common
        sudo apt install -y ca-certificates gpg wget
        sudo apt-get update
        
        # manually obtain copy of keyring
        test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
        
        echo "adding kitware repository to sources"
        echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
        sudo apt-get update
        
        #sudo apt-get install kitware-archive-keyring
        
        sudo apt install -y cmake
        sudo apt install -y qtcreator qtbase5-dev qt5-qmake
        python3 -m pip install lark
        
        ROS_PKG=ros_base
        ROS_DISTRO=foxy
        # Core ROS2 workspace - the "underlay"
        ROS_BUILD_ROOT=/opt/ros/${ROS_DISTRO}-src
        ROS_INSTALL_ROOT=/opt/ros/${ROS_DISTRO}
        
        locale  # check for UTF-8
        
        sudo apt update && sudo apt install locales
        sudo locale-gen en_US en_US.UTF-8
        sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
        export LANG=en_US.UTF-8
        
        # Add the ROS 2 apt repository
        sudo apt-get update
        sudo apt-get install -y --no-install-recommends \
                        curl \
                        wget \
                        gnupg2 \
                        lsb-release
        sudo rm -rf /var/lib/apt/lists/*
        
        wget --no-check-certificate https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
        sudo apt-key add ros.asc
        sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
        
        # install development packages
        sudo apt-get update
        sudo apt-get install -y libeigen3-dev
        sudo cp -r /usr/include/eigen3/Eigen /usr/include
        sudo apt-get install -y --no-install-recommends \
                        build-essential \
                        git \
                        libbullet-dev \
                        libpython3-dev \
                        python3-flake8 \
                        python3-pip \
                        python3-pytest-cov \
                        python3-rosdep \
                        python3-setuptools \
                        python3-vcstool \
                        python3-rosinstall-generator \
                        python3-numpy \
        		libasio-dev \
                        libtinyxml2-dev \
                        libcunit1-dev
        sudo rm -rf /var/lib/apt/lists/*
        
        # install some pip packages needed for testing
        python3 -m pip install -U \
                        colcon-common-extensions \
                        argcomplete \
                        flake8-blind-except \
                        flake8-builtins \
                        flake8-class-newline \
                        flake8-comprehensions \
                        flake8-deprecated \
                        flake8-docstrings \
                        flake8-import-order \
                        flake8-quotes \
                        pytest-repeat \
                        pytest-rerunfailures \
                        pytest
        
        # compile yaml-cpp-0.6, which some ROS packages may use (but is not in the 18.04 apt repo)
        git clone --branch yaml-cpp-0.6.0 https://github.com/jbeder/yaml-cpp yaml-cpp-0.6 && \
            cd yaml-cpp-0.6 && \
            mkdir build && \
            cd build && \
            cmake -DBUILD_SHARED_LIBS=ON .. && \
            make -j$(nproc) && \
            sudo cp libyaml-cpp.so.0.6.0 /usr/lib/aarch64-linux-gnu/ && \
            sudo ln -s /usr/lib/aarch64-linux-gnu/libyaml-cpp.so.0.6.0 /usr/lib/aarch64-linux-gnu/libyaml-cpp.so.0.6
            
        
        # https://answers.ros.org/question/325245/minimal-ros2-installation/?answer=325249#post-id-325249
        sudo mkdir -p ${ROS_BUILD_ROOT}/src && \
          cd ${ROS_BUILD_ROOT}
        sudo sh -c "rosinstall_generator --deps --rosdistro ${ROS_DISTRO} ${ROS_PKG} pcl_ros pcl_conversions launch_xml launch_yaml example_interfaces > ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall && \
        cat ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall && \
            vcs import src < ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall"
        
        # download unreleased packages
        sudo sh -c "git clone --branch ros2 https://github.com/Kukanani/vision_msgs ${ROS_BUILD_ROOT}/src/vision_msgs && \
            git clone --branch ${ROS_DISTRO} https://github.com/ros2/demos demos && \
            cp -r demos/demo_nodes_cpp ${ROS_BUILD_ROOT}/src && \
            cp -r demos/demo_nodes_py ${ROS_BUILD_ROOT}/src && \
            rm -r -f demos"
        
        # install dependencies using rosdep
        sudo apt-get update
            cd ${ROS_BUILD_ROOT}
        sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list
        sudo rosdep init
            rosdep update && \
            rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers qt_gui" pcl_ros pcl_conversions && \
            sudo rm -rf /var/lib/apt/lists/*
        
        # build it!
        sudo mkdir -p ${ROS_INSTALL_ROOT}
        # sudo required to write build logs
        sudo colcon build --merge-install --install-base ${ROS_INSTALL_ROOT} --packages-skip vision_msgs_rviz_plugins
        
        cd $current_dir
        
        mkdir -p misc_files/opt/ros/${ROS_DIST}/
        cp -r /opt/ros/foxy/*  misc_files/opt/ros/${ROS_DIST}/
        chmod -R 777 misc_files
        
        
        Darshit DesaiD Offline
        Darshit DesaiD Offline
        Darshit Desai
        Regular
        wrote on last edited by
        #3

        @Moderator I have tried building from source the pcl_conversions and pcl_msgs interfaces and using it in my workspace but when I try to build it, I get this very huge error which I cannot understand the context, So I thought that pcl_conversions might be causing that error so I removed that package entirely from my workspace and modified my code not to use it, and I almost get the same huge error. I am not sure why?

        It is able to build one package which just does a simple static tf transform but other than that it is not able to build the ones doing rigid body transformations.

        I have attached the files of the simple tf static publisher package here which the ros2 foxy is able to build: https://drive.google.com/drive/folders/1ztfUPCP5LBFMhwHVekq7Z8GiAV2sKDT7?usp=sharing

        I am also able to build the pcl_conversions and pcl_msgs from source in my workspace successfully, the tee'd output is here: https://drive.google.com/file/d/1uUnfCSvEmzaRdQDuqrffW-mAJky9wCao/view?usp=drive_link

        The only main package which is the backbone of my sensor fusion code isn't able to build both with the pcl_conversions package included and without it which just uses vanilla ros functions, their package links are here,
        pcl_msgs: https://github.com/ros-perception/pcl_msgs/tree/ros2
        pcl_conversions: https://github.com/ros-perception/perception_pcl/tree/ros2

        Vanilla ros function rigid body transformer tee'd error file: https://drive.google.com/file/d/1yVQS8FGBL1S6wfqPgEWjVe9JiV7SbR4g/view?usp=drive_link
        Package link: https://drive.google.com/drive/folders/1e_ucTv8ohAXtaPGEpLEprF6KQB8hN_O9?usp=sharing

        PCL_conversion included rigid body transformer tee'd build error file: https://drive.google.com/file/d/1uL2qk2i4GmZD0wu4TtNs3l_ACGUiZLCA/view?usp=sharing
        package link: https://drive.google.com/drive/folders/1Ep-Vn_Hr-xDXreqI9nW1r5lzcfx929Z1?usp=sharing

        Note installing packages from source is very tedious I don't know why the functionality of apt install was removed and the ros2-foxy is being built from a rosinstall generator, but doing such a thing makes the use of ros2 limited to just mpatoros2 node which isn't much because I still need to install a docker container now to use ros2 libraries if this doesn't work. (https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-ros2-foxy/-/blob/master/build.sh?ref_type=heads#L139)

        ModeratorM 1 Reply Last reply
        0
        • Darshit DesaiD Darshit Desai

          @Moderator I have tried building from source the pcl_conversions and pcl_msgs interfaces and using it in my workspace but when I try to build it, I get this very huge error which I cannot understand the context, So I thought that pcl_conversions might be causing that error so I removed that package entirely from my workspace and modified my code not to use it, and I almost get the same huge error. I am not sure why?

          It is able to build one package which just does a simple static tf transform but other than that it is not able to build the ones doing rigid body transformations.

          I have attached the files of the simple tf static publisher package here which the ros2 foxy is able to build: https://drive.google.com/drive/folders/1ztfUPCP5LBFMhwHVekq7Z8GiAV2sKDT7?usp=sharing

          I am also able to build the pcl_conversions and pcl_msgs from source in my workspace successfully, the tee'd output is here: https://drive.google.com/file/d/1uUnfCSvEmzaRdQDuqrffW-mAJky9wCao/view?usp=drive_link

          The only main package which is the backbone of my sensor fusion code isn't able to build both with the pcl_conversions package included and without it which just uses vanilla ros functions, their package links are here,
          pcl_msgs: https://github.com/ros-perception/pcl_msgs/tree/ros2
          pcl_conversions: https://github.com/ros-perception/perception_pcl/tree/ros2

          Vanilla ros function rigid body transformer tee'd error file: https://drive.google.com/file/d/1yVQS8FGBL1S6wfqPgEWjVe9JiV7SbR4g/view?usp=drive_link
          Package link: https://drive.google.com/drive/folders/1e_ucTv8ohAXtaPGEpLEprF6KQB8hN_O9?usp=sharing

          PCL_conversion included rigid body transformer tee'd build error file: https://drive.google.com/file/d/1uL2qk2i4GmZD0wu4TtNs3l_ACGUiZLCA/view?usp=sharing
          package link: https://drive.google.com/drive/folders/1Ep-Vn_Hr-xDXreqI9nW1r5lzcfx929Z1?usp=sharing

          Note installing packages from source is very tedious I don't know why the functionality of apt install was removed and the ros2-foxy is being built from a rosinstall generator, but doing such a thing makes the use of ros2 limited to just mpatoros2 node which isn't much because I still need to install a docker container now to use ros2 libraries if this doesn't work. (https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-ros2-foxy/-/blob/master/build.sh?ref_type=heads#L139)

          ModeratorM Offline
          ModeratorM Offline
          Moderator
          ModalAI Team
          wrote on last edited by
          #4

          @Darshit-Desai We will see if others have any insight on how to solve your compilation issues. It's likely though we do not have more insight than you would have as the developer. A Docker may be your best approach for custom ROS installs

          Darshit DesaiD 1 Reply Last reply
          0
          • ModeratorM Moderator

            @Darshit-Desai We will see if others have any insight on how to solve your compilation issues. It's likely though we do not have more insight than you would have as the developer. A Docker may be your best approach for custom ROS installs

            Darshit DesaiD Offline
            Darshit DesaiD Offline
            Darshit Desai
            Regular
            wrote on last edited by
            #5

            @Moderator I just wanted to clarify something, if I am building a ubuntu ros 22.04 humble image it should be arm64 version right? Specifically arm64/v8, this is the architecture which VOXL2 has right?

            https://hub.docker.com/layers/library/ros/humble-ros-core-jammy/images/sha256-07123e8516d8c513f7e583b7377dfc00821eeacd74f657e389f2f399a8745e05?context=explore

            1 Reply Last reply
            0
            • Zachary Lowell 0Z Offline
              Zachary Lowell 0Z Offline
              Zachary Lowell 0
              ModalAI Team
              wrote on last edited by
              #6

              @Darshit-Desai said in ROS foxy PCL ROS:

              know

              @Darshit-Desai I am unsure if I am following what you are trying to do - we do not support installing third party ros2 packages on the disk as it may conflict with some of the VOXL-sdk we have on their, a good example of this is something like opencv.

              As for using a ubuntu ros 22.04 humble docker image you should be using the arm64 version correct. arm64/v8 provided by OSRF should work out the gate on the voxl2.

              Hopefully this helps. Cheers!

              Darshit DesaiD 1 Reply Last reply
              0
              • Zachary Lowell 0Z Zachary Lowell 0

                @Darshit-Desai said in ROS foxy PCL ROS:

                know

                @Darshit-Desai I am unsure if I am following what you are trying to do - we do not support installing third party ros2 packages on the disk as it may conflict with some of the VOXL-sdk we have on their, a good example of this is something like opencv.

                As for using a ubuntu ros 22.04 humble docker image you should be using the arm64 version correct. arm64/v8 provided by OSRF should work out the gate on the voxl2.

                Hopefully this helps. Cheers!

                Darshit DesaiD Offline
                Darshit DesaiD Offline
                Darshit Desai
                Regular
                wrote on last edited by
                #7

                @Zachary-Lowell-0 Yes I was able to install docker of u22.04, but at the same time when I was running everything on natively in melodic on the drone I was able to use 3rd party libraries like PCL ROS and I was able to install it, this was because the ROS installation was left on the user. I just thought it would be same with ROS2. Although now I have set up ARM64 dockers in my desktop ubuntu so now I can make as many changes on my desktop and just push the new docker

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                ModalAI
                Categories Recent Tags ModalAI.com Docs
                © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups