{"id":31023295,"url":"https://github.com/vectr-ucla/optmap","last_synced_at":"2025-10-28T06:41:52.841Z","repository":{"id":314343022,"uuid":"1055132990","full_name":"vectr-ucla/optmap","owner":"vectr-ucla","description":"Real-time geometric map distillation, a fast and flexible LiDAR mapping package.","archived":false,"fork":false,"pushed_at":"2025-09-30T00:03:57.000Z","size":7728,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-30T02:21:58.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/vectr-ucla.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-11T20:19:58.000Z","updated_at":"2025-09-30T00:03:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a870922-57d4-44ab-b6a9-1a18f3b28d92","html_url":"https://github.com/vectr-ucla/optmap","commit_stats":null,"previous_names":["vectr-ucla/optmap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vectr-ucla/optmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectr-ucla%2Foptmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectr-ucla%2Foptmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectr-ucla%2Foptmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectr-ucla%2Foptmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vectr-ucla","download_url":"https://codeload.github.com/vectr-ucla/optmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectr-ucla%2Foptmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019401,"owners_count":26086575,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-13T13:54:25.223Z","updated_at":"2025-10-14T12:04:50.542Z","avatar_url":"https://github.com/vectr-ucla.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OptMap\nReal-time geometric map distillation for fast and flexible LiDAR map generation using streaming submodular maximization.\n\nROS2 code [here](https://github.com/vectr-ucla/optmap/tree/ros2).\n\n\u003cbr\u003e\n\u003cp align='center'\u003e\n    \u003cimg src=\"./doc/optmap_pipeline.PNG\" alt=\"drawing\" width=\"720\"/\u003e\n\u003c/p\u003e\n\u003cp align=center\u003eOptMap pipeline with three stages, descriptor set generation, dynamically reordered streaming submodular maximization, and map loading.\u003c/p align=center\u003e\n\n## Dependencies\n- Ubuntu 20.04\n- ROS Noetic (`roscpp`, `std_msgs`, `sensor_msgs`, `geometry_msgs`, `nav_msgs`, `pcl_ros`)\n- C++ 17\n- CMake \u003e= `3.12.4`\n- OpenMP \u003e= `4.5`\n- Point Cloud Library \u003e= `1.10.0`\n- Eigen \u003e= `3.3.7`\n\n```\nsudo apt install libomp-dev libpcl-dev libeigen3-dev\n```\n\nPython dependencies for the descriptor neural network are found in scripts/nn/pkg_install.txt. Instructions for installing pytorch found [here](https://pytorch.org/get-started/locally/) and instructions for installing nvidia drivers found [here](https://documentation.ubuntu.com/server/how-to/graphics/install-nvidia-drivers/).\n\nDownload weights for the descriptor neural network from [https://drive.google.com/file/d/1pry7TpMq2wzfnhBgmKWKNBYuHVmOs_jM/view?usp=sharing](https://drive.google.com/file/d/1pry7TpMq2wzfnhBgmKWKNBYuHVmOs_jM/view?usp=sharing) and save them to scripts/nn/.\n\n## Overview\nOptMap contains two nodes: the primary optmap node is a LiDAR mapping node which can be used to generate customized maps in real time, and the second generates point cloud descriptors which are used by the optmap node to select output maps. Both are launched from the same launch file `optmap.launch`.\n\n## Setup\nOptMap is meant to run alongside a LiDAR SLAM or odometry algorithm (ex. DLIO https://github.com/vectr-ucla/direct_lidar_inertial_odometry/tree/feature/optmap). Clone both OptMap and the LiDAR SLAM/odometry package into the same workspace. For interfacing, OptMap relies on two subscriptions from the SLAM/odometry package: (i) a point cloud with motion correction or any moving object filters applied (type sensor_msgs::PointCloud2) with points in a global frame and (ii) a corresponding scan pose with the scan index sent using a custom message type (OptMap::OptmapPose). The OptmapPose message contains a geometry_msgs::Pose which is the pose of the sensor when the scan was collected, and an integer which is equal to pointcloud-\u003eheader.seq for the corresponding scan. Note that publishing sequential PointCloud2 messages autofills the pointcloud-\u003eheader.seq field according to how many point clouds have been published on the topic.\n\nSee the modifications for DLIO at https://github.com/vectr-ucla/direct_lidar_inertial_odometry/tree/feature/optmap. Note that if the SLAM/odometry already uses custom ROS messages, the OptmapPose.msg file can be directly copied into its msg directory. If the SLAM/odometry does not use custom messages, the package will need to be modified to do so (https://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv).\n\nOnce the OptMap pose topic is added to the SLAM/odometry pacakge, build both in the same workspace.\n\n## Launching\nLaunching optmap requires providing the topics for the relevant publishers from the LiDAR SLAM/odometry package. Both nodes within OptMap are launched using the command:\n\n```\nroslaunch optmap optmap.launch\n  pointcloud_topic:={PC_from_SLAM}\n  pose_topic:={pose_from_SLAM}\n```\n\n## CLI Service Calls\nBelow are examples of how to call various optmap services using rosservice CLI:\n```\nrosservice call /optmap/optmap_node/optmap_set_voxelization 0.5\nrosservice call /optmap/optmap_node/optmap_full \"{num_scans: 5, output_folder: '/home/vectr', save_map: true, save_poses: true}\"\nrosservice call /optmap/optmap_node/optmap_position \"{num_scans: 5, x: [0], y: [0], z: [0], r: [10], output_folder: '/home/vectr', save_map: true}\"\nrosservice call /optmap/optmap_node/optmap_position_and_time \"{num_scans: 5, x: [0, -4, -12.2], y: [0, 2.5, 15], z: [0, 0, 0], r: [10, 2, 15], t1: [1749054988], t2: [1749055020], output_folder: '/home/vectr', save_map: true}\"\n```\nNote that time constraints are in Unix time, and optmap saves scan timestamps according to the pointcloud timestamp by default.\n\n## Loop Closure Corrections\nUpdating scan poses from SLAM loop closures is an important feature for a geometric mapping algorithm, note that implementation for loop closure corrections in OptMap currently only updates scan positions and not orientations. \n\nA loop closure correction can be sent to OptMap via the pose_update_topic which can be specified in the launch command by adding `pose_update_topic:={loop_closure_from_SLAM}`. The message type is OptMap::OptmapPoseArray.msg which contains a vector of OptmapPoses. We assume the loop closure uses the output of a factor or pose graph solve, where the new poses of those scans associated with the nodes of the graph should be sent. \n\nDevelopment is currently under way on incorporating orientation updates.\n\n\u003cbr\u003e\n\u003cp align='center'\u003e\n    \u003cimg src=\"./doc/kitti.PNG\" alt=\"drawing\" width=\"720\"/\u003e\n\u003c/p\u003e\n\u003cp align=center\u003eSemantic KITII Sequence 02 summary maps with 100, 250, and 500 scans.\u003c/p align=center\u003e\n\n\u003cbr\u003e\n\u003cp align='center'\u003e\n    \u003cimg src=\"./doc/NCD.PNG\" alt=\"drawing\" width=\"360\"/\u003e\n\u003c/p\u003e\n\u003cp align=center\u003eNewer College Dataset Long Experiment 250 scan summary map showcases significant level of detail made available by OptMap.\u003c/p align=center\u003e\n\n\u003cbr\u003e\n\u003cp align='center'\u003e\n    \u003cimg src=\"./doc/forestloop.PNG\" alt=\"drawing\" width=\"360\"/\u003e\n\u003c/p\u003e\n\u003cp align=center\u003e500 scan summary map of large custom forest loop dataset which traversed 2.3 km.\u003c/p align=center\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectr-ucla%2Foptmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectr-ucla%2Foptmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectr-ucla%2Foptmap/lists"}