<?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 Aniket Sharma on Medium]]></title>
        <description><![CDATA[Stories by Aniket Sharma on Medium]]></description>
        <link>https://medium.com/@aniket0112?source=rss-1f8386b273f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*cJbvOTZcoPjKcZFZqiM_fw.jpeg</url>
            <title>Stories by Aniket Sharma on Medium</title>
            <link>https://medium.com/@aniket0112?source=rss-1f8386b273f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:16:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aniket0112/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[One step closer]]></title>
            <link>https://medium.com/@aniket0112/one-step-closer-5f309d8cb39b?source=rss-1f8386b273f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f309d8cb39b</guid>
            <category><![CDATA[researchers]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Aniket Sharma]]></dc:creator>
            <pubDate>Wed, 07 Aug 2019 19:17:16 GMT</pubDate>
            <atom:updated>2019-08-08T15:47:33.468Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is not a typical technical story on some simulation of a dynamic system or a robot controller that I worked on; like I usually post here. It’s just a story about how I got one step closer to my dream.</em></p><p>I have had deep interests in learning about the dynamics of systems and learning to control them since my undergrad years. When I enjoyed working on controlling the mobility of robots for Robocon, I realized this is what I want to do for the rest of my life — a job that doesn’t make you look at the clock to strike 1700.</p><p>I started looking for the term “research” and understand what it means to be a researcher. I spent a lot of my final year in college to explore and understand what opportunities can I get to become a researcher in the field of controls. I read about MS in foreign institutes via GRE, CSIR JRF job openings, some IIT JRF openings and finally, I found out that MS is also offered in some good research institutes of India like IISc (M. Tech (Res)) and IITM, IITK, IITD (MS), etc. It is a very sad thing that people think MS is just an M.Tech course that went abroad (even people passing out of college gave me that “MS in India?” look).</p><p>I appeared for GATE and got an average score. I didn’t have any high hopes of getting called from any institutes but IITM gives an opportunity to average scoring students by conducting their own research aptitude tests and interviews. So I got called from the Electrical Dept of IITM for MS application. I gave the tests and interviews. Most of the interview was on Linear Algebra and Control systems. I did not get shortlisted in the final list. Meanwhile, I had a job from campus at a good MNC in Mumbai and joined there. It was a typical electrical engineer job, but I always craved for my ambitions.</p><p>So I applied once again in the Jan-May semester (yes, there are two admission windows every year). I got called from the Engineering Design department and Interdisciplinary program (somehow didn’t get shortlisted for Electrical for the same marks). I cleared the written test for both the departments. My interview for the Engineering Design department was terrible. They asked me questions from Analog and Digital electronics which I had not prepared since last GATE exam (I had prepared Linear Algebra and Control systems this time, LOL). I gave two interviews in the Interdisciplinary program, one was okay, other was great. Unfortunately, the interview which went okay was my first preference and didn’t get selected there. But I got a final shortlist place for the second preference related to Switchgear Sensor design for Fault detection. I was considering to take it thinking that I should settle with what I got. But I talked to a friend of mine who also had such ambitions and he was really cool about his endeavor and said something like “I will find some way to get where I want”. This led me to the decision of rejecting this offer because I didn’t want to create the situation of “Control is my love but Switchgear is what I married to”. I am going to try again.</p><p>Enter the third try — by this time, I left my job, wrote GATE exam again and got a relatively better score than last time but still just average. I got a call from none of the three departments that I applied earlier (sad). But I got a call from the Aerospace Department. Actually, from the very beginning, I had the primary goal of getting in some control research related to Aerospace because that is the only domain in India which has a good applied control area. Others related to robotics or automation are still at a smaller scale or startup stages (just my personal opinion as per what I read from some sources). I cleared the test again, gave an interview on ODEs and Control systems (they didn’t ask anything about flight dynamics though I spent two weeks studying the stability of flight). And two months later I received my ticket to IITM Aerospace department.</p><p>I am currently at IITM pursuing my MS in Aerospace with research area related to Dynamics and Control of Aerial Vehicles. I have not yet decided my research topic but it will be soon after completing a set of basic courses. The campus here is great, there are deers, blackbucks, and monkeys all around the campus. It’s great to be at a place where you have dreamt of being for a year and getting one step closer to your ambition.</p><p>I just wrote this story thinking that maybe this will amplify the philosophy of not giving up on your dreams. <em>Dattebayo!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*4VHOY7CoH288pgEGqylhKw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f309d8cb39b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigation of Mobile Robots]]></title>
            <link>https://medium.com/@aniket0112/navigation-of-mobile-robots-351648def6cf?source=rss-1f8386b273f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/351648def6cf</guid>
            <category><![CDATA[gazebo]]></category>
            <category><![CDATA[robotics-operating-system]]></category>
            <category><![CDATA[control-syste]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Aniket Sharma]]></dc:creator>
            <pubDate>Thu, 09 May 2019 16:56:42 GMT</pubDate>
            <atom:updated>2019-05-09T20:45:54.285Z</atom:updated>
            <content:encoded><![CDATA[<p>I did my course the first time when I was in sophomore year of my college — <a href="https://www.youtube.com/playlist?list=PLp8ijpvp8iCvFDYdcXqqYU5Ibl_aOqwjr">Control of Mobile Robots-Georgia Tech</a>. I revisited this course again after having studied Control Systems thoroughly in my college days and I could crunch out a 100% out of this course this time because of a better understanding of terminologies like State Space, Observers, Eigenvalues, Controllability, etc. So I thought to give it a try and design a navigation scheme for a differential drive robot in ROS+Gazebo.</p><h3>Structure of a navigation problem</h3><p>Basically, navigation of a mobile robot can be stated in a simplistic sense as:<br>1. Going from one point to another<br>2. Not hitting other objects in the path</p><p>This directly implies two behaviors that mobile robot should possess:<br>1. Go To Goal: Traversing the straight line connecting two points.<br>2. Obstacle Avoidance: Moving away from obstacles.</p><h3>Sensors</h3><p><strong>For Go To Goal: </strong>To go to the desired position, you need to know your current position (simply because you want to know what direction it is and how far it is w.r.t. you). This claims the requirement of position feedback for the robot as well as its current heading (yaw). Odometry is the technique to be able to attach sensors to measure your wheel rotations and convert them to position and heading data for your robot. The math behind odometry is very well explained <a href="https://www.youtube.com/watch?v=XbXhA4k7Ur8">here</a>. On top of that, you can add a magnetometer for separate heading feedback of the robot. ROS controllers provide a <a href="http://wiki.ros.org/diff_drive_controller">Differential Drive Controller</a> which has odometry built-in. I tried to use it but the sensor readings were noisy (or more probably I was unsuccessful in implementing it correctly); so I used direct model states from <em>/gazebo/modelStates</em> topic to find orientation and position of robot w.r.t. world frame — making this a flawless position and orientation sensor.</p><p><strong>For Obstacle Avoidance:</strong> In order to detect obstacles, a handy way is to consider a disk abstraction around a robot of some radius greater than the robot itself (laser scanners, IR sensors, Cameras, etc.) which can provide with distance from an object around it. For my purpose, I chose a <a href="http://gazebosim.org/tutorials?tut=ros_gzplugins#Laser">laser scanner plugin</a> available in Gazebo. If you give it a thought, I think there should be a question on your mind — sensors covering forward semicircle is common sense to avoid an obstacle, but why backward semicircle? This subtle choice of a disk abstraction rather than semicircle will be highlighted later when we talk about wall following.</p><h3>Modes of navigation:</h3><h4>Go To Goal</h4><p>Go To Goal mode will be executed only when the robot has no obstacle in its vicinity. (Furthermore, when explained about wall following, you will get to know Go To Goal cannot be executed again till Follow Wall completes successfully). The math behind Go To Goal is simple:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*B_iyT1TwWQwmK-SRwHUnhA.gif" /></figure><p>After getting the <em>unicycle model state </em>of the robot, you need to convert it to corresponding wheel RPMs. This is very well explained <a href="https://www.youtube.com/watch?v=aE7RQNhwnPQ&amp;list=PLp8ijpvp8iCvFDYdcXqqYU5Ibl_aOqwjr&amp;index=10">here.</a></p><h4>Obstacle Avoidance</h4><p>There can be cases when the straight line connecting current and desired position has some obstacle between it (a wall, person standing, lamppost, etc.). We cannot allow the robot to collide with it and the philosophy behind Obstacle Avoidance mode is “get away from obstacle”. This is not a simple question as compared to Go To Goal because it has one and only one answer (or direction). An obstacle and be avoided by driving completely away from it (180° flip in direction), tangential to it (90° in a clockwise or anticlockwise direction) or more. A paranoid choice will be 180° away from the current direction to completely avoid obstacles.</p><p>The two behaviors of Go To Goal and Obstacle Avoidance work out really nice <em>mostly.</em> For e.g. Pure Go To Goal and Obstacle Avoidance can look like this:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgZrIBci6bKc%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgZrIBci6bKc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgZrIBci6bKc%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/7a9a2f638149c0bc75aa8da11487ff9d/href">https://medium.com/media/7a9a2f638149c0bc75aa8da11487ff9d/href</a></iframe><p>But these two behaviors are not enough to drive the robot through a world with non-convex obstacles or other complicated shapes. To answer these we require another mode for the robot</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOM8zGjS9NL0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOM8zGjS9NL0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOM8zGjS9NL0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb88b721d4025e1778d9f9bfa1e30b7e/href">https://medium.com/media/fb88b721d4025e1778d9f9bfa1e30b7e/href</a></iframe><h4>Follow Wall</h4><p>Follow Wall is basically Obstacle Avoidance at an angle 90° CW or CCW direction. The Clockwise or CounterClockwise nature is decided by the angle made by these two vectors with Go To Goal vector. Acute angles decide the nature of rotation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*oonydPwAi6fRIPA2DjxzFA.png" /><figcaption>The angle between u_FW_CCW and u_GTG is acute and is preferable over u_FW_CW</figcaption></figure><p>The question that naturally arises after including this mode is when to stop Follow Wall? One cannot simply put Follow Wall and Go To Goal to change based on presence of an obstacle and not, because this can lead to Zeno Phenomenon — a state where the object is indefinitely changing its modes and stuck. For example, take the case where the obstacle is like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*OCdiXz9-gpNygd6dYQbTcw.png" /></figure><p>In this case, whenever the robot happens to perform Obstacle Avoidance, it is triggered back to Go To Goal and starts to Follow Wall back from the forward wall to the point where the obstacle is again detected. This means that once inside a Follow Wall mode, this mode should be continued disregarding Go To Goal conditions until <em>some criteria are met.</em> For the safety of the robot, we cannot disregard Obstacle Avoidance mode, so it still remains at top of the hierarchy of modes. The criterion that governs when Follow Wall can be stopped is when:<br>The distance between Goal and Robot at any point during Follow Wall is smaller than the distance just before starting Follow Wall. This sums up all modes and the incidents to switch from one to another.</p><p>As pointed earlier, Follow Wall justifies the requirement of a complete disk abstraction rather than a semicircle. I understood when I tried to run simulations with a semicircle laser scan abstraction because as soon as you reach an outer corner of the wall, the complete sensor readings for an obstacle is absent and the robot is basically left in the dark and cannot decide what to do next — cannot do Go To Goal unless the distance between goal and the robot is less than what it was before Follow Wall started and when there is no obstacle then which direction to move at all? A full disk results in the sensor readings from the backward semicircular part — which suggests the robot to turn according to the ending edge of the wall. Try to put it down on a paper as drawings with the two cases of disk abstraction and do give it a thought.</p><p>This was meant to be a <em>crash-course </em>thing to understand my simulation project. If you really think to work on this, I recommend going through the course mentioned above.</p><h3>ROS Gazebo simulation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3QvsJ1KkjK8uul3NxQQdjQ.png" /><figcaption>RQT_GRAPH of DD_BOT</figcaption></figure><p>This graph shows the flow of information, topics, and nodes involved in ROS Gazebo Simulation.</p><p><strong>/dd_bot: </strong>This is the namespace of the robot and has the following nodes:<br>1. /dd_bot/joint_states: Publishes all joint information for robot during a simulation<br>2. /dd_bot/right_wheel_controller: Listens to commands published to it and rotates the right wheel joint at given angular velocity (rad/s)<br>3. /dd_bot/left_wheel_controller: Listens to commands published to it and rotates the left wheel joint at given angular velocity (rad/s)<br>4. /dd_bot/laser: Publishes laser scanner readings in terms of Range. The message type is <a href="http://docs.ros.org/melodic/api/sensor_msgs/html/msg/LaserScan.html">LaserScan</a>.<br>5. /dd_bot/control_spawner: Spawns controller node for PID control of right and left wheel controller.</p><p><strong>/gazebo: </strong>This plugin initializes a ROS node called “gazebo” and then integrates the ROS callback scheduler with Gazebo’s internal scheduler to provide the ROS interfaces described <a href="http://wiki.ros.org/gazebo">here</a>.</p><p><strong>/G2G_Controller_xxxx: </strong>This is the node containing interfaces of ROS and Gazebo simulation environment with Python code where I coded the differential drive behavior. It takes input from /dd_bot/laser and /gazebo about laser sensor readings and robot position and yaw respectively. Once the sensor inputs are available, the robot has generated a pair of left wheel RPM and right wheel RPM commands based on the complete calculations as mentioned above. This RPMs are sent to joint controllers by publishing to topics /dd_bot/right_wheel_controller and /dd_bot/left_wheel_controller</p><p>The complete repository can be found here: <a href="https://github.com/aniket0112/hyrbid_automata">Hybrid_Automata</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FREfhFG6D0zk%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DREfhFG6D0zk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FREfhFG6D0zk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c328eaf6186e935e209580c21bcd214c/href">https://medium.com/media/c328eaf6186e935e209580c21bcd214c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=351648def6cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adaptive Control of two link manipulator]]></title>
            <link>https://medium.com/@aniket0112/adaptive-control-of-two-link-manipulator-ac03091e928?source=rss-1f8386b273f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac03091e928</guid>
            <category><![CDATA[adaptive]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[simulink]]></category>
            <category><![CDATA[manipulators]]></category>
            <dc:creator><![CDATA[Aniket Sharma]]></dc:creator>
            <pubDate>Fri, 01 Mar 2019 10:00:35 GMT</pubDate>
            <atom:updated>2019-03-01T10:00:35.517Z</atom:updated>
            <content:encoded><![CDATA[<p>Robotic manipulators are highly nonlinear and coupled dynamic systems. An accurate dynamic model of the manipulator is a very challenging task to design (for example, distributed mass of the robot links is more realistic in place of lumped masses). This creates very difficult modelling challenges. Instead, this problem can be addressed by assuming the lumped model parameters to be unknown in the beginning and solve the whole control problem as an adaptive control problem. Another advantage of these type of control strategy is that performance of system can be maintained even though if the internal parameters of plant are changed (for example, mass of payload in the manipulator).</p><p>Reddit is a great community to discuss on almost every topic on the internet. I posted about my quest to design an Adaptive Control for a robotic manipulator and the resources and thanks to Jason Nezvadovitz, I was to able run an adaptive control on my twolinkman project following his paper. The thread link is: <a href="https://www.reddit.com/r/robotics/comments/8q9q4y/need_help_with_designing_a_neural_network_to/">https://www.reddit.com/r/robotics/comments/8q9q4y/need_help_with_designing_a_neural_network_to/</a></p><h3>Adaptive Control for Two-Link-Revolute Chain under Gravity</h3><p>The answer by <a href="https://www.reddit.com/user/jnez71">jnez71</a> in the Reddit thread shared above contains a PDF with the complete derivation and stability proof for Adaptive Control Law used in the project. The derivation is really well done and can be understood if you are well-versed with Linear Algebra, manipulator dynamics and Lyapunov Stability theorem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0twSCy-sQEXuPVJtBsubw.jpeg" /><figcaption>Step response of twolinkman adaptive control for different payload conditions</figcaption></figure><p>As evident from the response, the performance has not changed comparably to the degree that payload has changed (1 to 20kg) So this is a pretty decent and simple adaptive control designed. The complete Simulink model can be found here : <a href="https://github.com/aniket0112/twolinkman/tree/master/simulink">https://github.com/aniket0112/twolinkman/tree/master/simulink</a></p><p>The repository also contains a simple PID controlled Computed Torque Control of the manipulator which is tuned by using Tune feature of PID block of Simulink.</p><p>As an ending note, I have read a lot of papers on Adaptive control (tried to read at least) and it requires great deal of good linear algebra and Lyapunov Stability theorems to design one. I suggest to complete these prerequisites thoroughly before trying to design an adaptive control. Greatly thankful to reddit community for directing me in the correct direction!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac03091e928" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Twolinkman]]></title>
            <link>https://medium.com/@aniket0112/twolinkman-3b326c1320eb?source=rss-1f8386b273f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b326c1320eb</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[robotics-operating-system]]></category>
            <category><![CDATA[gazebo]]></category>
            <dc:creator><![CDATA[Aniket Sharma]]></dc:creator>
            <pubDate>Sat, 24 Mar 2018 11:59:39 GMT</pubDate>
            <atom:updated>2018-03-24T12:01:19.349Z</atom:updated>
            <content:encoded><![CDATA[<p>In continuation to the last story related to my senior year project “Exoskeleton Arm” —</p><p>I concluded the previous report of the project with the conclusion of requirement of a <em>dynamically adaptive control scheme </em>requirement for maintaining performance of the arm irrespective of load on end-effector. With this aim, the team split up into two paths to achieve it — the traditional way of Adaptive Control strategy using MRAC (Model Referenced Adaptive Control) and a new intuitive way of trying to solve the problem using Machine Learning. The following free Udacity courses served as a great tutor in my endeavour to step into the world of ML : <a href="https://in.udacity.com/course/intro-to-machine-learning--ud120">Intro to Machine Learning</a> and <a href="https://in.udacity.com/course/deep-learning--ud730">Deep Learning</a></p><p>I completed assignments provided in both the courses and when I started feeling confident about implementing it to my requirement (train my manipulator controller), the biggest problem which I did not realise during my courses came up; <strong>making your own data-set to train the model</strong>! Unlike most applications (image recognition or speech recognition app), I could not use any other robot model to train my robot because my robot parameters will fail to be exactly similar to other available models (we need to make the exoskeleton from the resources available to us).</p><p>It is not a great idea to collect data from actual prototype because I cannot manually adjust torque values for each input load. So I tried cosimulating data in ADAMS-MATLAB cosimulation environment. But MATLAB is way too sluggish and with ADAMS, it is <em>unacceptably </em>slow. The first Google search result that comes as soon as you use keywords like “robot”-”simulation”-”control” will have <strong>ROS</strong> (Robotics Operating System) in it.</p><h3>ROS and Gazebo:</h3><blockquote>ROS (Robot Operating System) provides libraries and tools to help software developers create robot applications — <a href="http://wiki.ros.org/">http://wiki.ros.org/</a></blockquote><p>It is a very powerful high-level tool to completely create software and even execute your robotic systems in real-time. It runs on Linux. In order, to visualise your robot simulations with a physics ROS is frequently integrated with <a href="http://gazebosim.org/"><strong>Gazebo</strong></a>.</p><p>** <strong>NOTE:</strong> Keep in mind compatibility between versions of OS, ROS and Gazebo before installing any one (I had to install Ubuntu 3 times and ROS 4 times to finally have all 3 of them) **</p><p>My ROS &amp; Gazebo setup suggestion is:<br>* ROS-Kinetic-Full-Desktop<br>* Gazebo 7<br>* Ubuntu 16.04</p><p>A great way to start learning ROS is: <a href="https://www.amazon.in/ROS-Robotics-Example-Carol-Fairchild/dp/1788479599/ref=sr_1_1?ie=UTF8&amp;qid=1521890009&amp;sr=8-1&amp;keywords=ros+harman">ROS Robotics By Example</a> Otherwise, you can also follow the official documentation. This book will cover everything you need to know about using the power of ROS and Gazebo together with ROS Control package to simulate your robots.</p><h3><a href="http://gazebosim.org/tutorials/?tut=ros_control">ROS Control</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JEslHNd8cFhJBPa7KudNag.png" /><figcaption>source: <a href="http://gazebosim.org/tutorials/?tut=ros_control">http://gazebosim.org/tutorials/?tut=ros_control</a></figcaption></figure><p>Detailed and better tutorials can be found in the above mentioned link as well as the book, but I will try to explain in layman language the overview of how it works.</p><p><strong>URDF: </strong>Unified Robot Description Format is an XML format of representing a robot model. You can code it or a better way is to use <strong>sw_urdf_exporter </strong>SolidWorks to URDF exporter of your CAD model designed in SolidWorks. (SolidWorks is only available on Windows though, so you have to switch OS)</p><p><strong>Xacro:</strong> Xacro is a cleaned up version of URDF. Xacro provides a set of macro operations to replace some repetitive statements with shorter, concise macros that will expand into full XML statements when processed. You can directly write a Xacro file and convert it to URDF for further use, or import a URDF from SolidWorks.</p><p><strong>SDF: </strong>Where URDF can only describe a robot and not the background objects or world objects, SDF stands higher to it in this sense. It was originally developed for Gazebo. ROS understands Xacro/URDF while Gazebo has SDF. So you need to convert the Xacro into SDF. This is not very hard, only some additional tags need to be added. You will get to know about them as you cover the ROS control tutorials.</p><p><strong>Launch:</strong> <em>roslaunch</em><strong><em> </em></strong>is most commonly used method to launch multiple nodes (independent subprograms) in ROS. You can write a <em>*.launch </em>file for your project which does: <br>1. Creates a Gazebo world and converts Xacro to SDF including extra Gazebo tags and places the robot model in Gazebo world.<br>2. Run Gazebo with customised properties (lighting direction, camera angle, simulation on/off, simulation type)</p><p><strong>YAML config:</strong> YAML is a markup language commonly used for ROS parameters. You will be using it to set your Robot and Robot’s control parameters (e.g. PID values)</p><p><strong>ros-control launch: </strong>Once your robot configuration file is also ready, create another launch file to execute the ros-control package which will specify:<br>1. joints on which effort is controlled<br>2. load controllers (PID maybe)<br>3. set controller parameters (PID values)</p><p>Running the gazebo launch file followed by ros-control launch file will start a controlled simulated environment of the whole robotic system. You can change set points by <em>publishing </em>topics from the ros-controllers generated via ros-control launch files.</p><p>This story does not focus on explaining the procedure completely. All these steps cover about 5 chapters in the book. This is a good read for people who feel — “I don’t know why I am doing this” while reading and following tutorials.</p><h3>Next goal</h3><p>Next goal will be to implement this ros-control package via Python and collect data from iterations of simulation. My codebase can be found here:</p><h3><a href="https://github.com/aniket0112/twolinkman">https://github.com/aniket0112/twolinkman</a></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCIyG7fAT5l8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCIyG7fAT5l8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCIyG7fAT5l8%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/d0c1666cc477d028f800fbc953300ad3/href">https://medium.com/media/d0c1666cc477d028f800fbc953300ad3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b326c1320eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exoskeleton Arm #1]]></title>
            <link>https://medium.com/@aniket0112/exoskeleton-arm-1-7cb70c3bb73d?source=rss-1f8386b273f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cb70c3bb73d</guid>
            <category><![CDATA[matlab]]></category>
            <category><![CDATA[robotic-arm]]></category>
            <category><![CDATA[dynamics]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Aniket Sharma]]></dc:creator>
            <pubDate>Fri, 16 Feb 2018 08:06:31 GMT</pubDate>
            <atom:updated>2018-02-16T08:15:24.601Z</atom:updated>
            <content:encoded><![CDATA[<p>This project has been undertaken by my team consisting of 3 Electrical undergrads and 4 Mechanical undergrads as an interdisciplinary final year project. We have been working on this project from July of 2017. This blog post will cover the details about what the project is, what it aims to achieve and the progress till date and future expectations.</p><h3>Introduction</h3><blockquote>“The objective of this project is to create an optimum design and build a controller of an exoskeleton arm to increase the weightlifting capacity of an average human being. It has often been observed that while handling heavy equipment and machinery, which needs to be held on the body, industrial workers experience fatigue, which reduces their work efficiency. This in turn results in breaks that are more frequent in the production cycle increasing the ineffective time, which ultimately leads to reduce the productivity. In this regard, it was decided to develop a novel design of an Upper Limb Exoskeleton, which can solve this problem and cater to the needs of workers in industry.” — Project Report</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*AnM0X-xHJTOoChqlgY7HHQ.png" /><figcaption>Not this one, of course!</figcaption></figure><p>This suit is aimed specifically for workers to help handle heavy machines at site effortlessly, <em>without a need for remote control.</em> Hence it was necessary to develop a control scheme for the exoskeleton suit. We came with a simple design depicting a <em>two-link manipulator.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*oSd4vNePhLQMgSfzxX_OtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*jyP-1EFl5YAafXAZOtoMFQ.png" /><figcaption>CAD model of pneumatic actuated two-link manipulator(Right) Human wearing the suit (Left)</figcaption></figure><p>The CAD model was designed in <em>Catia</em> by fellow Mechanical team and imported into a multi-body dynamics simulation software called <a href="http://www.mscsoftware.com/product/adams"><strong>ADAMS</strong></a><strong>. </strong>ADAMS can simulate the dynamics of a model using physical rules governing the body. It includes exerting forces on beams, loading it, putting torque on rotational joints and observing the <em>end-effector (point of manipulator where a tool is attached or held)</em> trajectory <em>via </em>animated simulations.</p><h3>Mathematical model of two-link manipulator</h3><h4>Forward and Inverse Kinematics</h4><p>Forward kinematics aims at resolving the <em>x-y-z coordinates </em>of the end-effector from input of geometrical configuration of the manipulator, i.e. <em>theta one and theta two.<br></em>Inverse kinematics aims at resolving the geometrical configuration of the manipulator,of the end-effector from input of the <em>x-y-z coordinates </em>of the end-effector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*5ZiOXO1vxwCBpS-rjuOfnA.png" /></figure><p>Refer the adjoining figure for the simplified link diagram of the two link manipulator. Joint 2 is the end-effector. The joint angle measurement and the axes at every joint are set according to the method to formulate <a href="https://en.wikipedia.org/wiki/Denavit%E2%80%93Hartenberg_parameters"><strong>Denavit-Hartenberg Matrix</strong></a><strong>. </strong>Representing a manipulator in <em>DH Matrix </em>makes it really easy and comfortable to further use geometrical configuration of the manipulator for further dynamics or other analysis. The inverse and direct kinematics equations can be found in the detailed report of this project.</p><h4>Dynamics</h4><p>For simple systems the normal procedure to study dynamics of a system is to apply <em>Newton’s Laws of Motion.</em> But such systems exist only in textbooks and direct dynamics are not possible to start by analysing all forces and torques on every joint of system. A generalised approach to analyse dynamics of a body is the <a href="https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation"><strong>Lagrange-Euler Formulation</strong></a><em>. </em>This is avery famous approach and is spread over a wide range of sciences including Calculus of Variation, Classical Mechanics, Robotics etc. The main advantage of this method is that the system taken in LE formulation is represented in <em>generalised coordinates. </em>Hence it works with all the systems that are represented in as a <em>Lagrangian —</em></p><blockquote>The <em>non-relativistic</em> Lagrangian for a system of particles can be defined by</blockquote><blockquote>L=T - V</blockquote><blockquote>where T is the total <a href="https://en.wikipedia.org/wiki/Kinetic_energy">kinetic energy</a> of the system, equalling the sum Σ of the kinetic energies of the particles, and <em>V</em> is the <a href="https://en.wikipedia.org/wiki/Potential_energy">potential energy</a> of the system. — Wikipedia</blockquote><p>The actual equations of even the simplest manipulator of all (two link) is also quite messy and <strong>HIGHLY NONLINEAR </strong>with inter-coupled variables! This is how it looks (if you skip this part, I don’t mind):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*gxf4ABOecpHJws__ylLWag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*85XCPV2JNSCQHOB0NloCvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*fh9W-o9QCck1Nyc4uTKiJA.png" /></figure><h3>Controller design</h3><p>The software loved by all engineers was second to none when it comes to designing mathematical models — <strong>MATLAB and Simulink</strong>. The new thing about this project was a multi-body dynamics simulation by co-simulating MATLAB with ADAMS. ADAMS has features for co-simulating models with MATLAB which means they will communicate their parameter values and work together to completely simulate an experiment by using multi-body dynamics of the object in ADAMS and controller design in MATLAB.</p><p>The controller problem is defined as:<br><em>“To find torques/forces at each controllable joints of the manipulator in real-time in order to track a desired time-based trajectory of end-effector as closely as possible.”</em></p><p>Because of the highly nonlinear and inter-coupled state variables in their raw form, it was not possible to move ahead and study or design anything about the controller. So the first step was to linearize the dynamics model. <strong>Feedback linearization</strong> method was employed to convert the state space form as depicted from general manipulator dynamics to error dynamics domain. Instead of controlling joint angles directly, the controller aimed at reducing the error to zero and as a result generate appropriate torque at joint angles to trace trajectories; this is called Computed Torque Control. Once linearized, any linear controller can be used to reduce the error signals. We tried two linear controllers:</p><h4>Computed Torque Control using LQR</h4><p><a href="https://robotics.stackexchange.com/questions/9967/how-to-further-understand-the-computed-torque-model-controller"><em>Computed Torque Control</em></a> is unanimously agreed to be a widely used control technique for most manipulators. Coming to the controller part of the method, a <a href="https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator">Linear Quadratic Regulator</a> was coded in MATLAB and responses were observed. A linear quadratic regulator is an optimal linear controller which not only provides desired trajectory but also <em>minimises </em>a quadratic cost function (basically a second degree polynomial whose coefficients are decided on the basis of the system on which LQR is implemented). This means you can make a function to minimise according to your need to give the best possible solution out of many available <em>which suffices your cost function’s need best. </em>For e.g. , you want to send a rocket to rescue an astronaut from space station and a rocket to interstellar journey. The preceding rocket needs to be more <em>time optimised </em>than any other parameter (need to save lives). The latter one is going to be a long journey and needs to be <em>fuel optimised</em>. In both the cases you can send the same type of rocket but the previous one with a optimal controller optimising time more than fuel and the other way around for the latter. This is the essence of optimal control systems. The responses are shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*oBoBl7sEOUU7_wvYut5CPA.png" /><figcaption>Out1: Joint Angle1; Out2: Joint Angle2; Out3: Joint Velocity1; Out4: Joint Velocity2</figcaption></figure><h4>Computed Torque Control using PD control</h4><p>Just like the LQR works in time domain, a PD control can be designed by converting a system in <em>s-domain</em> and representing it in a <em>Transfer Function</em> form. The gains were tuned and responses recorded. The complete Simulink block diagram of the co-simulation setup is shown below (orange box is imported from ADAMS as a part of co-simulation):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*43zopHOAigex9hh1yR15rQ.png" /><figcaption>Simulink Block model of the PD controller Computed Torque Control</figcaption></figure><p>Results:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBXIuzyF6CH4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBXIuzyF6CH4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBXIuzyF6CH4%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/b875dc117d4532e4e155075368c6e840/href">https://medium.com/media/b875dc117d4532e4e155075368c6e840/href</a></iframe><h3>Observations</h3><p>As shown in the video, a tuned system works only till the system remains intact. If the loading changes (which will be happening in the practical scenario) the controller needs to be upgraded to be <em>adaptive, </em>i.e. it does not have constant gains but the gains adjust themselves from feedback of how it is performing<em>.</em> The team is currently working on MRAC (Model Referenced Adaptive Control) and Neural Networks. Neural Networks is a new thing for us (no experience earlier) so just giving it a shot if we can develop a Machine Learnt model from the simulation data. Hope to post positive results in the next part of this blog!</p><h3>Links</h3><p>Github: <a href="https://github.com/aniket0112/exoskeleton">https://github.com/aniket0112/exoskeleton</a></p><p>Detailed report of the project: <a href="https://drive.google.com/open?id=1DlJSALyn2_9ZNT8b_C0S7Ar9Yryk4Lw7">Google Drive</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cb70c3bb73d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Just setting up my Medium Blog]]></title>
            <link>https://medium.com/@aniket0112/just-setting-up-my-medium-blog-6a4734787505?source=rss-1f8386b273f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a4734787505</guid>
            <category><![CDATA[first-post]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[robotic-arm]]></category>
            <dc:creator><![CDATA[Aniket Sharma]]></dc:creator>
            <pubDate>Mon, 12 Feb 2018 15:22:22 GMT</pubDate>
            <atom:updated>2018-02-12T15:22:22.337Z</atom:updated>
            <content:encoded><![CDATA[<p>I got to know about Medium from my friends and thought to try it out and found it really interesting. I used to blog about my projects and my experiences with robotics and control systems; but it has been on halt for around an year due to some reasons. So just rebooting my blog with a better platform (of course Blogger sucked). Just to keep a record, this was my old blog link: <a href="http://codedating.blogspot.in/">CodeDating</a> (I know, a very quirky name…).</p><p>Currently I am continuing my Udacity Course on Deep Learning and thinking if I can implement some neural networks on my final year project — Exoskeleton Arm. I will be sharing about that project soon. Signing off!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a4734787505" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>