<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kushant on Medium]]></title>
        <description><![CDATA[Stories by Kushant on Medium]]></description>
        <link>https://medium.com/@kushantp179?source=rss-2f11e42e196a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*S7k_kFn8R07p5ftO.jpg</url>
            <title>Stories by Kushant on Medium</title>
            <link>https://medium.com/@kushantp179?source=rss-2f11e42e196a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:45:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kushantp179/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Embarking on a Robotic Adventure: An Introduction to ROS (Robot Operating System)]]></title>
            <link>https://medium.com/@kushantp179/embarking-on-a-robotic-adventure-an-introduction-to-ros-robot-operating-system-1d7972ca249d?source=rss-2f11e42e196a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d7972ca249d</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Kushant]]></dc:creator>
            <pubDate>Fri, 02 Jun 2023 22:46:03 GMT</pubDate>
            <atom:updated>2023-06-02T22:53:41.001Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*X4sI6tQEGvJgcLq1iZai8A.png" /><figcaption>ROS tools for the robotics industry</figcaption></figure><h3>Introduction</h3><p>The Robotics industry has captured human imagination, with visions of intelligent machines seamlessly navigating and interacting with the world around us. While the hardware design started scaling with the semiconductor industry, a need for a comprehensive and flexible software platform arose which could manage the complexity of robot systems. Hence, ROS, or Robot Operating System came into the picture. In this post, I’ll cover the fundamentals of Ros, so we can start diving into the use of Ros stack for graph slam. Ros roots can be traced back to <a href="http://stair.stanford.edu/"><em>STAIR</em></a> or Stanford’s AI Robot project, their aim was to build a robot that could navigate home and office environments, pick up and interact with objects and tools, and intelligently converse with and help people in these environments (in their own words). They felt a need for a standardized framework that would enable collaboration and accelerate the development of robotic systems. And by making Ros open source, the <a href="https://www.businessinsider.com/a-look-back-at-willow-garage-2016-2"><em>Willow Garage</em></a> invited the global robotics community to contribute, improve and shape the future of this emerging technology.</p><h3>What is ROS, why was it introduced and what would the future of ROS look like?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jumgccgkSZCDILraGIaUTQ.png" /><figcaption>PR2 beta program recipients building ROS as the <a href="https://spectrum.ieee.org/the-origin-story-of-ros-the-linux-of-robotics#toggle-gdpr">“Linux of Robotics.”</a></figcaption></figure><p>ROS introduction was driven by several key factors. As we saw in the brief history section above, the development was hindered by the need for a common framework for easy integration and interoperability of robot components. To address this challenge, the robotics community had to reinvent the wheel and put in valuable time and resources to create a modular platform where support for all kinds of sensors, algorithms, and actuators could work and communicate together. The second and most important reason was a vision for democratizing robotics. Labs like MIT, Stanford, Berkeley, CMU, Georgia Tech, Michigan (in the US), Toronto and Waterloo (in Canada), ETH Zurich, German Aerospace Center (DLR), and Oxford (in Europe and surrounding regions) to name a few were the most innovative and popular labs in the world with enough funding to cover the cost of expensive robot design, but what about hobbyists like you and me who wants to tinker with our vacuum cleaners and make them autonomous or a group of Ph.D. students who wish to use a robot for neuroscience and healthcare domain? Ros aimed at democratizing access by providing a free and open-source framework like Torch and TensorFlow that lowered the barriers for anyone who wants to explore this wonderful world of C-3POs/R2-D2s or Cylons. The third reason behind Ros&#39;s development was scalability. It doesn’t matter if you’re a small startup, a single individual, or a large robotics firm, Ros can be adapted and customized to be used with various applications. The extensive library of software packages from Ros enables developers to focus only on their tasks without reinventing the wheel or rewriting the entire software stack. This flexibility and scalability have made Ros an invaluable tool for a wide domain of robotic applications, ranging from autonomous vehicles to SAE design teams and humanoids. Now that you know what Ros is, let’s set the stage for your exciting journey ahead with some basics of Ros architecture and tools that can be used regardless of what you want to design and tinker with.</p><h3>Fundamentals of ROS</h3><p>Before moving further, lemme clear a persisting confusion here for all first-time Ros readers out there — ROS is not an operating system but it’s more of a middleware stack or a meta operating system that assumes an underlying OS will be used for carrying out its duties.</p><p>ROS framework has the following —</p><ol><li>A publisher-subscriber framework or a pub-sub for running independent robot modules like sensor interfacing, perception, and motion planning.</li><li>A rich ecosystem of open-source packages including drivers for sensors, algorithms for perception, and navigation.</li><li>A rapid prototyping platform supporting C++/Python 3 pl design.</li><li>Ros comes in different distros but right now we are going to focus on Ros 1 (not Ros2, more like Ros 2, haha).</li></ol><p><strong>Pre-Requisites</strong></p><ul><li>An Ubuntu system or even a VM (virtual box, Vmware) should work.</li><li>Linux</li><li>C++/Python 3</li></ul><p><strong>Installation (ROS melodic / ROS noetic)</strong></p><ol><li>Set up your sources. list using the following command —</li></ol><pre>sudo sh -c &#39;echo &quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&quot; &gt; /etc/apt/sources.list.d/ros-latest.list&#39;</pre><p>2. Set up your keys</p><pre>sudo apt install curl # if you haven&#39;t already installed curl<br>curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -</pre><p>3. Installation</p><pre>sudo apt update<br>sudo apt install ros-&lt;ros_distro&gt;-desktop-full (ros_distro = melodic/noetic)<br>sudo apt install ros-&lt;ros_distro&gt;-desktop (only use this for desktop install)<br>sudo apt install ros-&lt;ros_distro&gt;-ros-base (only for ros base without GUI tools)<br>sudo apt install ros-&lt;ros_distro&gt;-PACKAGE (only use this for individual package)</pre><p>4. Environment setup</p><pre>echo &quot;source /opt/ros/&lt;ros_distro&gt;/setup.bash&quot; &gt;&gt; ~/.bashrc<br>source ~/.bashrc (ros_distro = melodic/noetic) <br>source /opt/ros/melodic/setup.bash<br><br>echo &quot;source /opt/ros/melodic/setup.zsh&quot; &gt;&gt; ~/.zshrc (only use if you prefer zsh)<br>source ~/.zshrc</pre><p>5. Dependencies for building packages</p><pre>sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential<br>sudo apt install python-rosdep<br>sudo rosdep init<br>rosdep init</pre><p>6. Create a ROS workspace</p><pre>$ mkdir -p ~/catkin_ws/src<br>$ cd ~/catkin_ws/<br>$ catkin_make<br>$ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 (for ros melodic and earlier use)<br>$ source devel/setup.bash<br>$ echo $ROS_PACKAGE_PATH<br>/home/youruser/catkin_ws/src:/opt/ros/&lt;ros_distro&gt;/share</pre><p>7. Install ros-tutorials</p><pre>$ sudo apt-get install ros-&lt;ros_distro&gt;-ros-tutorials</pre><p><strong>ROS Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/0*sxjVBAEGyB4KfMyp.png" /><figcaption>Image source: <a href="https://clearpathrobotics.com/">clearpathrobotics.com</a></figcaption></figure><p>As we move onto using this pub-sub framework, let’s discuss how this works -</p><ol><li>Ros communication essentially makes use of computational graph architecture where we have nodes that can run multiple robotic applications.</li><li>These nodes communicate with each other and can be distributed across different systems via wired or wireless networks.</li><li>The nodes can act as a Publisher which can publish data at a specified frequency or as a subscriber which can react to data being received via publishers (for eg a node that processes sensor data coming from a camera or lidar or radar etc)</li><li>Publishers put all these messages on topics and subscribers use these topics for retrieving data.</li><li>There’s a central node referred to as Rosmaster which itself hosts the nodes and topics and acts as a mediator for the messages.</li></ol><p><strong>Example (An Image processing node)</strong></p><p>Look at the below example where we have a camera node that publishes camera data to an image_data topic and the image processing node subscribes to an image processing node and there’s an image display node that subscribes to the same topic for showing image frames in a tool like RViz. The common thing is all those nodes need to be registered with rosmaster which keeps track of what nodes exist and facilitates messaging between nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/0*osq0sj9QOgenpNDp.png" /></figure><p><strong>Rosbash</strong></p><p>Here are some common rosbash commands that can be used -</p><ul><li>roscd — analogous to cd for changing a dir of a ros package.</li><li>rosd — lists dirs in the directory stack.</li><li>rosls — lists files of a ros package</li><li>roscp — copy a file from a package</li><li>rosed — edit a file in a package</li></ul><p><strong>Starting rosmaster/roscore</strong></p><p>As mentioned before, roscore or rosmaster is a central master between nodes. You must specify the IP address of rosmaster to each machine in case you are using a distributed network -</p><pre>$ export ROS_HOSTNAME=localhost<br>$ export ROS_MASTER_URI=http://localhost:11311<br><br># for using rosmaster on any other machine on distributed network<br>$ export ROS_HOSTNAME=&lt;MACHINE_IP_ADDRESS&gt;<br>$ export ROS_MASTER_URI=&lt;MASTER_MACHINE_IP_ADDRESS&gt;<br><br># Starting roscore or rosmaster<br>$ roscore</pre><p><strong>Running nodes and viewing topics</strong></p><pre># Run nodes<br>$ rosrun package_name node_name<br><br># See what nodes are running<br>$ rosnode list<br><br># Get node info<br>$ rosnode info node_name<br><br># Kill a node<br>$ rosnode kill node_name<br><br># List current topics<br>$ rostopic list<br><br># Subscribe to a topic and print messages as they are published to said topic<br>$ rostopic echo /topic_name<br><br># Get topic information (like what messages it takes)<br>$ rostopic info /topic_name</pre><p><strong>Messages</strong></p><p>Topic communication happens via the use of ros messages. They are used for defining the data type of the topic and can consist of different C++ types. for eg. A velocity message may consist of several floats x,y, and z.</p><pre># Use this to see what message elements/messages a topic takes<br>$ rostopic type /topic_name<br><br># You can publish a single message to a topic as follows!<br>$ rostopic pub /topic_name &lt;type&gt; &lt;contents&gt;<br>$ rostopic pub /my_topic std_msgs/String &quot;Rawr&quot;<br><br># Or do it repeatedly! (this one does it 10 times per second)<br>$ rostopic pub -r 10 /cmd_vel geometry_msgs/Twist  &#39;{linear:  {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}&#39;</pre><p><strong>Workflow with an example (you can use </strong><a href="http://wiki.ros.org/ROS/Tutorials/UnderstandingNodes"><strong>turtle-node</strong></a><strong> tutorials)</strong></p><ol><li>Start the roscore or rosmaster.</li><li>Run the rospy or <a href="http://wiki.ros.org/roscpp_tutorials">roscpp tutorials</a> in a separate terminal, you cannot stop rosmaster which might stop the communication between nodes and you’ll start getting error messages.</li><li>Check out the node list and info about that node.</li><li>Verify the topic being published or the frequency in Hz for that topic.</li><li>Subscribe to that topic and see some basic information via rostopic echo.</li></ol><pre># In terminal 1<br>$ roscore<br><br># In terminal 2<br>$ rosrun roscpp_tutorials talker<br><br># In terminal 3<br>$ rosnode list<br>$ rosnode info /talker<br><br># In terminal 4<br>$ rostopic echo /chatter<br><br># We can also analyse the frequency! (In a NEW TERMINAL)<br>$ rostopic hz /chatter<br><br># In terminal 5<br>$ rosrun roscpp_tutorials listener<br><br># Close the tutorial publisher node and try publishing your own message!<br># In terminal 2, press Ctrl-C<br>$ rostopic pub /chatter std_msgs/String &quot;data: &#39;Rawr&#39;&quot;<br></pre><p>That concludes the ros tutorials. There’s nothing new that I’ve covered in this tutorial. You can find all the details on the Ros community. I just wanted to make you go through some basic structured tutorials for further ros usage.</p><h3>Final Remarks</h3><p>Thanks for your patience in going through the entire tutorial on Ros. I know it’s a bit more than I was supposed to cover but I tried to keep it short. All the credit goes to those wonderful talented folks who worked on the development of this open-source, scalable framework. Without them, we wouldn’t be here and neither would be, the robotics world where it is today. So, go on take a deeper dive into the history of all the links I’ve shared in this post. And if you’re really interested in becoming a robotics developer like me, here’s a small guide (from <a href="https://www.theconstructsim.com/">Construct</a>) that you can refer to check your progress on the tools you need for becoming a passionate developer.</p><p>And don’t you forget it’s pride month, <strong><em>Happy Pride Month to all my wonderful friends! 🌈 May this month be a time of celebration, love, and acceptance. Remember that you are all beautiful and deserving of happiness and respect. Let’s continue to support and uplift each other as we embrace our true selves. Happy Pride Month! 🏳️‍🌈❤️</em></strong>. Keep learning and keep progressing in this awesome world of robotics. Au revoir !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*yI7vQITf496tkwTeaTtH-A.png" /><figcaption>Construct’s learning path for ROS</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d7972ca249d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Graph SLAM: A Comprehensive Guide to Simultaneous Localization and Mapping (Part I)]]></title>
            <link>https://medium.com/@kushantp179/exploring-graph-slam-a-comprehensive-guide-to-simultaneous-localization-and-mapping-part-i-52281bbf6b9c?source=rss-2f11e42e196a------2</link>
            <guid isPermaLink="false">https://medium.com/p/52281bbf6b9c</guid>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Kushant]]></dc:creator>
            <pubDate>Sun, 21 May 2023 10:42:39 GMT</pubDate>
            <atom:updated>2023-05-21T10:42:39.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wni-XsOy7lHyoKapfa4y3A.png" /><figcaption>Magellan’s deep sea mapping equipment</figcaption></figure><p>In the previous post, we went over a brief overview of what SLAM or Simultaneous Localization and Mapping is, how it’s useful, the types of Slam algorithms that are widely used, and how it’s tricky to solve this chicken/egg problem. In this part, we are going to look at one of the widely used SLAM techniques out there, which has revolutionized the field of robotics and propelled autonomous systems to new heights — Graph SLAM. This technique involves the use of graph theory and optimization algorithms to solve the complex problem of simultaneous localization and mapping. To start off by relating it to a simple construct — this method or technique relies on a graphical model creation from a robot’s trajectory and the environment it explores. Part I will unravel the key components of this SLAM technique and examine the mathematical foundations that drive its functionality. To recap from the previous post, the aim of any SLAM algorithm/technique/method is to create a map of an unknown environment while concurrently estimating the robot’s location within that environment.</p><h3>SLAM = Build a Map + Localize in that Map</h3><p>Let’s consider a discrete-time scenario, where the robot is moving through an environment at discrete time steps. The following represent some common notations that are used amongst the robotics community —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*p3Gj9t5SGI2zd1I46_hxig.png" /><figcaption>Common notations</figcaption></figure><p>The goal is to create a map by estimation of the robot’s state <em>x(t)</em> using measurements<em> z(t)</em> and control inputs <em>u(t)</em>. We represent uncertainty as finding posterior probability distribution over the robot’s state <em>x(t)</em> and map <em>m </em>given all measurements and control inputs up to time <em>t , </em>denoted by —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*clywngixO3GYlXk1MecssQ.png" /></figure><p>And those who are familiar with the Bayes rule and Markov assumption, the SLAM problem becomes nothing more than a recursive Bayes estimation problem. A belief or a probability distribution has to be maintained over the robot’s state and map at each time step t and then perform an update based on new oncoming sensor and control inputs/measurements. Essentially, SLAM can be summarized into two major steps —</p><ol><li><strong>Prediction step</strong> — This step is quite simple, where we propagate belief over state <em>x(t-1) </em>and map <em>m </em>using the motion model. The motion model describes the transition of a robot’s state from <em>x(t-1) </em>to <em>x(t) </em>given the control input <em>u(t).</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*eYwU-377hPDvLCWBR6aDjw.png" /></figure><p>2. <strong>Measurements update or Correction step</strong> — This step updates the belief using the measurements obtained at time <em>t </em>which involves integrating sensor measurements into the belief using the measurement model. Here, <strong>η</strong> represents the normalization constant. The measurement model tells us about the likelihood of observing an environment <em>z(t) </em>given the robot’s state <em>x(t) </em>and the map <em>m.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*wf9eXDYmLjBDzILtwWOHCQ.png" /></figure><p>SLAM = Iteratively applying Prediction and Correction steps. The SLAM type depends on the choice of measurement and motion models or the inference techniques used for updating the belief distribution.</p><h3>Graph-based SLAM</h3><p>This form of SLAM uses a computational graph model for the representation of a set of objects where object pairs are connected by links depicting information about the relationship between those objects. The main idea of graph-based slam is to use graphs to solve the problem. Graph usually consists of nodes and edges. The node here corresponds to a robot’s pose (position and orientation) during the mapping phase and every edge between any two nodes corresponds to a spatial constraint between them. So, the overall aim is to build a graph with such a node configuration that minimizes the error introduced by the constraints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZbG9SYwM9H9ndr9h" /><figcaption>Sample graph model</figcaption></figure><p>The workflow of graph slam can be visualized as a frontend-backend system design where the frontend takes in the raw sensor data, and creates a graph with nodes and edges, and the backend optimizes this graph. The nodes are the states of a robot at any given time <em>t </em>and once we have a state, we can make an estimation of measurements. Don’t worry if this all seems too complicated now, once you understand how a robot moves in an unknown environment, and how the odometry system provides an accurate estimate of a robot’s pose and velocity, your thought process will start converging to SLAM. We’ll cover this in a short tutorial on ROS in upcoming blog posts. For now, think of odometry data as velocity or pose data of a robot which can be acquired via various sources including Lidar, Radar, IMUs, Wheel encoders, etc. Back to graph SLAM, once you have predicted measurements and real measurements, you can use any existing optimization algorithm to reduce the error between these predicted and actual measurements. And henceforth, all we gotta do is focus on searching for a configuration of the nodes so that real and predicted observations are as close as possible. The optimization can be done via the use of error functions like Least Square Estimations, Mean Square Estimations, etc. An assumption of error having zero mean and normal distribution is to be considered. So let’s summarize the entire workflow using the following sequence —</p><ol><li>Graph initialization: This step involves the creation of an empty graph to represent our SLAM problem, and we initialize the robot’s pose and map with some initial estimates.</li><li>Sensor data acquisition — This step involves obtaining the sensor data from cameras, IMUs, Lidars, Radars, odometry, etc. This information helps in the computation of a robot’s motion and environment measurements.</li><li>Extraction of features — The sensor data acquired in step 2 is processed for salient feature extraction which could be landmarks, point clouds, or visual key points.</li><li>Construction of Graph — Nodes are added in this step with robot pose and landmarks for each node. Edges are created between nodes representing the spatial constraints. This could include relative positions, angles, or distances between pose and landmarks.</li><li>Optimization phase — This step/phase solves an optimization problem to make an estimation of a robot’s pose and map. LSE serves as a potential optimization technique for error minimization. Best node configurations are searched for with minimized error.</li><li>Update — In this step, the robot’s pose and map are updated based on the optimized estimations. The new measurements are taken into consideration.</li><li>Iteration — Steps 1–6 are iterated until a threshold accuracy or convergence criteria is met. This helps in incremental map creation of an unknown environment while trying to localize the robot within that environment. The final graph output is the accurate representation of a robot’s trajectory and the environment.</li></ol><h3>Final Remarks</h3><p>I’ve tried to cover the fundamentals of graph SLAM as much as possible, the code and optimization part will be covered in upcoming blog posts. The next blog will be about ROS (overview, not gonna go into many deets). There are many interesting applications of SLAM out there but the most interesting one that caught my eye this week was ‘Astonishing’ 3D scans revealing the Titanic shipwreck in extraordinary new detail by Magellan —</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FR2XtefrMNhg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DR2XtefrMNhg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FR2XtefrMNhg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/59215cbbe1a928fc4f3c302e72b1517d/href">https://medium.com/media/59215cbbe1a928fc4f3c302e72b1517d/href</a></iframe><blockquote>A little bit about me — I’m Kushant, the senior scientific associate at Lawrence Berkeley Lab, California. I’ve been a roboticist all my life. I’m a UWaterloo Alumni, been trying to explore the world of Robotics and AV stacks. It seems fun to share my research with others. I’m not an expert, but I try to keep up with the world. So, do connect with me on Twitter, and Linkedin. It’s fun to be a part of the robotics community. See ya next time, until then, stay safe !! Keep learning and enjoying.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52281bbf6b9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking the power of SLAM: Navigation and Mapping in Real-Time]]></title>
            <link>https://medium.com/@kushantp179/unlocking-the-power-of-slam-navigation-and-mapping-in-real-time-febb8313fb77?source=rss-2f11e42e196a------2</link>
            <guid isPermaLink="false">https://medium.com/p/febb8313fb77</guid>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[localization]]></category>
            <dc:creator><![CDATA[Kushant]]></dc:creator>
            <pubDate>Fri, 05 May 2023 19:34:34 GMT</pubDate>
            <atom:updated>2023-05-15T14:51:33.145Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7UgqxJxN4AnfA_KoU1g5uw.jpeg" /></figure><p>For past two decades, there have been a lot of advancements both in the field of computer vision and machine learning. All credit goes to improvements in hardware which has enabled researchers and engineers to design and train more complex and accurate models, at the same time processing and analyzing data at a scale which was previously unimaginable. With these improvements in hardware, the mapping of unknown environments has become realizable. GPS signals are pretty much useless indoors as they rely on “true-range multilateration” from three of 31 GPS satellites and those signals are unable to penetrate building well. The well-known solution to indoor mapping or unknown environment mapping is SLAM or Simultaneous Localization and Mapping.</p><h3><strong>Chicken and Egg Problem</strong></h3><p>Yea, that’s right. SLAM is often referred to as a “chicken and egg problem” because the sub-tasks of localization and mapping are often interdependent. A robot needs to know its position to build an accurate map but it also needs a map to accurately determine its position. SLAM has become an essential technology for many applications, including robotics, autonomous vehicles, and augmented reality. I’m sure you have heard of the missing Malaysian Airlines Flight MH370 — which disappeared on March 8 after deviating from its scheduled flight path. Multiple agencies were on the hunt for missing parts in the southern Indian Ocean. Amidst the hunt, a robotics firm, <a href="https://gdmissionsystems.com/underwater-vehicles/bluefin-robotics">Bluefin Robotics</a> founded at MIT&#39;s autonomous Underwater Vehicle lab, used their Bluefin-21 AUV (Autonomous Underwater Vehicle) to locate landmines, using its sensors to image the ocean floor, build a map and find any signs of a crash. You might be wondering what’s all this got to do with SLAM — the answer you’re looking for is SLAM. It enables robots and autonomous vehicles to navigate through complex environments without relying on GPS signals or pre-built maps. Hence, it played a pivotal role in the location of the MH370 wreckage underwater in an unknown environment.</p><h3><strong>Sensors and types of SLAM</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mvQ6BaOl4lNKvHaR.jpg" /><figcaption>Sensors used in SLAM</figcaption></figure><p>SLAM uses various sensors for the collection of data about the environment based on the requirements of a specific application it’s trying to solve. Below are some of the common sensors that are used in SLAM -</p><ol><li>Inertial Measurement Units or IMUs — Mems (Micro-electro-mechanical systems) imus have revolutionized the positioning and navigation industry. These sensors measure acceleration, angular velocity, and magnetic fields. They are often used in conjunction with other sensors like LIDARs or Cameras for the provision of information about the position and orientation of a robot.</li><li>Cameras — The equivalent of human eyes for a robot which is used for capturing images and videos of unknown environments. Cameras are used for feature extractions in the form of corners, edges, and key points. These features are then integrated into the perception stack of the robot for object detection and tracking to give out all relevant information there is within its field of view.</li><li>LIDARs — Light Detection and Ranging, if you have seen the round rotating thingy on autonomous cars like Cruise or Waymo in San Francisco, that’s LIDAR. Well, now you know what it is. It uses a series of lasers to fire hundreds of thousands of pulses per second. These pulses then bounce off objects and return back to the LIDAR sensor. The sensor uses the time of flight or the time it takes for each pulse to return for the calculation of distance. The process sounds reasonable and easy, right? — Well it’s not. Each of these pulsed laser measurements can be processed into a 3D visualization referred to as a point cloud. But as you can see, the raw lidar data is massive for 3D information about an environment, hence storing and transferring it is troublesome. This data is very complicated for processing. Thanks to the ML community, nowadays we have deep nets that make it easy to process these kinds of data.</li><li>Radars — Everyone reading this is very familiar with Radio Detection and Ranging or Radars, which emits radio waves for the detection of objects in environments. Similar to LIDAR, radar information can be used for the creation of a 3D map of the unknown environment and estimate a robot’s position and orientation.</li></ol><p>Now, that you folks are familiar with the sensor types used in SLAM, let’s take a brief look at different kinds of SLAMs that are used in industries and research labs —</p><ol><li><em>ALVINN </em>(Autonomous Land Vehicle in a Neural Network) — The first SLAM ever used which was comprised of a 3-layer back propagation network taking camera images and lasers as inputs and output a trajectory for a vehicle to traverse the road.</li><li><em>FastSLAM</em> — uses particle filters for the estimation of a robot’s pose and landmarks location in a mapping environment. Based on the Bayes theorem, it uses particle filters to approximate the posterior distribution of the pose of a robot and the positions of landmarks. It’s highly efficient and scalable because both the mapping and localization steps can be performed in parallel and independently.</li><li><em>EKF SLAM — </em>Use of Extended Kalman filters for estimation of a robot’s position and orientation based on sensor data. It works in two steps: Prediction and Updation — In the prediction step, the algorithm predicts the state of the robot, and the motion model provides landmarks which are then represented as a set of vectors relative to the robot and in the updation step, it updates the state estimates based on sensor measurements from sensors including Cameras, Lidars, etc.</li><li><em>Graph </em>SLAM — As the name denotes, this form of SLAM represents the environment as a graph with nodes describing a robot’s position and edges describing the measurements between positions.</li></ol><h3>Why do we need SLAM ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pWEcod7n7Y2XEU6V.png" /><figcaption>Indoor mapping with SLAM</figcaption></figure><p>Now, the only question that remains is with all this information, what are the advantages of SLAM and where can it be used —</p><ol><li>Autonomy — SLAM can be used in any robot, UAV, or autonomous vehicle which needs to operate autonomously in environments that are hazardous or unknown, or not within reach of humans. Let it be Chernobyl or Fukushima, Oceans or Rainforests — SLAM’s potential is limitless.</li><li>Accuracy — Highly accurate environments are effective in getting useful insights about unknown dangers, and artifacts to be preserved for archaeological purposes where even small errors might have grave consequences for ancient discovery. If you want to know more about this, I would recommend a <a href="https://www.youtube.com/watch?v=Q-9DLJG2xa8">great natgeo documentary on Lost Cities by Albert Lin</a>.</li><li>Cost-effective solution — SLAM provides a highly cost-effective solution for mapping and localization, where you are not required to have pre-built maps or GPS infrastructure to give you an accurate map of the environment.</li><li>Real-time updates — Dynamic environments can prove fatal for defense and military authorities. SLAM proves to be an efficient solution for providing real time updates about changing environments. For domains like construction and earthquake site surveys, SLAM is highly recommended.</li><li>Navigation — The most commonly used application of SLAM is for navigation in unknown environments where you don’t have GPS signals or pre-built maps including underground mines, oceans, or dense forests.</li></ol><h3>Future Posts</h3><p>This post covers a brief description of SLAM. This post is meant for people from both technical and non-technical backgrounds. In upcoming posts, we will cover more about different types of SLAMs in detail, see their implementation, try out some implementations from scratch and also build some ROS packages that could be useful to the research community and industrial use. Until then, stay safe and stay hydrated. Au revoir !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=febb8313fb77" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>