{"id":15142496,"url":"https://github.com/ldrobotsensorteam/ldlidar_ros","last_synced_at":"2025-08-21T18:32:50.869Z","repository":{"id":150589494,"uuid":"603712063","full_name":"ldrobotSensorTeam/ldlidar_ros","owner":"ldrobotSensorTeam","description":"LDROBOT LiDAR ROS Package(NEW)","archived":false,"fork":false,"pushed_at":"2023-03-12T15:29:28.000Z","size":81,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-01T12:42:24.219Z","etag":null,"topics":["ld06","ld14","ld14p","ld19","ldrobot","ros"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ldrobotSensorTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-19T11:03:12.000Z","updated_at":"2024-10-29T12:11:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e9dc829-b168-447e-aeca-ce71b2f4c014","html_url":"https://github.com/ldrobotSensorTeam/ldlidar_ros","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.21052631578947367","last_synced_commit":"75a892f1f530b7da9c3fca06e5a4614fa169bcef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldrobotSensorTeam%2Fldlidar_ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldrobotSensorTeam%2Fldlidar_ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldrobotSensorTeam%2Fldlidar_ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldrobotSensorTeam%2Fldlidar_ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldrobotSensorTeam","download_url":"https://codeload.github.com/ldrobotSensorTeam/ldlidar_ros/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230526354,"owners_count":18239830,"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":["ld06","ld14","ld14p","ld19","ldrobot","ros"],"created_at":"2024-09-26T09:41:53.642Z","updated_at":"2024-12-20T02:41:15.061Z","avatar_url":"https://github.com/ldrobotSensorTeam.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instructions\n\n## step 0: get LiDAR ROS Package\n```bash\ncd ~\n\nmkdir -p ldlidar_ros_ws/src\n\ncd ldlidar_ros_ws/src\n\ngit clone  https://github.com/ldrobotSensorTeam/ldlidar_ros.git\n\ngit submodule update --init --recursive\n```\n## step 1: system setup\n- Connect the LiDAR to your system motherboard via an onboard serial port or usB-to-serial module (for example, CP2102 module).\n\n- Set the -x permission for the serial port device mounted by the radar in the system (for example, /dev/ttyUSB0)\n\n  - In actual use, the LiDAR can be set according to the actual mounted status of your system, you can use 'ls -l /dev' command to view.\n\n``` bash\ncd ~/ldlidar_ros_ws\n\nsudo chmod 777 /dev/ttyUSB0\n```\n- Modify the `port_name` value in the Lanuch file corresponding to the radar product model under `launch/`, using `ld14.launch` as an example, as shown below.\n\n``` xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003claunch\u003e\n\u003carg name=\"laser_scan_topic_name\" default=\"scan\"/\u003e\n\u003carg name=\"point_cloud_2d_topic_name\" default=\"pointcloud2d\"/\u003e\n\u003carg name=\"frame_id\" default=\"base_laser\"/\u003e\n\u003carg name=\"port_name\" default=\"/dev/ttyUSB0\"/\u003e\n\u003carg name=\"fix_to_base_link\" default=\"true\" /\u003e\n\n\u003c!-- LDROBOT LiDAR message publisher node --\u003e\n \u003cnode name=\"ldlidar_publisher_ld14\" pkg=\"ldlidar_ros\" type=\"ldlidar_ros_node\" output=\"screen\"\u003e\n  \u003cparam name=\"product_name\" value=\"LDLiDAR_LD14\"/\u003e\n  \u003cparam name=\"laser_scan_topic_name\" value=\"$(arg laser_scan_topic_name)\"/\u003e\n  \u003cparam name=\"point_cloud_2d_topic_name\" value=\"$(arg point_cloud_2d_topic_name)\"/\u003e\n  \u003cparam name=\"frame_id\" value=\"$(arg frame_id)\"/\u003e\n  \u003cparam name=\"port_name\" value=\"$(arg port_name)\"/\u003e\n  \u003cparam name=\"serial_baudrate\" value=\"115200\"/\u003e\n  \u003c!-- Set laser scan directon: --\u003e\n  \u003c!--    1. Set counterclockwise, example: \u003cparam name=\"laser_scan_dir\" type=\"bool\" value=\"true\"/\u003e --\u003e\n  \u003c!--    2. Set clockwise,        example: \u003cparam name=\"laser_scan_dir\" type=\"bool\" value=\"false\"/\u003e --\u003e\n  \u003cparam name=\"laser_scan_dir\" type=\"bool\" value=\"true\"/\u003e\n  \u003c!-- Angle crop setting, Mask data within the set angle range --\u003e\n  \u003c!--    1. Enable angle crop fuction: --\u003e\n  \u003c!--       1.1. enable angle crop,  example: \u003cparam name=\"enable_angle_crop_func\" type=\"bool\" value=\"true\"/\u003e --\u003e\n  \u003c!--       1.2. disable angle crop, example: \u003cparam name=\"enable_angle_crop_func\" type=\"bool\" value=\"false\"/\u003e --\u003e\n  \u003cparam name=\"enable_angle_crop_func\" type=\"bool\" value=\"false\"/\u003e\n  \u003c!--    2. Angle cropping interval setting, The distance and intensity data within the set angle range will be set to 0 --\u003e \n  \u003c!--       angle \u003e= \"angle_crop_min\" and angle \u003c= \"angle_crop_max\", unit is degress --\u003e\n  \u003cparam name=\"angle_crop_min\" type=\"double\" value=\"135.0\"/\u003e\n  \u003cparam name=\"angle_crop_max\" type=\"double\" value=\"225.0\"/\u003e\n \u003c/node\u003e\n \u003c!-- publisher tf transform, parents frame is base_link, child frame is base_laser --\u003e\n \u003c!-- args=\"x y z yaw pitch roll parents_frame_id child_frame_id period_in_ms\"--\u003e\n \u003cnode name=\"base_to_laser_ld14\" pkg=\"tf\" type=\"static_transform_publisher\"  args=\"0.0 0.0 0.18 0 0.0 0.0 base_link base_laser 50\" if=\"$(arg fix_to_base_link)\"/\u003e\n\u003c/launch\u003e\n\n```\n## step 2: build\n- install package depend\n```bash\ncd ~/ldlidar_ros_ws\n\nrosdep install --from-paths src --ignore-src  -r -y\n```\n\n- build compile\n```bash\ncd ~/ldlidar_ros_ws\n\ncatkin_make\n```\n## step 3: run\n\n### step3.1: package environment variable settings\n\n- After the compilation is completed, you need to add the relevant files generated by the compilation to the environment variables, so that the ROS environment can recognize them. The execution command is as follows. This command is to temporarily add environment variables to the terminal, which means that if you reopen a new terminal, you also need to re-execute it. The following command.\n  \n    ```bash\n    cd ~/ldlidar_ros_ws\n\n    source devel/setup.bash\n    ```\n  \n- In order to never need to execute the above command to add environment variables after reopening the terminal, you can do the following.\n\n  ```bash\n  echo \"source ~/ldlidar_ros_ws/devel/setup.bash\" \u003e\u003e ~/.bashrc\n\n  source ~/.bashrc\n  ```\n### step3.2: start LiDAR node\n- The product is LDROBOT LiDAR LD14\n  - start ld14 lidar node:\n  ``` bash\n  roslaunch ldlidar_ros ld14.launch\n  ```\n  - start ld14 lidar node and show on the Rviz:\n  ``` bash\n  # if ROS_DISTRO in 'kinetic' or 'melodic'\n  roslaunch ldlidar_ros viewer_ld14_kinetic_melodic.launch\n  # if ROS_DISTRO in 'noetic'\n  roslaunch ldlidar_ros viewer_ld14_noetic.launch\n  ```\n- The product is LDROBOT LiDAR LD14P\n  - start ld14p lidar node:\n  ``` bash\n  roslaunch ldlidar_ros ld14p.launch\n  ```\n  - start ld14p lidar node and show on the Rviz:\n  ``` bash\n  # if ROS_DISTRO in 'kinetic' or 'melodic'\n  roslaunch ldlidar_ros viewer_ld14p_kinetic_melodic.launch\n  # if ROS_DISTRO in 'noetic'\n  roslaunch ldlidar_ros viewer_ld14p_noetic.launch\n  ```\n\n- The product is LDROBOT LiDAR LD06\n  - start ld06 lidar node:\n  ``` bash\n  roslaunch ldlidar_ros ld06.launch\n  ```\n  - start ld06 lidar node and show on the Rviz:\n  ``` bash\n  # if ROS_DISTRO in 'kinetic' or 'melodic'\n  roslaunch ldlidar_ros viewer_ld06_kinetic_melodic.launch\n  # if ROS_DISTRO in 'noetic'\n  roslaunch ldlidar_ros viewer_ld06_noetic.launch\n  ```\n\n- The product is LDROBOT LiDAR LD19\n  - start ld19 lidar node:\n  ``` bash\n  roslaunch ldlidar_ros ld19.launch\n  ```\n  - start ld19 lidar node and show on the Rviz:\n  ``` bash\n  # if ROS_DISTRO in 'kinetic' or 'melodic'\n  roslaunch ldlidar_ros viewer_ld19_kinetic_melodic.launch\n  # if ROS_DISTRO in 'noetic'\n  roslaunch ldlidar_ros viewer_ld19_noetic.launch\n  ```\n\n## step 4: test\n\n\u003e The code was tested under ubuntu16.04 ROS kinetic、ubuntu18.04 ROS melodic、ubuntu20.04 ROS noetic, using rviz visualization.\n\n- new a terminal (Ctrl + Alt + T) and use Rviz tool,open the rviz config file below the rviz folder of the readme file directory\n```bash\nrviz\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldrobotsensorteam%2Fldlidar_ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldrobotsensorteam%2Fldlidar_ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldrobotsensorteam%2Fldlidar_ros/lists"}