Unable to set accels in offboard using setpoint_raw/local

Hi friends, I have realized that mavros is ignoring my values of accelerations when using /mavros/setpoint_raw/local message. However, it works when just using velocities, positions or yaw in that topic.
Currenlty using:

  • Px4/Firmware 1.11.3
  • Ubuntu 20
  • Ros Noetic
  • gazebo 11.5.1

Im trying to avoid use of /mavros/setpoint_accel/accel in order to publish only one msg.

Issue description:

I have a velocity PID (w/ 2.5 saturation) that commands ‘v’ values ok but, initially, Vz:2.5m/s is reached in 0.1secs. This is a maximum output on actuators (2000) and I would like to reach that Vz gradually (i.e. 1sec) at the beginning, because this behaviour (acc:25m/s2) is not good for motors.

I changed the type_mask to allow acceleration values as input (show in fig1)

However, it seems that mavros are ignoring them. As fig2 and fig3 show, velocity is almost instantly reached and accel_raw is too high. Also I use FRAME_LOCAL_NED as coordinate_frame, and I tested different MPC_ACC_UP_MAX but it seems that it doesnt affect.



I did several tests with the following combinations:

  • w/ and w/o force flag
  • Setting accel values (3.5, 5.0 … etc) on XYZ, and only on Z
  • Reduce mpc_jerk_auto from 8 to 2)
  • Set MPC_POS_MODE to 3 and 4 (usually 0)

I checked #1365 and #14345 and related topics, but have not found a solution yet. Hope we can manage accels in offboard mode.

Any help on this will be much appreciated.

Any help with the above issue?