Planned path using ros SITL Arducopter

hello,

I’m using path planning algorithm over ROS to avoid obstacles.
My Ardupilot version is V4.1.0-dev runing with SITL - Gazebo.
I uploaded a video taken from rviz : https://streamable.com/rb17d1
The red arrow is the odometry from the quad copter in Gazebo vs. the planned trajectory.
There is a noticeable “overshooting” of the drone trajectory, that may possibly lead to failures in avoiding obstacles.
I’ve configured the ardupilot’s parameters to be as “fast” as it can be (in roll, pitch, yaw), however there is still overshooting from the generated trajectories.
The flight mode is set to GUIDED.
The path planning algorithm output is a Ros topic - PositionCommand (position, velocity, acceleration, yaw, yaw_rate) which I transform to MAVLink command SET_POSITION_TARGET_LOCAL_NED that is being sent at 50 HZ.

Do you have any idea what can cause this behavior? Is there something I’m missing?

Did you try to autotune the SITL ?

hey,

I tried to autotune , there is still a noticeable overshooting

any ideas or other solutions?

Thanks.

Did you tune the dynamic notch filter to get rid of Z-axis vibrations first?
Did you follow the required tuning instructions before doing the autotune ?
You you did not follow the steps above previously, repeat the autotune. Did the P gains increase? is the copter stable in stabilize mode? if yes, proceed, if no, repeat the autotune, before continuing to the next step.

If you did all that correctly, then you should try understand altitude in ardupilot and after that tune the parameters for the altitude controller.

If you need more information, read ardupilots’s control loop detailed implementation
But most probably you will get excellent results by just following the first few links that I posted.

Hi,

I did the first 2 steps above and it didn’t help.
My main problem is regarding the horizontal (X and Y axis) control, you can see in the following image a top view of the path I’m sending to the arducopter with SET_POSITION_TARGET_LOCAL_NED message (in red) and the actual path the drone is executing .

I tried tuning PSC_POSXY_P value and it decreased the error but there is still noticeable error (as shown in the image above)

I spent the last two weeks trying to dell with this error and didn’t get to significant results.

Any more ideas?

BTW the group that developed the planning algorithm used DJI N3 Flight Controller and didn’t encountered with these issues.

Thanks Ahead.

Post a .bin log file. Update to ArduCopter 4.0.5, and do read all of the links I posted, not just the first two.