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

    Unable to subscribe to vehicle_command_position topic

    Ask your questions right here!
    2
    3
    290
    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.
    • Darshit DesaiD
      Darshit Desai
      last edited by Darshit Desai

      Hi @Moderator I have been trying to subscribe to vehicle_local_position ROS2 PX4 topic in my code but that wasn't working so I checked by echoing the topic directly from the terminal and it shows this error?

      c39768a1-c454-4f6f-a893-6aca2dc148c2-image.png

      After doing some search online, I found that the PX4 and px4_msgs version might be different, since I am using voxl_ros2_foxy any ideas why this would be happening?

      Voxl version info

      voxl2:~/ros2_ws/src/Project_LegionAir(ROS2-port)$ voxl-version
      --------------------------------------------------------------------------------
      system-image: 1.7.1-M0054-14.1a-perf-nightly-20231025
      kernel:       #1 SMP PREEMPT Thu Oct 26 03:25:38 UTC 2023 4.19.125
      --------------------------------------------------------------------------------
      hw version:   M0054
      --------------------------------------------------------------------------------
      voxl-suite:   1.1.2
      --------------------------------------------------------------------------------
      Packages:
      Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/
      Last Updated: 2024-05-07 06:01:21
      List:
      	libmodal-cv                 0.4.0
      	libmodal-exposure           0.1.0
      	libmodal-journal            0.2.2
      	libmodal-json               0.4.3
      	libmodal-pipe               2.9.2
      	libqrb5165-io               0.4.2
      	libvoxl-cci-direct          0.2.1
      	libvoxl-cutils              0.1.1
      	mv-voxl                     0.1-r0
      	qrb5165-bind                0.1-r0
      	qrb5165-dfs-server          0.2.0
      	qrb5165-imu-server          1.0.1
      	qrb5165-rangefinder-server  0.1.1
      	qrb5165-slpi-test-sig       01-r0
      	qrb5165-system-tweaks       0.2.3
      	qrb5165-tflite              2.8.0-2
      	voxl-bind-spektrum          0.1.0
      	voxl-camera-calibration     0.5.3
      	voxl-camera-server          1.8.9.1
      	voxl-configurator           0.4.8
      	voxl-cpu-monitor            0.4.7
      	voxl-docker-support         1.3.0
      	voxl-elrs                   0.1.3
      	voxl-esc                    1.3.7
      	voxl-feature-tracker        0.3.2
      	voxl-flow-server            0.3.3
      	voxl-gphoto2-server         0.0.10
      	voxl-jpeg-turbo             2.1.3-5
      	voxl-lepton-server          1.2.0
      	voxl-libgphoto2             0.0.4
      	voxl-libuvc                 1.0.7
      	voxl-logger                 0.3.5
      	voxl-mavcam-manager         0.5.3
      	voxl-mavlink                0.1.1
      	voxl-mavlink-server         1.3.2
      	voxl-microdds-agent         2.4.1-0
      	voxl-modem                  1.0.8
      	voxl-mongoose               7.7.0-1
      	voxl-mpa-to-ros             0.3.7
      	voxl-mpa-to-ros2            0.0.2
      	voxl-mpa-tools              1.1.3
      	voxl-neopixel-manager       0.0.3
      	voxl-opencv                 4.5.5-2
      	voxl-portal                 0.6.3
      	voxl-px4                    1.14.0-2.0.63
      	voxl-px4-imu-server         0.1.2
      	voxl-px4-params             0.3.3
      	voxl-qvio-server            1.0.0
      	voxl-remote-id              0.0.9
      	voxl-ros2-foxy              0.0.1
      	voxl-streamer               0.7.4
      	voxl-suite                  1.1.2
      	voxl-tag-detector           0.0.4
      	voxl-tflite-server          0.3.2
      	voxl-utils                  1.3.3
      	voxl-uvc-server             0.1.6
      	voxl-vision-hub             1.7.3
      	voxl2-system-image          1.7.1-r0
      	voxl2-wlan                  1.0-r0
      --------------------------------------------------------------------------------
      
      1 Reply Last reply Reply Quote 0
      • B
        brahim
        last edited by

        What px4_msgs branch or tag are you using? Please post the branch name. The px4_msgs repo branch is in lockstep with the PX4 branch release, so if there is a mismatch I would expect deserialization issues.

        B 1 Reply Last reply Reply Quote 0
        • B
          brahim @brahim
          last edited by brahim

          @Darshit-Desai Here is the output from echo'ing local position.

          voxl2:~/colcon_ws$ ros2 topic list
          /fmu/in/obstacle_distance
          /fmu/in/offboard_control_mode
          /fmu/in/onboard_computer_status
          /fmu/in/sensor_optical_flow
          /fmu/in/telemetry_status
          /fmu/in/trajectory_setpoint
          /fmu/in/vehicle_attitude_setpoint
          /fmu/in/vehicle_command
          /fmu/in/vehicle_mocap_odometry
          /fmu/in/vehicle_rates_setpoint
          /fmu/in/vehicle_trajectory_bezier
          /fmu/in/vehicle_trajectory_waypoint
          /fmu/in/vehicle_visual_odometry
          /fmu/out/failsafe_flags
          /fmu/out/position_setpoint_triplet
          /fmu/out/sensor_combined
          /fmu/out/timesync_status
          /fmu/out/vehicle_attitude
          /fmu/out/vehicle_control_mode
          /fmu/out/vehicle_local_position
          /fmu/out/vehicle_odometry
          /fmu/out/vehicle_status
          /parameter_events
          /rosout
          voxl2:~/colcon_ws$ ros2 topic echo /fmu/out/vehicle_local_position
          timestamp: 1716299017260605
          timestamp_sample: 1716299017259933
          xy_valid: false
          z_valid: true
          v_xy_valid: false
          v_z_valid: true
          x: -0.015882886946201324
          y: -0.006520443130284548
          z: 3.26619815826416
          delta_xy: [-9.292006097894046e-08, -1.9959152552928572e-07]
          xy_reset_counter: 1
          delta_z: 0.0
          z_reset_counter: 1
          vx: 0.0007984319818206131
          vy: -0.001192234456539154
          vz: 0.006735446862876415
          z_deriv: 0.014136962592601776
          delta_vxy: [-1.0643154382705688e-05, -2.2861408069729805e-05]
          vxy_reset_counter: 1
          delta_vz: 1.583993434906006e-05
          vz_reset_counter: 1
          ax: 0.042993903160095215
          ay: -0.06323475390672684
          az: -0.10127022862434387
          heading: -0.12067540735006332
          delta_heading: 0.0
          heading_reset_counter: 0
          heading_good_for_control: false
          xy_global: false
          z_global: false
          ref_timestamp: 0
          ref_lat: .nan
          ref_lon: .nan
          ref_alt: .nan
          dist_bottom: 0.10000000149011612
          dist_bottom_valid: false
          dist_bottom_sensor_bitfield: 0
          eph: 0.012850395403802395
          epv: 0.3351651430130005
          evh: 0.04047877714037895
          evv: 0.06853056699037552
          dead_reckoning: true
          vxy_max: .inf
          vz_max: .inf
          hagl_min: .inf
          hagl_max: .inf
          ---
          
          

          Voxl version

          system-image: 1.7.4-M0054-14.1a-perf
          kernel:       #1 SMP PREEMPT Fri Feb 9 21:59:24 UTC 2024 4.19.125
          --------------------------------------------------------------------------------
          hw platform:  M0054
          mach.var:     1.0
          --------------------------------------------------------------------------------
          voxl-suite:   1.1.3-1
          Packages:
          Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/
          Last Updated: 2024-05-21 13:30:13
          List:
          kernel-module-voxl-fsync-mod-4.19.125     1.0-r0
          kernel-module-voxl-gpio-mod-4.19.125      1.0-r0
          kernel-module-voxl-platform-mod-4.19.125  1.0-r0
          libmodal-cv                               0.4.0
          libmodal-exposure                         0.1.0
          libmodal-journal                          0.2.2
          libmodal-json                             0.4.3
          libmodal-pipe                             2.9.2
          libqrb5165-io                             0.4.2
          libvoxl-cci-direct                        0.2.1
          libvoxl-cutils                            0.1.1
          mv-voxl                                   0.1-r0
          qrb5165-bind                              0.1-r0
          qrb5165-dfs-server                        0.2.0
          qrb5165-imu-server                        1.0.1
          qrb5165-rangefinder-server                0.1.1
          qrb5165-slpi-test-sig                     01-r0
          qrb5165-system-tweaks                     0.2.6
          qrb5165-tflite                            2.8.0-2
          voxl-bind-spektrum                        0.1.0
          voxl-camera-calibration                   0.5.3
          voxl-camera-server                        1.8.9
          voxl-ceres-solver                         2:1.14.0-10
          voxl-configurator                         0.5.2
          voxl-cpu-monitor                          0.4.7
          voxl-docker-support                       1.3.0
          voxl-elrs                                 0.1.3
          voxl-esc                                  1.4.0
          voxl-feature-tracker                      0.3.2
          voxl-flow-server                          0.3.3
          voxl-fsync-mod                            1.0-r0
          voxl-gphoto2-server                       0.0.10
          voxl-gpio-mod                             1.0-r0
          voxl-jpeg-turbo                           2.1.3-5
          voxl-lepton-server                        1.2.0
          voxl-libgphoto2                           0.0.4
          voxl-libuvc                               1.0.7
          voxl-logger                               0.3.5
          voxl-mavcam-manager                       0.5.3
          voxl-mavlink                              0.1.1
          voxl-mavlink-server                       1.3.2
          voxl-microdds-agent                       2.4.1-0
          voxl-modem                                1.0.8
          voxl-mongoose                             7.7.0-1
          voxl-mpa-to-ros                           0.3.7
          voxl-mpa-to-ros2                          0.0.2
          voxl-mpa-tools                            1.1.3
          voxl-neopixel-manager                     0.0.3
          voxl-open-vins                            0.4.4
          voxl-open-vins-server                     0.2.18
          voxl-opencv                               4.5.5-2
          voxl-platform-mod                         1.0-r0
          voxl-portal                               0.6.3
          voxl-px4                                  1.14.0-2.0.63
          voxl-px4-imu-server                       0.1.2
          voxl-px4-params                           0.3.3
          voxl-qvio-server                          1.0.0
          voxl-remote-id                            0.0.9
          voxl-ros2-foxy                            0.0.1
          voxl-streamer                             0.7.4
          voxl-suite                                1.1.3-1
          voxl-tag-detector                         0.0.4
          voxl-tflite-server                        0.3.1
          voxl-utils                                1.3.8
          voxl-uvc-server                           0.1.6
          voxl-vision-hub                           1.7.3
          voxl2-system-image                        1.7.4-r0
          voxl2-wlan                                1.0-r0
          --------------------------------------------------------------------------------
          
          

          px4_msgs branch

          voxl2:~/colcon_ws/src/px4_msgs(release/1.14)$ git branch
          * release/1.14
          
          
          1 Reply Last reply Reply Quote 0
          • J jmltt referenced this topic on
          • First post
            Last post
          Powered by NodeBB | Contributors