i have one robot, i have to get the initial location of that robot. then when we move the robot from that location, and when we give the command like "HOME" then it should go that initial location. but i don't understand how to get initial location of that robot.
An IMU gives you linear acceleration and rotational speed. It doesn't give a position.
You can integrate the output of an IMU to get a linear position and angular orientation (the pose), but you need to choose initial speeds and positions.
Typically, these choices are zero. If you decided to choose zero for your initial/default pose, then returning "home" just means trying to get those values to go back to zero again.
An IMU alone is not sufficient to get position and is exactly why you use it in combination with a sensor that measures position, like a GPS. Even if you manually give it an initial position, the IMU is going to drift in position unless calibrated often.