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

    Issue sending custom odometry to PX4 via MAVROS

    ROS
    2
    3
    48
    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.
    • J
      Judoor 0
      last edited by

      Hello,

      PX4 firmware: 1.15.4
      Using Starling 2.

      I’m trying to send custom odometry data to PX4 using MAVROS on ROS melodic.
      For testing, I’m publishing a message filled with zeros (except w) at 30 Hz to the topic /mavros/vision_pose/pose. Then i disabled openvins and qvio services.
      I also tried to follow this topic : https://forum.modalai.com/topic/2118/send-motion-capture-system-pose-data-to-px4/3

      However, when I check /mavros/local_position/odom, I don’t see my message. Instead, I only receive a 30hz position message from an unknown source.
      On QGC, i don't see any messages like visual pose or odometry.

      I also tried publishing to /mavros/odometry/out, but it didn’t change anything.

      Additionally, I modified some EKF2 parameters, including EKF2_EV_CTRL, following the PX4 documentation, but still no success.

      I’m not sure what I’m missing here.
      Any help or guidance would be greatly appreciated.

      Thanks!

      T 1 Reply Last reply Reply Quote 0
      • T
        teddy.zaremba @Judoor 0
        last edited by teddy.zaremba

        Hi @Judoor-0,

        That mavlink message will result in a vehicle_visual_odometry uORB see the two links below:

        • https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/mavlink/mavlink_receiver.cpp#L1339
        • https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/mavlink/mavlink_receiver.h#L329

        If you go into the mavlink console and type "listener vehicle_visual_odometry" do you see messages with the data you're publishing? That's the first step.

        The second step is getting that data to fuse. You'll need to worry about transforming the data to be in PX4's coordinate frame as well as 1.15.4 requires you publish real roll, pitch, yaw data not just 0s (does your MoCap system provide that?).

        In the end you can check you've done everything correctly by listening to vehicle_local_position and seeing the output of your MoCap system.

        J 1 Reply Last reply Reply Quote 1
        • J
          Judoor 0 @teddy.zaremba
          last edited by

          Hi @teddy-zaremba,

          The fusing part was a bit tricky, but it works now.
          Thank you!

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