{"id":353,"date":"2020-04-03T04:03:53","date_gmt":"2020-04-03T04:03:53","guid":{"rendered":"http:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/?page_id=353"},"modified":"2020-05-08T20:48:09","modified_gmt":"2020-05-08T20:48:09","slug":"slam-subsystem","status":"publish","type":"page","link":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/slam-subsystem\/","title":{"rendered":"SLAM Subsystem"},"content":{"rendered":"<h3 style=\"text-align: center\">Spring Semester Implementation Details<\/h3>\n<h4>Simulation<\/h4>\n<h5>Milestone For SVD<\/h5>\n<div class=\"pdf-page-container page-container ng-scope\">\n<div class=\"plv-page-view page-view\">\n<div class=\"plv-text-layer text-layer\">We are currently using the real-time appearance-based mapping (RTAB) algorithm for semi-dense mapping. RTAB was chosen due to its versatility in sensor combination and its ability to take in odometry as input. Initially, the robot\u2019s current state was estimated from fusing the wheel odometry with the filtered IMU data using an extended Kalman Filter. This approach was later dropped due to erroneous wheel odometry generated due to wheel slip in both simulation and hardware. Currently, odometry is generated using the ICP algorithm which registers current pointcloud with the original map cloud. It also utilizes the IMU data as an initial estimate. The point clouds are preprocessed for better registration. The point cloud from the depth camera and the 3D lidar are fused together by a custom node to better register objects closer to the robot. We also perform RGB to depth registration using the rgbd_sync nodelet of RTAB. A few parameters in the configuration of RTAB that were crucial in getting the desired performance are:<\/div>\n<ul>\n<li class=\"plv-text-layer text-layer\">Setting ICP\/PointToPlane to True (Other option is point to point)<\/li>\n<li class=\"plv-text-layer text-layer\">Voxel Size : 0.2m (Affects runtime\/publish rate)<\/li>\n<li class=\"plv-text-layer text-layer\">Grid\/RayTracing is set to True (Improves fill-in of the 2D gridmap)<\/li>\n<li class=\"plv-text-layer text-layer\">NeighborLinkRefining is set to True (Optimizes graph based on loop closures)<\/li>\n<\/ul>\n<div class=\"plv-text-layer text-layer\">The current major challenge for the localization system is a discontinuity in pose estimates. As the current pose is provided by an iterative algorithm, there is no constraint on a current pose being continuous w.r.t the previous pose. This results in the robot jumping by small amounts on the map. Although the accuracy of the pose localization is within limits, this discontinuity is a cause of concern for the planner.<\/div>\n<\/div>\n<\/div>\n<h5>Prior Work<\/h5>\n<p>The algorithm we&#8217;re using here is Real-Time Appearance Based Mapping (RTAB-map), primarily because our system uses a similar sensor suite that this algorithm utilizes for SLAM (i.e. a laser scanner, a stereo camera, and a wheel encoder), and that this system will provide us with a semi-dense map, which will fulfill our sponsor requirement. In order to overcome drift, we have set up the SLAM stack to map using point clouds and localize using loop closure from the camera RGB-D images. We fuse the LiDAR and RealSense point clouds to observe the environment. Some crucial parameters that we modified include setting &#8220;subscribe_rgbd&#8221; to true, &#8220;subscribe_scan_cloud&#8221; to true,\u00a0<span class=\"pl-s\"><span class=\"pl-pds\">&#8220;<\/span>Grid\/RayTracing<span class=\"pl-pds\">&#8221; to true.<\/span><\/span><\/p>\n<p>To illustrate more about sensor fusion, there are two things worth bringing up. First, the RGB and the depth image are synchronized with a nodelet called rtabmap_ros\/rgbd_sync provided by Rtabmap. The synchronized image is republished as rgbd_image and later fed into Rtabmap. Second, we wrote a new node combining the depth point cloud coming from the front camera and the 3D point cloud coming from the 3D lidar in order to make full use of those data. The combined point cloud message is republished through the ROS network, and we down-project it into a grid map in Rtabmap.<\/p>\n<p>Below are maps we generated using the abovementioned configurations. The obstacles are the pre-occupied cars in the parking lot.<\/p>\n<div id='gallery-1' class='gallery galleryid-353 gallery-columns-2 gallery-size-large'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/slam-subsystem\/mapwithpclcombined\/'><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"702\" src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-1024x702.png\" class=\"attachment-large size-large\" alt=\"\" aria-describedby=\"gallery-1-435\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-1024x702.png 1024w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-300x206.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-768x527.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-830x569.png 830w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-230x158.png 230w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-350x240.png 350w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined-480x329.png 480w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/mapWithPCLCombined.png 1178w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-435'>\n\t\t\t\tGenerated Grid map\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/slam-subsystem\/bestmapever\/'><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"727\" src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-1024x727.png\" class=\"attachment-large size-large\" alt=\"\" aria-describedby=\"gallery-1-434\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-1024x727.png 1024w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-300x213.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-768x545.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-830x589.png 830w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-230x163.png 230w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-350x248.png 350w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver-480x341.png 480w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/04\/bestMapEver.png 1136w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-434'>\n\t\t\t\tGenerated Cloud map \n\t\t\t\t<\/figcaption><\/figure>\n\t\t<\/div>\n\n<h4>Hardware<\/h4>\n<p>We have tested our current SLAM subsystem stack on hardware with our custom PCB embedded. Since we have no access to the campus this semester, the test was done in Subbu&#8217;s house. We tele-operate the Husky around the first floor while running ICP odometry as well as RTAB-mapping.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-555 aligncenter\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map-300x201.png\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map-300x201.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map-768x515.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map-230x154.png 230w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map-350x235.png 350w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map-480x322.png 480w, https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-content\/uploads\/sites\/48\/2020\/05\/husky_map.png 776w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: center\">2D grid map<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Semester Implementation Details Simulation Milestone For SVD We are currently using the real-time appearance-based mapping (RTAB) algorithm for semi-dense mapping. RTAB [&hellip;]<\/p>\n","protected":false},"author":220,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/page_fullwidth.php","meta":{"footnotes":""},"class_list":["post-353","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/pages\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/users\/220"}],"replies":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":11,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/pages\/353\/revisions"}],"predecessor-version":[{"id":556,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/pages\/353\/revisions\/556"}],"wp:attachment":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2020teami\/wp-json\/wp\/v2\/media?parent=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}