[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2713":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":27,"discoverSource":28},2713,"MacroNav","SimonKennethRobo\u002FMacroNav","SimonKennethRobo","[RAL 26] Code for MacroNav: Multi-Task Context Representation Learning Enables Efficient Navigation in Unknown Environments.","",null,"Python",132,9,0,2,33,6,3,"MIT License",false,"main",true,[],"2026-06-12 02:00:43","# MacroNav\n\nOfficial code release for **MacroNav: Multi-Task Context Representation Learning Enables Efficient Navigation in Unknown Environments**.\n\nMacroNav is a learning-based navigation framework for unknown environments. It first trains a lightweight context encoder with multi-task self-supervised learning, then integrates the learned dense contextual representation with an RL navigation policy.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Farch.jpg\" alt=\"MacroNav architecture\" width=\"600\" \u002F>\n\u003C\u002Fdiv>\n\nDemo video: [Bilibili](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV175ofBTEpa\u002F?share_source=copy_web&vd_source=31621f5011869655cf889054f5c4772c)\n\n## Repository Structure\n\n```text\nMacroNav\u002F\n|-- dataset\u002F\n|   |-- GridMapV1\u002F             # Encoder pre-training maps\n|   `-- NavSimMapV1\u002F           # Navigation simulation maps\n|-- exps\u002F\n|   |-- pretrain\u002F              # Pre-trained context encoder weights\n|   `-- nav_policy\u002F            # Policy checkpoints and validation outputs\n|-- macronav\u002F\n|   |-- pretrain\u002F              # Context encoder pre-training\n|   `-- nav_policy\u002F            # RL navigation policy training, validation, demo, export\n|-- pyproject.toml\n`-- README.md\n```\n\n## Installation\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FSimonKennethRobo\u002FMacroNav\ncd MacroNav\n\nconda create -n macronav python=3.10\nconda activate macronav\n\npip install -e .\n```\n\n## Dataset Preparation\n\nDownload zip from [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1rEuVVzqzfjmvBkcMqM5Q4J7td7pToTW8\u002Fview?usp=sharing)\n\n```bash\nunzip macronav_dataset_and_ckpt.zip\n```\n\nAfter extraction, the expected paths are:\n\n```text\ndataset\u002FGridMapV1\ndataset\u002FNavSimMapV1\nexps\n```\n\n## Training\n\n### 1. Context Encoder Pre-training\n\nEdit `macronav\u002Fpretrain\u002Fconfig\u002Ftrain_param.py` if you want to change the experiment name, dataset path, batch size, or logging settings.\n\n```bash\npython macronav\u002Fpretrain\u002Ftrain_encoder.py\n```\n\nOutputs are saved under `exps\u002F\u003CEXP_NAME>\u002F`, including checkpoints, copied config files, and logs.\n\n### 2. Navigation Policy Training\n\nEdit `macronav\u002Fnav_policy\u002Fconfig\u002Ftrain_param.py` if you want to change the experiment settings.\n\n```bash\npython macronav\u002Fnav_policy\u002Ftrain_nav.py\n```\n\n## Evaluation\n\nConfigure the target experiment in `macronav\u002Fnav_policy\u002Fconfig\u002Fvalid_param.py`.\n\n```bash\npython macronav\u002Fnav_policy\u002Fvalid_nav.py\n```\n\n### Interactive Demo\n\n`valid_iter.py` provides an OpenCV-based interactive demo. It can run out of the box with the released maps and policy checkpoints after extraction.\n\nThe default dependency list installs `opencv-python-headless`, which is suitable for training and batch validation. For the interactive demo, install the GUI-enabled OpenCV package:\n\n```bash\n\npip uninstall -y opencv-python-headless\npip install opencv-python\n\n```\n\nIf you want to run ONNX policy inference in the interactive demo, install ONNX Runtime, refer [link](https:\u002F\u002Fonnxruntime.ai\u002Fdocs\u002Finstall\u002F#python-installs). Use the GPU package when CUDA is available:\n\nFirst, check `macronav\u002Fnav_policy\u002Fconfig\u002Fvalid_param.py`:\n\n```python\nLOG_DIR = \"exps\u002Fnav_policy\u002F\u003Cexp_name>\"\nENV_LEVEL = \"real\"          # easy, medium, hard, or real\nCUSTOM_MAP_IDX = 0 # set the map you want\n```\n\nThen run:\n\n```bash\npython macronav\u002Fnav_policy\u002Fvalid_iter.py\n```\n\nControls:\n\n- Left click: select a point on the map\n- `s`: set selected point as start\n- `e`: set selected point as goal\n- Space: start navigation\n- `+` \u002F `=`: zoom in\n- `-`: zoom out\n- `r`: reset\n- `Esc`: exit\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"docs\u002Fiter_demo_1.gif\" alt=\"1\" width=\"300\" \u002F>\n  \u003Cimg src=\"docs\u002Fiter_demo_2.gif\" alt=\"2\" width=\"300\" \u002F>\n\u003C\u002Fdiv>\n\n## Model Export\n\nExport a trained policy to ONNX, TensorRT, or both:\n\n```bash\npython macronav\u002Fnav_policy\u002Fscripts\u002Fexport_policy.py \\\n  --checkpoint exps\u002Fnav_policy\u002F\u003Cexp_name>\u002Fmodels\u002Fcheckpoint_best.pth \\\n  --config exps\u002Fnav_policy\u002F\u003Cexp_name>\u002Ftrain_param.py \\\n  --format both\n```\n\nFor TensorRT export, install the matching CUDA\u002FPyTorch\u002FTensorRT packages for your system.\n\n## Citation\n\n```bibtex\n@article{sima2026macronav,\n  title={MacroNav: Multi-Task Context Representation Learning Enables Efficient Navigation in Unknown Environments},\n  author={Sima, Kuankuan and Tang, Longbin and Yang, Zhenyu and Ma, Haozhe and Zhao, Lin},\n  journal={IEEE Robotics and Automation Letters},\n  year={2026}\n}\n```\n\n## Acknowledgements\n\nThis codebase builds on ideas and components from the following open-source repositories:\n\n- [Context_Aware_Navigation](https:\u002F\u002Fgithub.com\u002Fmarmotlab\u002FContext_Aware_Navigation)\n- [mae](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fmae)\n\n## License\n\nThis project is released under the MIT License. See [LICENSE](LICENSE) for details.\n","MacroNav 是一个面向未知环境的基于学习的导航框架。它通过多任务自监督学习训练轻量级上下文编码器，然后将学到的密集上下文表示与强化学习导航策略相结合，实现高效导航。该项目使用Python开发，其核心在于利用预训练模型生成环境的上下文信息，并结合强化学习算法优化导航决策过程。适合于需要在未探索或复杂环境中进行自主导航的应用场景，如机器人导航、自动驾驶等。MIT许可证下开源，提供详细的代码示例和数据集准备指南，便于研究人员快速上手并扩展应用。","2026-06-11 02:50:59","CREATED_QUERY"]