The trend of automation in industry, and in the society in general, is something that probably all of us have noticed. The mining industry is no exception to this trend, and there exists a vision of having completely automated mines with all processes monitored and controlled through a higher level optimization goal. For this vision, access to a reliable positioning system has been identified a prerequisite. Underground mines posses extraordinary premises for localization, due to the harsh, unstructured and ever changing environment, where existing localization solutions struggle with accuracy and reliability over time.This thesis addresses the problem of achieving accurate, robust and consistent position estimates for long-term autonomy of vehicles operating in an underground mining environment. The focus is on onboard positioning solutions utilizing sensor fusion within the probabilistic filtering framework, with extra emphasis on the characteristics of lidar data. Contributions are in the areas of improved state estimation algorithms, more efficient lidar data processing and development of models for changing environments. The problem descriptions and ideas in this thesis are sprung from underground localization issues, but many of the resulting solutions and methods are valid beyond this application.In this thesis, internal localization algorithms and data processing techniques are analyzed in detail. The effects of tuning the parameters in an unscented Kalman filter are examined and guidelines for choosing suitable values are suggested. Proper parameter values are shown to substantially improve the position estimates for the underground application. Robust and efficient processing of lidar data is explored both through analysis of the information contribution of individual laser rays, and through preprocessing in terms of feature extraction. Methods suitable for available hardware are suggested, and it is shown how it is possible to maintain consistency in the state estimates with less computations.Changes in the environment can be devastating for a localization system when characteristics of the observations no longer matches the provided map. One way to manage this is to extend the localization problem to simultaneous localization and mapping (slam). In its standard formulation, slam assumes a truly static surrounding. In this thesis a feature based multi-hypothesis map representation is developed that allows encoding of changes in the environment. The representation is verified to perform well for localization in scenarios where landmarks can attain one of many possible positions. Automatic creation of such maps are suggested with methods completely integrated with the slam framework. This results in a multi-hypothesis slam concept that can discover and adapt to changes in the operation area while at the same time producing consistent state estimates.This thesis provides general insights in lidar data processing and state estimation in changing environments. For the underground mine application specifical...