Problems about Launching gazebo + PX4

Hi there,

I’m currently launching a simulation using gazebo, and this is my configuration:

Ubuntu 22.04+ROS2 humble+PX4+MicroxrceAgent+QGC+GazeboHarmonic

I have a few questions about spawning my own model and worlds into gazebo.

These are my steps about how I proceeded and tried:

  1. I have a model of my own in which I added some sensors(lidars) on it and all sensors work in gazebo when I run
    make px4_sitl gz_my_model (which is in default world)
    and the sensors are in right positions, the topics of lidars are functioning right in gazebo and can be visualizaed in gazebo, but there are some warnings:
    WARN [health_and_arming_checks] Preflight Fail: ekf2 missing data
    WARN [health_and_arming_checks] Preflight Fail: system power unavailable,
    Sometimes Acce#0 Failed: Timeout
    The results are the same when I run this:
    PX4_SIM_MODEL=gz_my_model PX4_SYS_AUTOSTART=1234 PX4_GZ_STANDALONE=1 ./build/px4_sitl_default/bin/px4
    So according to this step, there are no problems with my model,right?
  2. Next when I use my own world, I run
    python3 simulation-gazebo –world my_world
    in PX4 folder, I run
    make px4_sitl gz_my_model
    The warnings are:
    WARN [health_and_arming_checks] Preflight Fail: Accel Sensor 0 missing
    WARN [health_and_arming_checks] Preflight Fail: barometer 0 missing
    WARN [health_and_arming_checks] Preflight Fail: ekf2 missing data
    WARN [health_and_arming_checks] Preflight Fail: Gyro Sensor 0 missing
    WARN [health_and_arming_checks] Preflight Fail: Found 0 compass (required: 1)
    The problems are:
    ERROR [mavlink] vehicle_command_ack lost, generation 5 → 15
    ERROR [mavlink] vehicle_command_ack lost, generation 5 → 15
    ERROR [mavlink] vehicle_command_ack lost, generation 4 → 15
    ERROR [mavlink] vehicle_command_ack lost, generation 7 → 27
    ERROR [mavlink] vehicle_command_ack lost, generation 18 → 27
    ERROR [mavlink] vehicle_command_ack lost, generation 18 → 27
    ERROR [mavlink] vehicle_command_ack lost, generation 18 → 27
    topics are not published in gazebo;
    some sensors are in wrong position;
    cannot connect to QGC
  3. IF I run this in step 2 to launch PX4:
    PX4_GZ_STANDALONE=1 make px4_sitl gz_my_model
    The problem is in the terminal, it keeps showing:
    INFO [init] Waiting for Gazebo world…
    INFO [init] Waiting for Gazebo world…

Am I doing this right?