PX4-ROS2 VIO navigation in GPS denied condition

HI guys,

I’m trying to replicate what has been already done for ROS with MAVROS, but this time with ROS2, having a pose external source (T265, ecc…) replacing the GPS.
I’ve already configured the system, installing on a RPi, ROS2 and Fast DDS, checking that everithing worked as described in https://docs.px4.io/master/en/ros/ros2_comm.html.

The sw setup is made up by 2 nodes:

  • the offboard node (the same in px4_ros_com package) to set the offboard node, arming and sending position commands
  • the second node simply takes the data coming from the external source and publish on the topic /fmu/vehicle_visual_odometry/in

I’ve also set two parameters:

  • EKF2_AID_MASK: 24 (external position + external yaw)
  • EKF2_HGT_MODE: 3 (vision)
  • CBRK_GPSFAIL: 240024 (ignoring GPS)

Since the controllor does not pass to offboard mode, but remain in stabilize mode, I’m wondering what I am missing.
I remember that the ROS implementation there is also a node (set_origin.py) which sends (through mavros) messages to mavlink, containing the cooridnates of the starting point (MAVLink_set_gps_global_origin_message and MAVLink_set_home_position_message). If this is the problem, there is a way to solve it on ROS2, since apparently there is no topic related to it?