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

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. ROS
  4. Issue sending custom odometry to PX4 via MAVROS

Issue sending custom odometry to PX4 via MAVROS

Scheduled Pinned Locked Moved ROS
3 Posts 2 Posters 2.8k 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
    Judoor 0
    Regular
    wrote on last edited by
    #1

    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
    0
    • J Judoor 0

      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 Offline
      T Offline
      teddy.zaremba
      Contributor
      wrote on last edited by teddy.zaremba
      #2

      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
      1
      • T 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 Offline
        J Offline
        Judoor 0
        Regular
        wrote on last edited by
        #3

        Hi @teddy-zaremba,

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

        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