Obstacles Recognition

This is a shot in the dark, but the ‘flying sideways’ just triggered me: What version of MAVROS are you using?

There was a frame change in MAVROS, so depending on which point of the avoidance you’re using, you need to make sure you have the right version of MAVROS. Current master of PX4/avoidance and MAVROS 0.29.2 should be fine

I was looking at the first log you sent me and I do not see the behavior you describe. For the first goal, the drone turns once around but then moves around the obstacle to the goal location. Then the goal seems to change. In the flight it looks to me as if the drone crashes into the obstacle. But I cannot tell for sure, is that a flight or a sitl log?

As for the second log, I have one idea what could be the issue. Try to set the new goal further away from the drone. There is a goal acceptance radius in the code, in which the drone does not change its yaw anymore (to avoid spinning at the goal)

@baumanta , thanks for your assistance.
This is simulation bag file. When approaching to the obstacle it’s
moving slightly from side to side before trying to pass near obstacle.
I think I will record screen capture video for better explaining the issue…

When its passing near the obstacle its facing to the obstacle and sometimes
going back. In the end of the bag file finally drone flights away from goal point.
Please advice what parameters can change this behaviour.

Regarding second issue , I will try to send it further. Also I will check the mavros version
as was suggested before. Actually I have different versions of mavros on my laptop and on the drone, but don’t remember what versions exactly. Also I guess that MPC_YAW_MODE can change this behaviour.

Best Regards
Evgeny

Here the video capture of local_planner simulation: https://drive.google.com/file/d/1AcRVzLGylBsb3lFWE5HMgh23FjWv6U3I/view?usp=sharing

I’m also recorded bag file of this behavior: https://drive.google.com/open?id=1bMPAeL0q27lD7uT1AUiIqCvRuHOe_iIZ

Best Regards
Evgeny

The reprojected points in your setup are completely off. I’ve seen this behavior before, but never as extreme as in your case… Very strange.

Please check the MAVROS versions first, they matter. Wrong coordinate frames could maybe explain the behavior you’re seeing

I updated it manually couple of weeks before, but don’t remember what version…
I will check it today.

I found the issue with your simulation: It is running too slow. Most likely your laptop is not powerful enough. You can see this if you visualize the RVIZ topic /current_setpoint. This arrow is color coded to show the planner mode:

  • pink = rise to flight altitude
  • green = avoiding an obstacle
  • blue = flying straight
  • yellow = timeout

In your bag you see this arrow flicker between green and yellow. The planner goes into timeout state if it does not receive a pointcloud for 0.5 seconds. if you still want to try and run SITL on this lapto you will have to increase this time in the rqt_reconfigure in the parameter timeout_critical_. But I cannot guarantee you that you will achieve great performance on in SITL on this laptop.

Thanks.
That was very useful information.
I will increase timeout and will test it in real flight.