View full-text article in PMC Rep U S. Author manuscript; available in PMC: 2019 Oct 1. Published in final edited form as: Rep U S. 2019 Jan 7;2018:1298–1305. doi: 10.1109/IROS.2018.8594471 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information PMC Copyright notice Algorithm 3: Particle Filter Algorithm for Tool TrackingInput:Tool Model,χt−1,ut,zt,Pt,gCBt1χ¯t=χt=∅2form=1:Mdo3samplextm~p(xt|ut,xt−1m)4Compute and normalize the Chamfer matching score using the set of virtual images:5p(zt|xtm)~virtual_tool_rendering(Tool Model,xtm,Pt,gCBt)6wtm=p(zt|xtm)7χ¯t=χ¯t+〈xtm,wtm〉8end9form=1:Mdo10drawiwith probability∝wti11addxtitoχt12endOutput:χt