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. FC v2 Collision prevention issue with voxl 2

FC v2 Collision prevention issue with voxl 2

Scheduled Pinned Locked Moved Ask your questions right here!
19 Posts 3 Posters 1.9k 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.
  • Jetson NanoJ Jetson Nano

    @Alex-Kushleyev @Eric-Katzfey @Vinny

    I am using modalai fc v2 with voxl 2 , i am able to see the obstacle_distance message publishing in the mavlink console, but the drone is not slowing down or stopping.

    the parameters are
    mpc_pos_mode - acceleration based
    cp_dist - 1 m
    cp_no_go_data - enabled
    cp_angle - 0

    I checked with various builds and versions of PX4 from both PX4 github and Modalai github.

    can anyone help me with which version or fork it works.

    nsh> listener obstacle_distance
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 178940124 (0.026434 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [236, 237, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 184239763 (0.014512 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [236, 236, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 199589325 (0.028254 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [236, 236, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 204539470 (0.012805 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [445, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 206838947 (0.036977 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [435, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 208539592 (0.000817 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [436, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 210039039 (0.006330 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [435, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 223538159 (0.007192 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [114, 102, 98, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 129, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 225588237 (0.036362 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [93, 90, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 227187560 (0.049067 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> listener obstacle_distance 10
    
    TOPIC: obstacle_distance
     obstacle_distance
        timestamp: 228587517 (0.043813 seconds ago)
        increment: 10.00000
        angle_offset: 0.00000
        distances: [2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001]
        min_distance: 0
        max_distance: 2000
        frame: 12
        sensor_type: 4
    
    nsh> 
    
    S Offline
    S Offline
    Sean Hickey
    wrote last edited by
    #5

    @Jetson-Nano

    Looking through the PX4 codebase, the ARK Flow MR publishes to distance_sensor by default, not obstacle_distance. Have you made any changes to the codebase that would affect obstacle_distance or mounted any other sensors?

    Also, how have you mounted the ark_flow_mr. Is it pointing downwards on the vehicle, or forward pointing or some other configuration?

    Finally, have you tried setting the distance for collision prevention higher, and seeing how the drone reacts in that case?

    Jetson NanoJ 1 Reply Last reply
    0
    • S Sean Hickey

      @Jetson-Nano

      Looking through the PX4 codebase, the ARK Flow MR publishes to distance_sensor by default, not obstacle_distance. Have you made any changes to the codebase that would affect obstacle_distance or mounted any other sensors?

      Also, how have you mounted the ark_flow_mr. Is it pointing downwards on the vehicle, or forward pointing or some other configuration?

      Finally, have you tried setting the distance for collision prevention higher, and seeing how the drone reacts in that case?

      Jetson NanoJ Offline
      Jetson NanoJ Offline
      Jetson Nano
      Veteran
      wrote last edited by
      #6

      @Sean-Hickey I am using the optical flow sensor for position hold, it is attached directly to the FC.

      I am getting the obstacle_distance messages from the TOF sensor and I am able to see it.
      I did check with 1 m cp_dist and it was not working.

      S 1 Reply Last reply
      0
      • Jetson NanoJ Jetson Nano

        @Sean-Hickey I am using the optical flow sensor for position hold, it is attached directly to the FC.

        I am getting the obstacle_distance messages from the TOF sensor and I am able to see it.
        I did check with 1 m cp_dist and it was not working.

        S Offline
        S Offline
        Sean Hickey
        wrote last edited by
        #7

        @Jetson-Nano

        What TOF sensor are you using for obstacle distance?

        Just confirming, you are using the ARK Flow MR facing downwards just for optical flow and position hold, but not for collision prevention?

        Jetson NanoJ 1 Reply Last reply
        0
        • S Sean Hickey

          @Jetson-Nano

          What TOF sensor are you using for obstacle distance?

          Just confirming, you are using the ARK Flow MR facing downwards just for optical flow and position hold, but not for collision prevention?

          Jetson NanoJ Offline
          Jetson NanoJ Offline
          Jetson Nano
          Veteran
          wrote last edited by
          #8

          @Sean-Hickey PMD tof that comes with yellow board M0173 - https://docs.modalai.com/M0173/

          Yes optical flow is facing down, it is used for position hold and not for collision prevention.

          S 1 Reply Last reply
          0
          • Jetson NanoJ Jetson Nano

            @Sean-Hickey PMD tof that comes with yellow board M0173 - https://docs.modalai.com/M0173/

            Yes optical flow is facing down, it is used for position hold and not for collision prevention.

            S Offline
            S Offline
            Sean Hickey
            wrote last edited by
            #9

            @Jetson-Nano

            Can you see if you are using the MO169 or the MO178?

            Jetson NanoJ 1 Reply Last reply
            0
            • S Sean Hickey

              @Jetson-Nano

              Can you see if you are using the MO169 or the MO178?

              Jetson NanoJ Offline
              Jetson NanoJ Offline
              Jetson Nano
              Veteran
              wrote last edited by
              #10

              @Sean-Hickey I am using M0178

              S 1 Reply Last reply
              0
              • Jetson NanoJ Jetson Nano

                @Sean-Hickey I am using M0178

                S Offline
                S Offline
                Sean Hickey
                wrote last edited by Sean Hickey
                #11

                @Jetson-Nano

                I was able to identify the issue.

                mpc_pos_mode - acceleration based doesn't call Collision Prevention in any of the newest PX4 builds..

                You need to use mpc_pos_mode - Simple Position Control (0) or mpc_pos_mode - smooth position control (3).

                I was able to test this on a similar setup, and confirmed that collision prevention only worked with the mpc_pos_mode indicated above, and notably did not with mpc_pos_mode acceleration.

                Jetson NanoJ 1 Reply Last reply
                0
                • S Sean Hickey

                  @Jetson-Nano

                  I was able to identify the issue.

                  mpc_pos_mode - acceleration based doesn't call Collision Prevention in any of the newest PX4 builds..

                  You need to use mpc_pos_mode - Simple Position Control (0) or mpc_pos_mode - smooth position control (3).

                  I was able to test this on a similar setup, and confirmed that collision prevention only worked with the mpc_pos_mode indicated above, and notably did not with mpc_pos_mode acceleration.

                  Jetson NanoJ Offline
                  Jetson NanoJ Offline
                  Jetson Nano
                  Veteran
                  wrote last edited by
                  #12

                  @Sean-Hickey that great, just making sure, did you use optical flow with FC?

                  Also could you let me know which branch you used, or the Px4 built file. i want to test it out in my setup.

                  S 1 Reply Last reply
                  0
                  • Jetson NanoJ Jetson Nano

                    @Sean-Hickey that great, just making sure, did you use optical flow with FC?

                    Also could you let me know which branch you used, or the Px4 built file. i want to test it out in my setup.

                    S Offline
                    S Offline
                    Sean Hickey
                    wrote last edited by
                    #13

                    @Jetson-Nano

                    I used VIO with FC, but the path from obstacle detection to Collision Prevention is unchanged between the 2 modes.

                    I used the mainline ModalAI PX4 SDK branch. I can share the built px4 deb build with you if that's helpful, but I would try changing the mpc_pos_mode parameter first on your current build to see if that fixes your issue.

                    Jetson NanoJ 1 Reply Last reply
                    0
                    • S Sean Hickey

                      @Jetson-Nano

                      I used VIO with FC, but the path from obstacle detection to Collision Prevention is unchanged between the 2 modes.

                      I used the mainline ModalAI PX4 SDK branch. I can share the built px4 deb build with you if that's helpful, but I would try changing the mpc_pos_mode parameter first on your current build to see if that fixes your issue.

                      Jetson NanoJ Offline
                      Jetson NanoJ Offline
                      Jetson Nano
                      Veteran
                      wrote last edited by
                      #14

                      @Sean-Hickey
                      I already checked with changing the MPC_POS_MODE, did not work.

                      Could you share the file, I would like to test it out.

                      S 2 Replies Last reply
                      0
                      • Jetson NanoJ Jetson Nano

                        @Sean-Hickey
                        I already checked with changing the MPC_POS_MODE, did not work.

                        Could you share the file, I would like to test it out.

                        S Offline
                        S Offline
                        Sean Hickey
                        wrote last edited by
                        #15

                        @Jetson-Nano

                        voxl-px4_1.14.0-2.0.142_arm64.deb

                        favicon

                        Google Docs (drive.google.com)

                        I attached the link above, I am using parameters:

                        MPC_POS_MODE: Simple position control
                        CP_DIST 1.5 m
                        CP_DELAY 0.4 s
                        CP_GUIDE_ANG : 0 deg
                        CP_GO_NO_DATA: Enabled

                        1 Reply Last reply
                        0
                        • Jetson NanoJ Jetson Nano

                          @Sean-Hickey
                          I already checked with changing the MPC_POS_MODE, did not work.

                          Could you share the file, I would like to test it out.

                          S Offline
                          S Offline
                          Sean Hickey
                          wrote last edited by Sean Hickey
                          #16

                          @Jetson-Nano

                          If this doesn't work, on the mavlink console (after testing the collision prevention) call:
                          listener obstacle_distance_fused 1
                          listener collision_constraints 1

                          and let me know the results.

                          Jetson NanoJ 2 Replies Last reply
                          0
                          • S Sean Hickey

                            @Jetson-Nano

                            If this doesn't work, on the mavlink console (after testing the collision prevention) call:
                            listener obstacle_distance_fused 1
                            listener collision_constraints 1

                            and let me know the results.

                            Jetson NanoJ Offline
                            Jetson NanoJ Offline
                            Jetson Nano
                            Veteran
                            wrote last edited by Jetson Nano
                            #17

                            @Sean-Hickey
                            sorry to disturb you again .
                            I am not able to flash with the deb file, could you please share the .px4 file

                            1 Reply Last reply
                            0
                            • S Sean Hickey

                              @Jetson-Nano

                              If this doesn't work, on the mavlink console (after testing the collision prevention) call:
                              listener obstacle_distance_fused 1
                              listener collision_constraints 1

                              and let me know the results.

                              Jetson NanoJ Offline
                              Jetson NanoJ Offline
                              Jetson Nano
                              Veteran
                              wrote last edited by
                              #18

                              @Sean-Hickey

                              I tested with this firmware modalai_fc-v2_1.14.0-2.0.133.px4 from (http://voxl-packages.modalai.com/dists/fc-v2/sdk-1.6/ ) and it worked, but there is no uavcan thats the only problem.

                              I checked with the parameters you mentioned.

                              When i reduce the cp_dist it stops working but with 1.5 m it is working.

                              Eric KatzfeyE 1 Reply Last reply
                              1
                              • Jetson NanoJ Jetson Nano

                                @Sean-Hickey

                                I tested with this firmware modalai_fc-v2_1.14.0-2.0.133.px4 from (http://voxl-packages.modalai.com/dists/fc-v2/sdk-1.6/ ) and it worked, but there is no uavcan thats the only problem.

                                I checked with the parameters you mentioned.

                                When i reduce the cp_dist it stops working but with 1.5 m it is working.

                                Eric KatzfeyE Offline
                                Eric KatzfeyE Offline
                                Eric Katzfey
                                ModalAI Team
                                wrote last edited by
                                #19

                                @Jetson-Nano Can you rebuild to add UAVCAN? The code is here: https://github.com/modalai/px4-firmware/tree/v1.14.0-2.0.133-dev

                                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