{"id":22733849,"url":"https://github.com/samthinkgit/mk-ros2_script_maker","last_synced_at":"2025-07-08T00:37:59.729Z","repository":{"id":131589326,"uuid":"599956007","full_name":"SamthinkGit/mk-ROS2_Script_Maker","owner":"SamthinkGit","description":"mk-ROS2_Script_maker is a toolset targeted to ROS2 development for easy and fast code generating with node-based programming.","archived":false,"fork":false,"pushed_at":"2023-03-09T10:57:11.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T02:11:33.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamthinkGit.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-10T08:56:06.000Z","updated_at":"2023-02-14T00:01:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"59d9d308-3df0-47db-b058-3eca6d5c2200","html_url":"https://github.com/SamthinkGit/mk-ROS2_Script_Maker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamthinkGit/mk-ROS2_Script_Maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamthinkGit%2Fmk-ROS2_Script_Maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamthinkGit%2Fmk-ROS2_Script_Maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamthinkGit%2Fmk-ROS2_Script_Maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamthinkGit%2Fmk-ROS2_Script_Maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamthinkGit","download_url":"https://codeload.github.com/SamthinkGit/mk-ROS2_Script_Maker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamthinkGit%2Fmk-ROS2_Script_Maker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264169364,"owners_count":23567296,"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-12-10T20:16:25.134Z","updated_at":"2025-07-08T00:37:59.695Z","avatar_url":"https://github.com/SamthinkGit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mk-ros2\nmk-ros2 is a set of vim-based development tools for faster ROS2 script generating. It includes commands for creating new packages, source files, cleaning source files from typos, and adding various ROS2 components such as nodes, main functions, publishers, subscribers...\n\n## Installation\nTo install this tools yo must use the following steps:\n\n1. **[Optional]** If you don't have vim installed you must download it. If you don't know if you have or not only type ```vim```. For installin vim you can use:\n```bash\nsudo apt install vim\n```\n\n2. Clone the repository\n```bash\ngit clone https://github.com/SamthinkGit/mk-ROS2/edit/main/README.md\n```\n\n3. Install mk-ros2 tools\n```bash\ncd mk-ROS2\ncd install\nchmod +x *\n./*.sh\n```\n\n_Note: All mk scripts will be saved in a .mkscripts directory at $HOME, if you want to change this, you can edit the MainDir in .mkSettings_\n\n## Usage\nThe commands are all prefixed with mk and are explained in detail in the [wiki](https://github.com/SamthinkGit/mk-ROS2/wiki). The current tools available are:\n\n- **mkpkg**: Builds a new package in the repository.\n- **mksrc**: Builds a new source file inside a package.\n- **pkgclean**: Cleans a source file from typos.\n- **mkcat**: Terminal tool for applying mk implementations to a source file. With this tool, you can use node-targeted scripts such as:\n  - **mknode**: Builds a new node.\n  - **mkmain**: Adds a main function at the end.\n  - **mkpub**: Adds a publication to a topic to the node.\n \n  - **edit**: Replace tags with a new name\n  \n## Examples\n\nHere's an example of how to develop a simple ROS2 node with mk-ros2\n```bash\n# Build a workspace\nmkdir -p ws/src\ncd ws/src\n\n# Build a package\nmkpkg MyNode rclcpp\ncd MyNode/src\n\n# Add some functionalities to the node\nmkcat MyNode.cpp\n[MK BUILDER] mknode\n[MK BUILDER] mkmain\n[MK BUILDER] w\n```\n\nWith this done, you only should check the #include files inside the .cpp files and check that CMakeList.txt is properly installed.\n\n```bash\n# Tree Generated\n.\n└── src\n    └── MyNode\n        ├── CMakeLists.txt\n        ├── include\n        │   └── MyNode\n        ├── package.xml\n        └── src\n            └── MyNode.cpp\n\n5 directories, 3 files\n```\n```c++\n// Node built\nclass __node_name__ : public rclcpp::Node\n{\npublic:\n__node_name__()\n: Node(\"__public_node_name__\")\n{\n}\n\nprivate:\n\n};\nint main(int argc, char * argv[])\n{\n        rclcpp::init(argc, argv);\n\n        auto node = std::make_shared\u003c__node_name__\u003e();\n\n        rclcpp::spin(node);\n\n        rclcpp::shutdown();\n        return 0;\n}\n```\n# Final Status of the workspace\n\n\n## Contributions\nWe welcome contributions to this project! If you have an idea for a new feature or bug fix, please create an issue or a pull request.\n\n## License\nThis project is licensed under the Apache License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthinkgit%2Fmk-ros2_script_maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthinkgit%2Fmk-ros2_script_maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthinkgit%2Fmk-ros2_script_maker/lists"}