Way Point handling with mavlink and obstacle avoidance

I want to get the way points uploaded by user from QGroundControl and use my obstacle avoidance algorithm for the movement from way points instead of the default code that flies the drone at constant height and short distance. For this task, I think I need to get the list of way points, clear them from the vehicle first and then use these way points in my code for obstacle avoidance.
For now, I have made the code ready to get Mavlink messages, update the position and the algorithm for obstacle avoidance. But when I try to request the mission data using Mavlink, I couldn’t get the values. Following is the screenshot.

I am not able to get these mavlink message. I have tried with jmavsim. I was able to get MISSION_ITEM_REACHED and MISSION_CURRENT, but unable to get other mavlink messages like MISSION_REQUEST.

Could anyone suggest the solution, and may be another approach which is good than my approach for obstacle avoidance. Thank you in advance.