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

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. ROS
  4. voxl-px4 and voxl-mpa-to-ros2 message compatibility and build issues

voxl-px4 and voxl-mpa-to-ros2 message compatibility and build issues

Scheduled Pinned Locked Moved ROS
5 Posts 2 Posters 1.7k Views
  • 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.
  • J Offline
    J Offline
    jmltt
    Regular
    wrote on last edited by
    #1

    Is there are an easy way to find out which versions of voxl-px4 are compatible with which versions voxl-mpa-to-ros2? Idk if you guys are tracking this internally or not. I think it might be good to have a a tag for voxl-mpa-to-ros2 to match each sdk tag of voxl-px4 where the firmware/message definitions change. I noticed that the latest tags for for both packages have at least one message definition conflict (that happens to be the message I need to work with)

    Am I right to assume I could just drop the voxl-px4/px4-firmaware/msg directory in place of voxl-mpa-to-ros2/colcon_ws/src/px4_msgs/msg directory to match up message defintions when building voxl-mpa-to-ros2? If I take the CMakeLists.txt file out of the uorb message definition repo in the px4 firmware both message def repos look otherwise identical in terms of format


    On a side note, I'm having an issue building the voxl-mpa-to-ros2 package. I'm getting the following errors for each version I've tried (tag sdk-1.1 and sdk-1.3., master branch). This is from my last attempt.

    qrb5165-emulator:~((sdk-1.1.0))(0.0.1)$ ./build.sh qrb5165 
    Starting >>> camera_calibration_parsers
    Starting >>> image_transport
    Starting >>> px4_msgs                                                                         
    Starting >>> voxl_msgs
    Starting >>> voxl_offboard_figure8
    Finished <<< voxl_offboard_figure8 [4.82s]                                                                                                                                                
    --- stderr: px4_msgs                                                                                                                                            
    CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
      execute_process(/usr/bin/python3 -m rosidl_adapter --package-name px4_msgs
      --arguments-file
      /home/root/colcon_ws/build/px4_msgs/rosidl_adapter__arguments__px4_msgs.json
      --output-dir /home/root/colcon_ws/build/px4_msgs/rosidl_adapter/px4_msgs
      --output-file
      /home/root/colcon_ws/build/px4_msgs/rosidl_adapter/px4_msgs.idls) returned
      error code 1:
    
      AttributeError processing template 'msg.idl.em'
    
      Traceback (most recent call last):
    
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
          em.BUFFERED_OPT: True,
    
      AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
    
      
    
      During handling of the above exception, another exception occurred:
    
      
    
      Traceback (most recent call last):
    
        File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
          "__main__", mod_spec)
        File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
          exec(code, run_globals)
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__main__.py", line 19, in <module>
          sys.exit(main())
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/main.py", line 55, in main
          pathlib.Path(relative_path), output_dir)
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__init__.py", line 20, in convert_to_idl
          package_dir, package_name, interface_file, output_dir / 'msg')
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/msg/__init__.py", line 39, in convert_msg_to_idl
          expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1')
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
          content = evaluate_template(template_name, data)
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
          _interpreter.shutdown()
    
      AttributeError: 'NoneType' object has no attribute 'shutdown'
    
    Call Stack (most recent call first):
      /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
      CMakeLists.txt:28 (rosidl_generate_interfaces)
    
    
    ---
    Failed   <<< px4_msgs [13.9s, exited with code 1]
    --- stderr: voxl_msgs                                                                                                                             
    CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
      execute_process(/usr/bin/python3 -m rosidl_adapter --package-name voxl_msgs
      --arguments-file
      /home/root/colcon_ws/build/voxl_msgs/rosidl_adapter__arguments__voxl_msgs.json
      --output-dir /home/root/colcon_ws/build/voxl_msgs/rosidl_adapter/voxl_msgs
      --output-file
      /home/root/colcon_ws/build/voxl_msgs/rosidl_adapter/voxl_msgs.idls)
      returned error code 1:
    
      AttributeError processing template 'msg.idl.em'
    
      Traceback (most recent call last):
    
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
          em.BUFFERED_OPT: True,
    
      AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
    
      
    
      During handling of the above exception, another exception occurred:
    
      
    
      Traceback (most recent call last):
    
        File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
          "__main__", mod_spec)
        File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
          exec(code, run_globals)
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__main__.py", line 19, in <module>
          sys.exit(main())
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/main.py", line 55, in main
          pathlib.Path(relative_path), output_dir)
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__init__.py", line 20, in convert_to_idl
          package_dir, package_name, interface_file, output_dir / 'msg')
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/msg/__init__.py", line 39, in convert_msg_to_idl
          expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1')
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
          content = evaluate_template(template_name, data)
        File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
          _interpreter.shutdown()
    
      AttributeError: 'NoneType' object has no attribute 'shutdown'
    
    Call Stack (most recent call first):
      /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
      CMakeLists.txt:22 (rosidl_generate_interfaces)
    
    
    ---
    Failed   <<< voxl_msgs [13.9s, exited with code 1]
    Aborted  <<< camera_calibration_parsers [21.0s]                                                                         
    Aborted  <<< image_transport [22.6s]                             
    
    Summary: 1 package finished [23.8s]
      2 packages failed: px4_msgs voxl_msgs
      2 packages aborted: camera_calibration_parsers image_transport
      2 packages had stderr output: px4_msgs voxl_msgs
      4 packages not processed
    
    

    The error has been the same for each version I've tried to build. This is without making changes to the msg directory.
    Any idea why this is happening? I've built these packages in the past successfully, not sure what changed

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jmltt
      Regular
      wrote on last edited by
      #2

      tried building voxl-ros2-foxy package. I thought maybe there's an issue with installing it from install_build_dependencies.sh so I was going to build it then clone the voxl-mpa-to-ros2 project from within the docker container to try to build it. Got same error 20 min into build...

      Starting >>> rosidl_generator_c                                                                                                                           
      Starting >>> rosidl_typesupport_introspection_c                                                                                                           
      --- stderr: rosidl_generator_c                                                                                                                                                              
      CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
        execute_process(/usr/bin/python3 -m rosidl_adapter --package-name
        rosidl_generator_c --arguments-file
        /opt/ros/foxy-src/build/rosidl_generator_c/rosidl_adapter__arguments__rosidl_generator_c_interfaces.json
        --output-dir
        /opt/ros/foxy-src/build/rosidl_generator_c/rosidl_adapter/rosidl_generator_c
        --output-file
        /opt/ros/foxy-src/build/rosidl_generator_c/rosidl_adapter/rosidl_generator_c_interfaces.idls)
        returned error code 1:
      
        AttributeError processing template 'msg.idl.em'
      
        Traceback (most recent call last):
      
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
            em.BUFFERED_OPT: True,
      
        AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
      
        
      
        During handling of the above exception, another exception occurred:
      
        
      
        Traceback (most recent call last):
      
          File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
            "__main__", mod_spec)
          File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
            exec(code, run_globals)
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__main__.py", line 19, in <module>
            sys.exit(main())
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/main.py", line 55, in main
            pathlib.Path(relative_path), output_dir)
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__init__.py", line 20, in convert_to_idl
            package_dir, package_name, interface_file, output_dir / 'msg')
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/msg/__init__.py", line 39, in convert_msg_to_idl
            expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1')
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
            content = evaluate_template(template_name, data)
          File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
            _interpreter.shutdown()
      
        AttributeError: 'NoneType' object has no attribute 'shutdown'
      
      Call Stack (most recent call first):
        /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
        CMakeLists.txt:46 (rosidl_generate_interfaces)
      
      
      ---
      Failed   <<< rosidl_generator_c [29.5s, exited with code 1]
      
      

      ^ this was using dev branches and dependencies. Built inside qrb5165-emulator docker image v1.5
      Again, I did all this months ago with sdk-1.1 version of everything and had no issues.

      I was building voxl-ros2-foxy tag sdk-1.3.0 in a separate container as well. It looks like the build finished without errors, but when I run ./make_package.sh deb I get the following output"

      qrb5165-emulator:~((sdk-1.2.0))(0.0.1)$ ./make_package.sh deb 
      Package Name:  voxl-ros2-foxy
      version Number:  0.0.1
      Unknown host QEMU_IFLA type: 54
      Unknown host QEMU_IFLA type: 32820
      Unknown host QEMU_IFLA type: 56
      Unknown host QEMU_IFLA type: 57
      Unknown host QEMU_IFLA type: 54
      Unknown host QEMU_IFLA type: 32820
      Unknown host QEMU_IFLA type: 56
      Unknown host QEMU_IFLA type: 57
      run build before make_package
      
      

      I don't know where I'm supposed to run build from after already running the ./build.sh script
      ^also thought it was weird that the tag is being displayed as (sdk-1.2.0). I cloned the gitlab repo with option "-b sdk-1.3.0"

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jmltt
        Regular
        wrote on last edited by
        #3

        Ok so I just pushed version of the px4_msgs package (https://github.com/PX4/px4_msgs/tree/release/1.14) that I had updated with the latest px4-firmware message definitions to one of the vehicles (Sentinel's with latest sdk, voxl-ros2-foxy and voxl-mpa-to-ros2 downloaded via apt repository) and I'm getting a similar error when I try to build it on the voxl2:

        voxl2:~/ros2_ws$ colcon build
        Starting >>> px4_msgs
        --- stderr: px4_msgs                         
        CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
          execute_process(/usr/bin/python3 -m rosidl_adapter --package-name px4_msgs
          --arguments-file
          /home/root/ros2_ws/build/px4_msgs/rosidl_adapter__arguments__px4_msgs.json
          --output-dir /home/root/ros2_ws/build/px4_msgs/rosidl_adapter/px4_msgs
          --output-file
          /home/root/ros2_ws/build/px4_msgs/rosidl_adapter/px4_msgs.idls) returned
          error code 1:
        
          AttributeError processing template 'msg.idl.em'
        
          Traceback (most recent call last):
        
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
              em.BUFFERED_OPT: True,
        
          AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
        
          
        
          During handling of the above exception, another exception occurred:
        
          
        
          Traceback (most recent call last):
        
            File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
              "__main__", mod_spec)
            File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
              exec(code, run_globals)
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__main__.py", line 19, in <module>
              sys.exit(main())
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/main.py", line 55, in main
              pathlib.Path(relative_path), output_dir)
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__init__.py", line 20, in convert_to_idl
              package_dir, package_name, interface_file, output_dir / 'msg')
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/msg/__init__.py", line 39, in convert_msg_to_idl
              expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1')
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
              content = evaluate_template(template_name, data)
            File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template
              _interpreter.shutdown()
        
          AttributeError: 'NoneType' object has no attribute 'shutdown'
        
        Call Stack (most recent call first):
          /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
          CMakeLists.txt:28 (rosidl_generate_interfaces)
        
        
        ---
        Failed   <<< px4_msgs [5.86s, exited with code 1]
        
        Summary: 0 packages finished [6.23s]
          1 package failed: px4_msgs
          1 package had stderr output: px4_msgs
        

        Not sure what's going on here. Any help is appreciated!

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jmltt
          Regular
          wrote on last edited by
          #4

          Found the source of the build issues. This line in voxl-mpa-to-ros2

          python3 -m pip install colcon-common-extensions lark
          

          is installing an incompatible version of empy. See here:

          Link Preview Image
          empy version incompatibility · Issue #602 · colcon/colcon-core

          It seems that empy 4.0 (released ~6 h ago) has breaking changes which make colcon-core to fail miserably. This is breaking our CI as we simply install colcon and let the package manager to resolve the dependencies Steps to reproduce Doin...

          favicon

          GitHub (github.com)

          Another issue with a default sentinel/voxl2 set-up when installing ros2 I've found - need to add a sim link for libtinyxml2. I got this build error

          make[2]: *** No rule to make target '/usr/lib/aarch64-linux-gnu/libtinyxml2.so', needed by 'libpx4_msgs__rosidl_typesupport_fastrtps_cpp.so'.  Stop
          

          which I resolved via

          ln -s /usr/lib/aarch64-linux-gnu/libtinyxml2.so.6 /usr/lib/aarch64-linux-gnu/libtinyxml2.so
          

          I don't know if these issues are specific to the sentinel platform or not. I added the empy version fix to a fork of voxl-mpa-to-ros2 and will push a merge request. I'm guessing there should be a similar fix within a voxl-ros2-foxy install script or else there'll be build issues whenever trying to build a ros package onboard a vehicle that compiles ros messages (empy version issue was what was preventing me from building px4_msgs package onboard)

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

            @jmltt good find - I will test on my voxl2 once your fork has had a MR made.

            Zach

            1 Reply Last reply
            0
            • J jmltt referenced this topic on

            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