{"id":19526611,"url":"https://github.com/zju-fast-lab/lf-3pm","last_synced_at":"2025-07-15T03:33:34.709Z","repository":{"id":230743530,"uuid":"773276217","full_name":"ZJU-FAST-Lab/LF-3PM","owner":"ZJU-FAST-Lab","description":"a LiDAR-based Framework for Perception-aware Planning with Perturbation-induced Metric","archived":false,"fork":false,"pushed_at":"2025-04-18T13:28:44.000Z","size":2618,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-19T02:33:04.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/ZJU-FAST-Lab.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":"2024-03-17T08:11:35.000Z","updated_at":"2025-04-18T13:28:48.000Z","dependencies_parsed_at":"2025-01-08T15:34:45.068Z","dependency_job_id":"f8a66a83-0f2d-4484-99e7-28041548491a","html_url":"https://github.com/ZJU-FAST-Lab/LF-3PM","commit_stats":null,"previous_names":["zju-fast-lab/lf-3pm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZJU-FAST-Lab/LF-3PM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FLF-3PM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FLF-3PM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FLF-3PM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FLF-3PM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJU-FAST-Lab","download_url":"https://codeload.github.com/ZJU-FAST-Lab/LF-3PM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FLF-3PM/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265397661,"owners_count":23758450,"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-11T01:10:54.619Z","updated_at":"2025-07-15T03:33:34.697Z","avatar_url":"https://github.com/ZJU-FAST-Lab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# LF-3PM    :construction: **_To be released_**\na LiDAR-based Framework for Perception-aware Planning with Perturbation-induced Metric\n\n[🎉] Our work is accepted by IROS2024. We are grateful for the constructive feedback from the reviewers. We are currently revising the final version of the paper according to the suggestions and refactoring the source code to make it clearer and more readable. The author is struggling to apply for a PhD program and hardly has extra time to sort an easy-to-use code. \n\u003c!-- # LiDAR-based Perception Aware Planning --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"md_floder/preview.png\" width = 80% height = 80% /\u003e\n\u003c/div\u003e\n\n## 1、Installation\nubuntu 20.04 and Noetic are recommended!\n```\ngit clone https://github.com/cckaixin/perception_aware.git\n```\n### install gazebo plugins\n```\nsudo apt-get install ros-noetic-robot-state-publisher*\nsudo apt-get install ros-noetic-joint-state-controller*\nsudo apt-get install ros-noetic-controller*\nsudo apt-get install ros-noetic-velocity-controllers*\nsudo apt-get install ros-noetic-effort-controllers\nsudo apt-get install ros-noetic-position-controllers\nsudo apt-get install ros-noetic-gazebo-ros-control\nsudo apt install ros-noetic-hector-gazebo\nsudo apt-get install ros-noetic-effort-controllers\nsudo apt-get install ros-noetic-joint-state-controller\nsudo apt-get install ros-noetic-position-controllers\n```\n### install casadi ( C++ ) \n```\nsudo apt-get install coinor-libipopt-dev\ngit clone https://github.com/casadi/casadi.git\ncd casadi\nmkdir build\ncmake -DWITH_IPOPT=true ..\nmake -j4\nsudo make install\n```\n## 2、Run\n\n### launch gazebo simulation environment\n```\nroslaunch carsim spawn_car.launch\nroslaunch carsim omni_car.launch\nroslaunch carsim meca_car.launch\n```\n\n### key board control: wasd + j k\n```\nrosrun carsim keyboard_control_meca.py\n```\n\n### launch slam module\n```\nroslaunch fast_lio mapping_velodyne.launch \nroslaunch fast_lio mapping_avia.launch rviz:=true\n```\n\n### launch perception node\n```\nroslaunch perception_evaluator test.launch\n```\n\n### run plan manager\n```\nroslaunch manager test.launch\n```\n\n### trajectory tracker\n```\nrosrun mpc_controller mpc_controller_node\n```\n\n### evaluate slam error\n```\nrosrun perception_evaluator evaluate_location_error.py\n```\n\n### reset model location\n```\nrosservice call /gazebo/set_model_state \"model_state:\n  model_name: 'meca_car'\n  pose:\n    position:\n      x: 0.0\n      y: 0.0\n      z: 0.0\n    orientation:\n      x: 0.0\n      y: 0.0\n      z: 0\n      w: 1\n  twist:\n    linear:\n      x: 0.0\n      y: 0.0\n      z: 0.0\n    angular:\n      x: 0.0\n      y: 0.0\n      z: 0.0\n  reference_frame: 'world'\"\n```\n\n## 3、Gpu adaptation\n### **_CUDA NEEDED_ :**\nLook up this [**website**](https://en.wikipedia.org/wiki/CUDA) for your 'GPU_version', and add it in **[src/PA_planner/perception_evaluator/CMakeLists.txt]**\n```\nSET(GPU_version 61) # 61 is for GTX 1060\n```\n### **_DEBUG with Nsight Systems_ :**\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"md_floder/nsight-sys.png\" width = 80% height = 80% /\u003e\n\u003c/div\u003e\n\nSuccinct commands are put as follows, if need more guidence, go to this [**repo**](https://github.com/Pupillen/Robotics_Coding/blob/master/Profiling.md)\n\n**Dependence:**\n```\ngit clone https://github.com/gperftools/gperftools\ncd gperftools\n./autogen.sh\n./configure\nmake\nsudo make install\n```\n**STEP0:** Configuring Compilation Options (CUDA \u0026 profiling)\n\nCMakeLists.txt :\n```\nproject(perception_evaluator CXX CUDA)\n\nSET(CUDA_TOOLKIT_ROOT_DIR \"/usr/local/cuda\")\nSET(ENABLE_CUDA true)\nSET(CMAKE_CXX_STANDARD 14)\nSET(CMAKE_EXPORT_COMPILE_COMMANDS ON)\nSET(GPU_version 61)  # https://en.wikipedia.org/wiki/CUDA\nSET(CUDA_SEPARABLE_COMPILATION ON)\nSET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 -use_fast_math;)\nSET(CUDA_NVCC_FLAGS -gencode arch=compute_${GPU_version},code=sm_${GPU_version};)\nSET(CUDA_USE_STATIC_CUDA_RUNTIME OFF)\n\nfind_package(CUDA REQUIRED)\nfind_library(LIBNVTOOLSEXT nvToolsExt PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})\n\ninclude_directories(\n  ${CUDA_INCLUDE_DIRS}\n)\n\nadd_library(LDF_accelerator src/LDF_accelerator.cu)\n\ntarget_link_libraries(LDF_accelerator \n  ${CUDA_LIBRARIES}\n  profiler\n  ${LIBNVTOOLSEXT}\n)\n```\nxxx.cu :\n```\n// Set Flags as our own nsys detector\nnvtxRangePush(\"gpuInit\");\ngpuInit();\nnvtxRangePop();\n```\n```\n// Stop compiler optimization for accurate log (optional)\nvolatile bool tmp = false;\nif (tmp) ProfilerStop();\n\n// Add these two sentences of code to each function that needs to be analyzed\n// and place them at the end of the logical code for the function. In this way, \n// when a function that needs to be analyzed is completed, these two lines of \n// code will be executed, and the ProfilerStop() function will be called to stop\n// the performance analyzer, ensuring the accuracy of the analysis results\n```\n\n**STEP1:** Compile and generate executable files for subsequent analysis\n```\ncatkin_make\n```\n**STEP2:** use nsys-tool to generate the profile for nsight-sys visualization\n```\nnsys profile -t nvtx,cuda --stats=true -f true -o gpu_profile devel/lib/perception_evaluator/perception_node_gpu nsight-sys\n```\n**STEP3:** use nsight-sys to visualize profiles of your target code\n```\nnsight-sys\n```\ncheck your CPU and GPU status by:\n```\nhtop\nnvidia-smi -l 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzju-fast-lab%2Flf-3pm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzju-fast-lab%2Flf-3pm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzju-fast-lab%2Flf-3pm/lists"}