How to add lidar to pixhawk board using mission planner

how to change parameters for control of motor when object detection

Search the ArduPilot wiki documentation. It explains what lidars are supported, how to connect them, how to configure them.
And there is documentation about object avoidance as well.

Once you read that, post any questions here.

ok i will check it once

in that documentation they mention configuration and connection only but i want to know based on distance how to control rover/boat with servo motors by avoidance of object

That part is done automatically. Test it, it just works.

how to test this one in auto mode or manuval mode

https://ardupilot.org/rover/docs/common-object-avoidance-landing-page.html

It explains it.

And here Simple Object Avoidance — Rover documentation there is even an youtube video.

how to connect lidar_ld19 module to pixhawk