{"id":21431739,"url":"https://github.com/robotical/marty_laser","last_synced_at":"2025-03-16T22:33:11.253Z","repository":{"id":110173132,"uuid":"99820265","full_name":"robotical/marty_laser","owner":"robotical","description":"Laser range finder over ROS","archived":false,"fork":false,"pushed_at":"2017-08-29T15:26:44.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-23T08:41:46.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robotical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-09T14:53:24.000Z","updated_at":"2022-12-16T01:43:06.000Z","dependencies_parsed_at":"2023-03-14T06:15:33.652Z","dependency_job_id":null,"html_url":"https://github.com/robotical/marty_laser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotical%2Fmarty_laser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotical%2Fmarty_laser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotical%2Fmarty_laser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotical%2Fmarty_laser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robotical","download_url":"https://codeload.github.com/robotical/marty_laser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243944930,"owners_count":20372885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T23:14:23.275Z","updated_at":"2025-03-16T22:33:11.241Z","avatar_url":"https://github.com/robotical.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# marty_laser\nThis class controls the operation of our DIY laser range finder, which uses visual data from a\ncamera to estimate distances to objects.\n\nIn this setup, the camera and the laser are mounted in parallel.\n\nThis concept works on a simple principle: the closer the dot is to the bottom of the image, the closer the object is, and vice-versa. The movement of this dot can be tracked and matched to a known distance.\n\nThis principle can be extended to line lasers, where a horizontally positioned laser can be used to collect 2D data.\n\n\u003e CAUTION: this is bleeding edge and highly experimental. Still a WIP.\n\u003e\n\u003e Currently only performs range estimation based on a \"dot\" laser (think laser\npointers). \"Line\" laser range estimation is still in-dev.\n\n## Installation\n\nTo install, simply clone this repo into your `catkin` workspace and perform a `catkin_make`. For example, cloning onto your Marty:\n\n    cd ~/marty_ws/src\n    git clone https://github.com/robotical/marty_laser.git\n    cd .. \u0026\u0026 catkin_make\n\n## Running\n\nTo execute the node, simple `roslaunch` the launch file:\n\n    roslaunch marty_laser laser_node.launch\n\nBy default, the node is set to not show the result of image processing, if you wish to see this set the `laser_video_out` param in `laser_params.yaml` to True.\n\nOnce executed, this node will publish range estimation over the `/marty/laser/distance` topic.\n\n## Configuration\n\nSee the provided configuration file, `laser_params.yaml` for details on configuration.\n\n\u003e Note: currently, the node is calibrated for a **red** laser on a white background. You will most likely have to alter both the lower and upper thresholding values to suit your environment. In addition to this, you will most likely have to alter the range estimation function defined in `calc_distance()`, as minute differences in your laser/camera setup can cause varying results. These are fortunately relatively easy to obtain experimentally.\n\n## Accuracy\n\nThe accuracy of your obtained results are *hugely* dependent on a number of factors:\n\n  1. the suitability of your colour thresholding parameters\n  2. the accuracy of your range estimation function\n  3. the design of your laser and camera mount\n\nFor 1, this rangefinder will not be able to provide you with a range\nestimation if it cannot detect the laser to begin with. There are default\nthresholding parameters provided in `laser_params.yaml`\n(HSV values for a red laser) but you will very likely have to tweak these\nfor your own operating environment. To aid with this, you can enable\n`laser_video_out` and `threshold_config`, which will bring up a video feed\nwith configuration trackbars. You can adjust the settings until you find\none that is suitable and then replace the values in `laser_params.yaml`.\nNote: the HSV colour space has been inverted (to simplify the detection\nof red).\n\nFor 2, creating a good function is dependent on good experimental practices.\nThe provided function (in `calc_distance()`) was obtained by plotting the\nposition of the centroid of the laser dot against known distances.\n\nFor 3, having a loose mount where the laser and/or the camera can move\nrelative to each other is a bad idea. The method implemented in this\nlibrary uses movement in the y axis, so for that reason the laser and\ncamera are mounted inline vertically. For best results, ensure that\nyour laser and camera are *secure* and will not move relative to each\nother.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotical%2Fmarty_laser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotical%2Fmarty_laser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotical%2Fmarty_laser/lists"}