Setpoint accelerations for Iris on ROS Gazebo not working (mavros)?

Update: I’ve tried three topics to publish the accelerations into:
/mavros/local_position/accel [geometry_msgs/AccelWithCovarianceStamped] , mavros/setpoint_accel/accel [geometry_msgs/Vector3Stamped] ,
/mavros/setpoint_raw/local [mavros_msgs/PositionTarget] (geometry_msgs/Vector3 acceleration_or_force)
The first and third caused no motion to the quad even though they published into the topics well (checked using ‘rostopic echo’). The second topic gave an initial acceleration in the x direction and quickly the drone crashed at a distance.

This is the brief outline of my first code:

    # My desired waypoints are 
    x1,y1,z1 = 4,3,4
    while not cnt.state.armed:
            modes.setArm()
            rate.sleep()

    # few setpoint messages before offboard mode
    k=0
    while k<10:
            sp_pub.publish(cnt.sp) 
            rate.sleep()
            k = k + 1

    modes.setOffboardMode()

    # use a goto function that assigns the desired altitude to a variable of message type PositionTarget
    while not rospy.is_shutdown():
            cnt.goto(0,0,int(h) ,0)
            
            sp_pub.publish(cnt.sp)
            rate.sleep()

    # now once altitude reached, use acceleration setpoint function
    while not rospy.is_shutdown():

        #based on a PD controller class function, the required x and y accel are calculated and set in this loop until the error is small
         # self.sp.acceleration_or_force.x = self._accel_x
         # self.sp.acceleration_or_force.y = self._accel_y
         # publish into the topic 'mavros/setpoint_raw/local'
         sp_pub.publish(cnt.sp)

@v01d I have seen a similar topic you faced difficulty in giving acceleration setpoints. Was it resolved? Trajectory Following via acceleration setpoints, which controller to use?
@Mzahana Trajectory Following via acceleration setpoints, which controller to use?