ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Kyungtaek Oh 0
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 7
    • Best 1
    • Controversial 0
    • Groups 0

    Kyungtaek Oh 0

    @Kyungtaek Oh 0

    1
    Reputation
    6
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Kyungtaek Oh 0 Unfollow Follow

    Best posts made by Kyungtaek Oh 0

    • RE: Setting up micrortps bridge on VOXL2/Sentinel

      Hi @Eric-Katzfey,
      We had some finds.
      Here's what we've understood so far:

      1. Two things are needed to make a voxl-px4 package using px4-firmware(voxl-dev)
        • modalai_rb5-flight_default
        • modalai_rb5-flight_qurt
      2. And each one needs the following different crsf_parse function
        • modalai_rb5-flight_default needs crsf_parse(6 arguments)
        • modalai_rb5-flight_qrut needs crsf_parse(8 arguments)
      3. Each px4-firmware has a different version of crsf_parse
        • Branch: main has crsf_parse(6 arguments)
        • Branch: voxl-dev has crsf_parse(8 arguments)

      Our goal was to build the voxl-px4 included MicroRTPS_bridge in px4-firmware(branch: voxl-dev), so we added the following two functions to crsf.cpp in px4-firmware.

      • bool crsf_parse_buffer(uint16_t *values, uint16_t *num_values, uint16_t max_channels)
        • as crsf_parse_buffer_6
      • bool crsf_parse(const uint64_t now, const uint8_t *frame, unsigned len, uint16_t *values, uint16_t *num_values, uint16_t max_channels)
        • as crsf_parse_6

      Then the build progressed to 89% and stopped with an error below.
      ERROR #1

      [ 89%] Building CXX object src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp: In function 'int pwm_main(int, char**)':
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp:810:3: error: 'qurt_loop' was not declared in this scope
        810 |   qurt_loop = 320;
            |   ^~~~~~~~~
      compilation terminated due to -Wfatal-errors.
      make[3]: *** [src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/build.make:63: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o] Error 1
      make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[2]: *** [CMakeFiles/Makefile2:12085: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/all] Error 2
      make[2]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[1]: *** [Makefile:152: all] Error 2
      make[1]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make: *** [Makefile:222: modalai_rb5-flight_default] Error 2
      

      We changed the int qurt_loop variable's scope to like this.

      • Before
        32b86fac-1631-4048-b2ce-a29792ee533b-Untitled.png
      • After
        f6a25f03-3c63-4f66-92e4-b3181adacef6-Untitled (1).png

      After that, an error occurred for the label for jump, and it was resolved by changing it as follows.
      ERROR #2

      [ 89%] Building CXX object src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp: In function 'int pwm_main(int, char**)':
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp:864:1: error: jump to label 'err_out_no_test_2'
        864 | err_out_no_test_2:
            | ^~~~~~~~~~~~~~~~~
      compilation terminated due to -Wfatal-errors.
      make[3]: *** [src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/build.make:63: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o] Error 1
      make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[2]: *** [CMakeFiles/Makefile2:12085: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/all] Error 2
      make[2]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[1]: *** [Makefile:152: all] Error 2
      make[1]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      

      So we changed the goto command to "return 0" instead of using err_out_no_test_2 label.

      After that, the build.sh worked and the make_packages.sh also worked.(in the voxl-px4)
      However, it did not run with the following error on voxl2.
      ERROR #3

      voxl2:~$ voxl-px4
      Found DSP signature file
      /usr/bin/voxl-px4: line 42: /usr/bin/px4: cannot execute binary file: Exec format error
      

      Based on the above results, we think the voxl-px4 with microRTPS_bridge can be built by changing modalai_rb5-flight_default and modalai_rb5-flight_qurt to use the same crsf_parse.

      So if you think our thinking is correct, can you give us some guidance?
      If it is not possible in px4-firmware(branch: voxl-dev), can we build voxl-px4(included micrortps_bridge) using another branch?
      Any advice would be appreciated.

      posted in VOXL 2
      Kyungtaek Oh 0K
      Kyungtaek Oh 0

    Latest posts made by Kyungtaek Oh 0

    • RE: Stopping voxl-px4 crashes the entire system

      Hi @modaltb

      Adding to this issue. I am having the same problem where the VOXL2 board dies and doesn't fully boot up because the PX4 is crashing on bootup (Images below). Once the VOXL2 board dies I am not able to adb shell sometimes, but other times a hard reboot is good enough. The only way to fix the adb shell issue is to flash the VOXL2 board in QDL and then disable the PX4 entirely. This is occurring to all the VOXL2 boards and Sentinels I have. Not sure what is triggering the issue in the first place cause it was working fine for a couple of months before this issue started occurring. Please let me know your thoughts on this!

      Thanks!

      Screenshot from 2023-02-15 15-15-47.png

      Screenshot from 2023-02-15 15-12-47.png

      Screenshot from 2023-02-15 15-12-03.png

      posted in VOXL 2
      Kyungtaek Oh 0K
      Kyungtaek Oh 0
    • RE: Setting up micrortps bridge on VOXL2/Sentinel

      Hi @Eric-Katzfey,
      We had some finds.
      Here's what we've understood so far:

      1. Two things are needed to make a voxl-px4 package using px4-firmware(voxl-dev)
        • modalai_rb5-flight_default
        • modalai_rb5-flight_qurt
      2. And each one needs the following different crsf_parse function
        • modalai_rb5-flight_default needs crsf_parse(6 arguments)
        • modalai_rb5-flight_qrut needs crsf_parse(8 arguments)
      3. Each px4-firmware has a different version of crsf_parse
        • Branch: main has crsf_parse(6 arguments)
        • Branch: voxl-dev has crsf_parse(8 arguments)

      Our goal was to build the voxl-px4 included MicroRTPS_bridge in px4-firmware(branch: voxl-dev), so we added the following two functions to crsf.cpp in px4-firmware.

      • bool crsf_parse_buffer(uint16_t *values, uint16_t *num_values, uint16_t max_channels)
        • as crsf_parse_buffer_6
      • bool crsf_parse(const uint64_t now, const uint8_t *frame, unsigned len, uint16_t *values, uint16_t *num_values, uint16_t max_channels)
        • as crsf_parse_6

      Then the build progressed to 89% and stopped with an error below.
      ERROR #1

      [ 89%] Building CXX object src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp: In function 'int pwm_main(int, char**)':
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp:810:3: error: 'qurt_loop' was not declared in this scope
        810 |   qurt_loop = 320;
            |   ^~~~~~~~~
      compilation terminated due to -Wfatal-errors.
      make[3]: *** [src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/build.make:63: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o] Error 1
      make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[2]: *** [CMakeFiles/Makefile2:12085: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/all] Error 2
      make[2]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[1]: *** [Makefile:152: all] Error 2
      make[1]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make: *** [Makefile:222: modalai_rb5-flight_default] Error 2
      

      We changed the int qurt_loop variable's scope to like this.

      • Before
        32b86fac-1631-4048-b2ce-a29792ee533b-Untitled.png
      • After
        f6a25f03-3c63-4f66-92e4-b3181adacef6-Untitled (1).png

      After that, an error occurred for the label for jump, and it was resolved by changing it as follows.
      ERROR #2

      [ 89%] Building CXX object src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp: In function 'int pwm_main(int, char**)':
      /usr/local/workspace/px4-firmware/src/systemcmds/pwm/pwm.cpp:864:1: error: jump to label 'err_out_no_test_2'
        864 | err_out_no_test_2:
            | ^~~~~~~~~~~~~~~~~
      compilation terminated due to -Wfatal-errors.
      make[3]: *** [src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/build.make:63: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.cpp.o] Error 1
      make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[2]: *** [CMakeFiles/Makefile2:12085: src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/all] Error 2
      make[2]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[1]: *** [Makefile:152: all] Error 2
      make[1]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      

      So we changed the goto command to "return 0" instead of using err_out_no_test_2 label.

      After that, the build.sh worked and the make_packages.sh also worked.(in the voxl-px4)
      However, it did not run with the following error on voxl2.
      ERROR #3

      voxl2:~$ voxl-px4
      Found DSP signature file
      /usr/bin/voxl-px4: line 42: /usr/bin/px4: cannot execute binary file: Exec format error
      

      Based on the above results, we think the voxl-px4 with microRTPS_bridge can be built by changing modalai_rb5-flight_default and modalai_rb5-flight_qurt to use the same crsf_parse.

      So if you think our thinking is correct, can you give us some guidance?
      If it is not possible in px4-firmware(branch: voxl-dev), can we build voxl-px4(included micrortps_bridge) using another branch?
      Any advice would be appreciated.

      posted in VOXL 2
      Kyungtaek Oh 0K
      Kyungtaek Oh 0
    • RE: Setting up micrortps bridge on VOXL2/Sentinel

      Thank you @Eric-Katzfey! That sound's great!

      When I changed nothing including "default.cmake", it worked for me and it could run on voxl2.
      The error only occurred when changing default.cmake line 90.

      posted in VOXL 2
      Kyungtaek Oh 0K
      Kyungtaek Oh 0
    • RE: Setting up micrortps bridge on VOXL2/Sentinel

      Hi @modaltb ,

      I tried to build the voxl-px4 with the voxl-dev branch (which includes the micrortps_bridge).

      1. On an Ubuntu 20.04 machine, we followed the steps in VOXL 2 PX4 Build Guide to build the rb5-flight-px4-build-docker. This was successful.
      2. On the same machine, we git cloned the voxl-px4 repository and git updated the submodules (of which px4-firmware is one of them).
      3. Inside of the voxl-px4 directory, we ran ./run_docker.sh, which started the docker container and gave us a shell inside the docker container (at /usr/local/workspace).
      4. Inside of the docker, at /usr/local/workspace, we installed fastrtpsgen (i.e., Fast-DDS, Fast-DDS-python, Fast-DDS-Gen).
      5. We then ran the following commands:
      git clone px4-firmware
      cd px4-firmware
      git checkout voxl-dev
      git submodule update --init --recursive
      vi px4-firmware/board/modalai/rb5-flight/default.cmake
      # Uncomment the micrortps_bridge at line 90
      # save and exit
      cd /usr/local/workspace
      source /home/build-env.sh
      ./clean.sh 
      ./build.sh
      

      This last step failed with two errors:

      ERROR #1

      -- fastrtpsgen version 1.0.4
      Traceback (most recent call last):
        File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 233, in <module>
          else Classifier(os.path.join(msg_dir, args.yaml_file), msg_dir))
        File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 55, in __init__
          self.check_if_listed(yaml_file)
        File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 139, in check_if_listed
          raise AssertionError(
      AssertionError: 
      The following messages are not listen under  /usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_message_ids.yaml: imu_server, parameter_server_set_used_request, parameter_server_set_used_response, parameter_client_reset_response, mavlink, parameter_client_set_value_response, parameter_server_set_value_request, parameter_server_set_value_response, parameter_client_reset_request, parameter_client_set_value_request
      
      Please add them to the yaml file with the respective ID and, if applicable, mark them to be sent or received by the micro-RTPS bridge.
      NOTE: If the message has multi-topics (#TOPICS), these should be added as well.
      
      CMake Error at src/modules/micrortps_bridge/CMakeLists.txt:58 (string):
        string sub-command FIND requires 3 or 4 parameters.
      
      
      Traceback (most recent call last):
        File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 233, in <module>
          else Classifier(os.path.join(msg_dir, args.yaml_file), msg_dir))
        File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 55, in __init__
          self.check_if_listed(yaml_file)
        File "/usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_classifier.py", line 139, in check_if_listed
          raise AssertionError(
      AssertionError: 
      The following messages are not listen under  /usr/local/workspace/px4-firmware/msg/tools/uorb_rtps_message_ids.yaml: imu_server, parameter_server_set_used_request, parameter_server_set_used_response, parameter_client_reset_response, mavlink, parameter_client_set_value_response, parameter_server_set_value_request, parameter_server_set_value_response, parameter_client_reset_request, parameter_client_set_value_request
      
      Please add them to the yaml file with the respective ID and, if applicable, mark them to be sent or received by the micro-RTPS bridge.
      NOTE: If the message has multi-topics (#TOPICS), these should be added as well.
      
      CMake Error at src/modules/micrortps_bridge/CMakeLists.txt:74 (string):
        string sub-command FIND requires 3 or 4 parameters.
      

      We checked the uorb_rtps_message_ids.yaml which specifies the message’s id. It doesn't have the messages described in the error line. Can you help us whether we should add these message_ids to the file (or remove them from elsewhere)?

      ERROR #2

      [ 45%] Built target rc
      make[3]: Entering directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      Scanning dependencies of target lib__rc__rc_tests
      make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[3]: Entering directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      [ 45%] Building CXX object src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/RCTest.cpp.o
      /usr/local/workspace/px4-firmware/src/lib/rc/rc_tests/RCTest.cpp: In member function ‘bool RCTest::crsfTest()’:
      /usr/local/workspace/px4-firmware/src/lib/rc/rc_tests/RCTest.cpp:96:88: error: too few arguments to function ‘uint32_t crsf_parse(uint64_t, const uint8_t*, unsigned int, uint16_t*, uint16_t*, uint16_t, uint8_t*, uint8_t*)’
         96 |    bool result = crsf_parse(now, frame, frame_len, rc_values, &num_values, max_channels);
            |                                                                                        ^
      compilation terminated due to -Wfatal-errors.
      make[3]: *** [src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/build.make:63: src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/RCTest.cpp.o] Error 1
      make[3]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[2]: *** [CMakeFiles/Makefile2:8186: src/lib/rc/rc_tests/CMakeFiles/lib__rc__rc_tests.dir/all] Error 2
      make[2]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make[1]: *** [Makefile:152: all] Error 2
      make[1]: Leaving directory '/usr/local/workspace/px4-firmware/build/modalai_rb5-flight_default'
      make: *** [Makefile:222: modalai_rb5-flight_default] Error 2
      

      We checked the crsf_parse and it requires two additional arguments, leading us to believe that we have mismatched code versions. Can you help us know whether this is true (and if so, how we can bring all the SW versions into sync)?

      For reference, the complete log from running build.sh can be found here

      posted in VOXL 2
      Kyungtaek Oh 0K
      Kyungtaek Oh 0
    • How to send the GPS data to the Drone

      Hello.

      We are planning on a project without a GPS sensor.
      First, the way we consider was qvio, but it failed sometime for an unknown reason.
      So we tried to find some way how to send estimated GPS data to the drone, and the fake GPS looked suitable.
      I checked the fake_gps codes in PX4-Autopilot and mavros, but it looked like a way for the HITL, not for the real control.(If I understood correctly, the HITL is for the simulation world using real hardware)
      So is there a way to send custom GPS data to the drone?

      posted in Ask your questions right here!
      Kyungtaek Oh 0K
      Kyungtaek Oh 0
    • RE: cannot connect usb camera over USB - C adb port

      Hi,

      I'm interested in connecting the lightwarelidar sensor(SF45/B) to VOXL2 using USB C too.
      I tried two settings to connect to the VOXL2 of the Sentinel drone.

      • LiDAR - (Micro-USB 3.0) - USB hub(USB C) - VOXL2
      • LiDAR - (Micro-USB 3.0) - USB hub(USB C)
        • USB hub(USB C) - VOXL2 (for power)
        • USB hub(USB C) - USB A - 4pin JST connector - Microhard Modem

      After connecting, I did the lsusb command, but couldn't see the device.
      If connecting to a microhard modem using a 4-pin connector is the right way to use a LiDAR sensor, I wonder what port names are available in the /dev directory.
      If not, is there a recommended configuration for the LiDAR connection to VOXL2?

      Thank you

      posted in VOXL 2
      Kyungtaek Oh 0K
      Kyungtaek Oh 0
    • Question regarding the Microhard Mesh operation mode

      Hi, ModalAI engineers,
      I want to use several microhards in mesh operation mode and know exactly how the mesh works.
      However, there is not enough information about the mesh in the document to understand the mesh and expect the result.
      So, could you tell me the algorithms used in the mesh operation mode and how it works?

      posted in Microhard Modems
      Kyungtaek Oh 0K
      Kyungtaek Oh 0