ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node stopped by ros2 bag record /hires_small_encoded

    ROS
    5
    9
    375
    Loading More Posts
    • 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.
    • T
      tahawaru
      last edited by

      Hi

      I'm recording with the ros2 bag record the topics I get from running
      rb5:~$ ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node

      On a different terminal I run
      rb5:~/ROS2_recordings$ ros2 bag record /hires_small_encoded

      then on the first terminal, I get
      rb5:~$ ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node
      Found new interface: hires_large_color
      Found new interface: hires_large_encoded
      Found new interface: hires_large_grey
      Found new interface: hires_small_color
      Found new interface: hires_small_encoded
      Found new interface: hires_small_grey
      Found new interface: hires_snapshot
      Found new interface: qvio_overlay
      Found new interface: stereo_front
      Found new interface: stereo_rear
      Found new interface: tracking
      Found new interface: imu_px4
      Found new interface: voa_pc_out
      Found new interface: vvhub_body_wrt_fixed
      Found new interface: vvhub_body_wrt_local
      Found new interface: qvio
      Interface hires_small_encoded now publishing
      terminate called after throwing an instance of 'std::bad_alloc'
      what(): std::bad_alloc
      rb5:~$

      Any help on this?

      1 Reply Last reply Reply Quote 0
      • N
        nuallaino
        last edited by

        @tahawaru I have also seen this, but with subscribing to the topic in rviz2 rather than recording a ros2 bag.

        ModeratorM 1 Reply Last reply Reply Quote 0
        • ModeratorM
          Moderator ModalAI Team @nuallaino
          last edited by

          @nuallaino that looks like a bug in the interface listing. The encoded interfaces are h264 which voxl-mpa-to-ros2 doesn't look like it supports

          1 Reply Last reply Reply Quote 0
          • Zachary Lowell 0Z
            Zachary Lowell 0 ModalAI Team
            last edited by

            @tahawaru @nuallaino what happens when you build from source dev branch push the deb and then rerun the ros2 code base?

            I assuming you are sourcing the right directory via voxl2:~$ source /opt/ros/foxy/mpa_to_ros2/install/setup.bash in both terminal windows prior to running the code base etc?

            I am currently unable to reproduce your error and am testing on multiple voxl2's. What is the output of voxl-inspect-cam -a? Does it show the encoded frames working as expected? I have tried with both h264 and h265 on the voxl2 so far and have had no luck reproducing your error. I see you are on an rb5 flight though is that correct?

            T 1 Reply Last reply Reply Quote 0
            • T
              tahawaru @Zachary Lowell 0
              last edited by

              @Zachary-Lowell-0

              I have the following on my .bashrc :

              export ROS_HOME=/opt/ros/foxy
              source /opt/ros/foxy/local_setup.bash
              source /opt/ros/foxy/mpa_to_ros2/install/setup.bash
              source /opt/ros/foxy/setup.bash

              And the voxl-inspect-cam -a is as follows:

              ROS2_hires_small_encoded2.png

              1 Reply Last reply Reply Quote 0
              • Zachary Lowell 0Z
                Zachary Lowell 0 ModalAI Team
                last edited by

                @tahawaru I cannot say that I have tested this on an original rb5 board - just a voxl1 and voxl2 - works as expected on both. Have you build from source on the dev branch and installed that?

                T 1 Reply Last reply Reply Quote 0
                • T
                  tahawaru @Zachary Lowell 0
                  last edited by

                  @Zachary-Lowell-0

                  I used the docker to build the ROS2 package following the instructions here roughly 2 months ago:
                  https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2

                  *****voxl-mpa-to-ros2$ docker load -i qrb5165-emulator-v1.5.tar.gz

                  voxl-mpa-to-ros2$ docker tag qrb5165-emulator:1.5 qrb5165-emulator:latest

                  voxl-mpa-to-ros2$ voxl-docker -i qrb5165-emulator

                  qrb5165-emulator:~(master)(0.0.4)$ ./install_build_deps.sh qrb5165 dev

                  qrb5165-emulator:~(master)(0.0.4)$ ./build.sh qrb5165

                  qrb5165-emulator:~(master)(0.0.4)$ ./make_package.sh*****

                  I installed the build on the rb5:

                  *****rb5:/$ cd home/root/

                  rb5:~$ dpkg -i voxl-mpa-to-ros2_0.0.4_arm64.deb

                  rb5:~$ voxl-configure-mpa-to-ros2

                  rb5:~$ source /opt/ros/foxy/mpa_to_ros2/install/setup.bash

                  rb5:~$ ros2 topic list

                  rb5:~$ source /opt/ros/foxy/setup.bash

                  rb5:~$ ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node*****

                  ---------------------------------After restart of the RB5

                  rb5:~$ ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node

                  Found new interface: hires_large_color

                  Found new interface: hires_large_encoded

                  Found new interface: hires_large_grey

                  Found new interface: hires_small_color

                  Found new interface: hires_small_encoded

                  Found new interface: hires_small_grey

                  Found new interface: hires_snapshot

                  Found new interface: qvio_overlay

                  Found new interface: stereo

                  Found new interface: tracking

                  Found new interface: imu_px4

                  Found new interface: voa_pc_out

                  Found new interface: vvhub_body_wrt_fixed

                  Found new interface: vvhub_body_wrt_local

                  Found new interface: qvio

                  1 Reply Last reply Reply Quote 0
                  • B
                    brahim
                    last edited by

                    @tahawaru please pull down the latest dev branch: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/tree/dev?ref_type=heads

                    You can rebuild with the dev branch and see if you can both ros2 topic echo and rosbag record the encoded images. Please be aware that you will need to manually decode the images somehow on the receiving end (your application) as there isn't a built-in way in ros2/rviz to decode.

                    1 Reply Last reply Reply Quote 1
                    • Zachary Lowell 0Z
                      Zachary Lowell 0 ModalAI Team
                      last edited by

                      @tahawaru also since you are running an RB5 and not a voxl2, the most recent SDK you are running is 1.1.3 which might have dependencies in modal-pipe or modal-json that are not transferable to the newest dev branch of voxl-mpa-to-ros2 causing some form of error somewhere in the pipeline.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | Contributors