Troubleshooting PX4 SITL Drone and Husky A200 Co-Simulation After ROS 2 Humble → Jazzy Migration

i had at past :

  1. Ubuntu 22.04
  2. ROS 2 Humble
  3. PX4 SITL + Gazebo Sim Harmonic (for x500)
  4. MAVROS2 for offboard

every thing worked good with QGC

i wanted to add a robot Husky A200 to the world simulation in Gazebo, and i did it (i can later send codes to you)
but i could not move the robot in a square path (ROS 2 husky_square_node), the drone works good and fly in a circle path (landing_ros2 offb_node)that i said (in both Gazebo and QGC)

i read that i should install ROS 2 Jazzy (which works by default with Ubuntu 24.04) but i found a github site that said that we can do it through the source installation, i did it after i deleted the humble:

github.com

GitHub - Mechazo11/clearpath_simulator_harmonic: A modified clearpath_simulator from Clearpath…

A modified clearpath_simulator from Clearpath Robotics that is compatible with ROS 2 Jazzy and Gazebo Harmonic

now what i want as a first step is to fix the drone alone and re run it as the past, but later i want to run both the drone and Husky in the same simulation and do a task of SLAM and Landing, that is what i aim to so please help me.

i will send what i used to do with drone:

1. Terminal 1 – PX4 SITL + Gazebo:

cd ~/PX4-Autopilotmake px4_sitl gz_x500

2. Terminal 2 – MAVROS (ROS 2):

source /opt/ros/humble/setup.bashros2 launch mavros px4.launch fcu_url:=“udp://:14540@127.0.0.1:14580”

3. Terminal 3 – your ROS 2 offboard node:
source /opt/ros/humble/setup.bash
source ~/landing_ros2_ws/install/setup.bash
cd ~/landing_ros2_ws
colcon build
source install/setup.bash

ros2 run landing_ros2 offb_node
  1. Terminal 3 – your ROS 2 husky_square_node:
source /opt/ros/humble/setup.bash
source ~/landing_ros2_ws/install/setup.bash
cd ~/landing_ros2_ws
colcon build
source install/setup.bash

chmod +x ~/landing_ros2_ws/src/landing_ros2/landing_ros2/husky_square_node.py
  1. Register it in setup.py
    Edit:~/landing_ros2_ws/src/landing_ros2/setup.pyAdd an entry point next to your offb_node:entry_points={‘console_scripts’: [‘offb_node = landing_ros2.offb_node:main’,‘husky_square_node = landing_ros2.husky_square_node:main’,],},
  2. Build
    cd ~/landing_ros2_wscolcon build --packages-select landing_ros2source install/setup.bash
  3. Terminal 4 – QGC:
    cd ~/Downloads # or wherever the AppImage ischmod +x QGroundControl-x86_64.AppImage./QGroundControl-x86_64.AppImage &
  4. Terminal 5 – monitor state
    source /opt/ros/humble/setup.bashros2 topic echo /mavros/stateros2 topic echo /mavros/local_position/poseros2 topic echo /mavros/setpoint_position/local