{"id":281,"date":"2015-10-23T13:58:16","date_gmt":"2015-10-23T17:58:16","guid":{"rendered":"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/?page_id=281"},"modified":"2016-05-06T19:50:42","modified_gmt":"2016-05-06T23:50:42","slug":"software-subsystem","status":"publish","type":"page","link":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/software-subsystem\/","title":{"rendered":"Software Subsystem"},"content":{"rendered":"<h2 style=\"text-align: justify\">Path Planning and Localization<\/h2>\n<p style=\"text-align: justify\">The ROS Navigation stack is capable of accepting sensor data, a pre-generated map, odometry data, etc. and process it all via its global and local planner to generate velocity commands which are then used to drive the actuators. A point cloud-generated map will be pre-loaded on the robot to aid in localization. Region Growing, feature point tracking across closely spaced frames, or motion modelling are a few of the methods for visual odometry along with the point cloud from Xtion Pro. Particle filter-based Monte Carlo localization is an effective method for determining the robot\u2019s pose and is based on the concept of particle filters.\u00a0 These filters work on the principle of Bayesian probability and use randomly generated particles to estimate posterior belief.<\/p>\n<p style=\"text-align: justify\">For path planning there are two cost maps which are used. One is the global cost map used to generate long-term plans over the entire map and other is local cost map used for short term plans and obstacle avoidance.<\/p>\n<p style=\"text-align: justify\">The twist messages published by the navigation stack can\u2019t be directly executed by our platform since it is capable of only holonomic turns. To take care of this, a local ROS node running on the platform processes these commands and breaks them down in to segmented arc moves (by performing turn-in-place and linear moves sequentially).<\/p>\n<p style=\"text-align: justify\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-905 size-medium\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-3-300x247.jpg\" alt=\"1\" width=\"300\" height=\"247\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-3-300x247.jpg 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-3-768x632.jpg 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-3.jpg 1016w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/2-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-906 size-medium\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/2-3-300x247.jpg\" alt=\"2\" width=\"300\" height=\"247\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/2-3-300x247.jpg 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/2-3-768x632.jpg 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/2-3.jpg 1008w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-907 size-medium\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/3-300x248.jpg\" alt=\"3\" width=\"300\" height=\"248\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/3-300x248.jpg 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/3-768x636.jpg 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/3-1024x848.jpg 1024w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/3.jpg 1028w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center\">Particle filter in action<\/p>\n<p class=\"line862\">The local planner being used for navigation is Dynamic Window Approach Planner. The <tt class=\"backtick\">dwa_local_planner<\/tt> package provides a controller that drives a mobile base in the plane. This controller serves to connect the path planner to the robot. Using a map, the planner creates a kinematic trajectory for the robot to get from a start to a goal location. Along the way, the planner creates, at least locally around the robot, a value function, represented as a grid map. This value function encodes the costs of traversing through the grid cells. The controller&#8217;s job is to use this value function to determine dx,dy,dtheta velocities to send to the robot.<span id=\"line-7\" class=\"anchor\"><\/span><span id=\"line-8\" class=\"anchor\"><\/span><\/p>\n<p class=\"line862\"><a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/local_plan.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-909 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/local_plan.png\" alt=\"local_plan\" width=\"750\" height=\"414\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/local_plan.png 750w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/local_plan-300x166.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/p>\n<p class=\"line862\" style=\"text-align: center\">DWA Planner in action<\/p>\n<h2><\/h2>\n<h2>Mapping<\/h2>\n<p>The map of the parking lot is critical for localization and path planning subsystems. It was therefore decided to use Xaxxon Oculus Prime API and alongwith robust ROS S.L.A.M package <strong>gmapping<\/strong> to build an accurate map of the environment. Oculus prime provides an interface through their remote server application to use ros gmapping. Using the navigation interface it is possible to move the robot around starting from docked position make a 2D floor plan type map of the environment. The ROS<strong> depthimage_to_laserscan<\/strong> package is used to convert the depth image data of Asus Xtion Pro into laser scan data compatible with gmapping package. This is then fed into the gmapping ROS package with other robot parameters. When the mapping routine is complete, the map can be stored as a .pgm file. After a satisfactory map is obtained, it can be edited using a BitMap editor to enhance features.<\/p>\n<div id=\"attachment_643\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/Selection_009.gif\" rel=\"attachment wp-att-643\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-643\" class=\"wp-image-643\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/Selection_009.gif\" alt=\"Selection_009\" width=\"790\" height=\"405\" \/><\/a><p id=\"caption-attachment-643\" class=\"wp-caption-text\">Flowchart detailing complete mapping procedure<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_787\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1.png\" rel=\"attachment wp-att-787\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-787\" class=\"wp-image-787 size-medium\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-e1459487928492-300x256.png\" alt=\"Current Map of the Parking Lot\" width=\"300\" height=\"256\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-e1459487928492-300x256.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/1-e1459487928492.png 427w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-787\" class=\"wp-caption-text\">Current Map of the Parking Lot<\/p><\/div>\n<p>&nbsp;<\/p>\n<h2>Navigation<\/h2>\n<p>The navigation on the platform is carried out by setting way-points using the TelNet API. These way-points are then called by in a sequential manner to make the platform towards its destination. The network of way-points can be seen in the figure below.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_884\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/Capture-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-884\" class=\"wp-image-884 size-medium\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/Capture-1-300x266.jpg\" alt=\"Capture\" width=\"300\" height=\"266\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/Capture-1-300x266.jpg 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-content\/uploads\/sites\/10\/2015\/10\/Capture-1.jpg 727w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-884\" class=\"wp-caption-text\">Network of Waypoints<\/p><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Path Planning and Localization The ROS Navigation stack is capable of accepting sensor data, a pre-generated map, odometry data, etc. and process it all via its global and local planner to generate velocity commands which are then used to drive the actuators. A point cloud-generated map will be pre-loaded on the robot to aid in<br \/><a class=\"moretag\" href=\"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/software-subsystem\/\">+ Read More<\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template_parts\/page-fullwidth_template.php","meta":{"footnotes":""},"class_list":["post-281","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/pages\/281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":19,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/pages\/281\/revisions"}],"predecessor-version":[{"id":912,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/pages\/281\/revisions\/912"}],"wp:attachment":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2015teami\/wp-json\/wp\/v2\/media?parent=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}