Development manager for ROS 2 workspace.
- Install
git
andgh
:sudo apt install git gh -y
- Login to github account (Recommended to clone private repo easily):
gh auth login
- Create an empty folder.
cd
into the created folder.- Clone this repo as
dev_manager
:git clone https://github.com/MIMOSRobotics/DEVELOPMENT-MANAGER-ROS-2.git dev_manager
cd
intodev_manager
dir and rundev_init.bash
by:ORsource dev_init.bash
. dev_init.bash # NOT ./dev_init.bash!
- Type
r2dev
in terminal to open development manager menu.- If ROS 2 is not yet installed, choose
1
. - You may install recommended software by choosing
2
. - Clone a pre-defined project repo, choose
3
. Then, choose desired repo to clone.- Accept adding alias to
.bashrc
automatically.
- Accept adding alias to
- If ROS 2 is not yet installed, choose
- If you are not initialize to the new repo, initialize it with the added alias.
- Done! Your project is ready!
After initializing the workspace, these are useful aliases to use for rapid development. Additional or modified aliases can be done in project repo under config
folder.
Alias | Description |
---|---|
r2dev |
To open development manager. |
r2pkg |
To open package manager. |
r2s |
Source the setup.bash or local_setup.bash of ROS environment, currently initialized workspace, pkg directories and active workspace (eg: ws_robot ) workspace. |
r2sros |
Source ROS environment. |
r2sinfo |
Show information of current active project and workspace. |
r2salias |
Currently only show list of aliases that begins with r2 . |
Operation on project repo directory.
Alias | Description |
---|---|
r2b |
Colcon build in the initialized ws_... workspace. |
r2bf |
Same as r2b but will run rosdep update and install first (Install dependencies). Recommended for first time setup so that all dependencies is installed before building the package. |
r2del |
Delete build , install and optional log directory from active ws_... workspace directory. Recommended to restart terminal to completely remove traces of sourced packages. |
r2cdw |
Change directory to active workspace directory (ws_... ). |
r2cdr |
Change directory to active project directory (eg: project_repo ). |
Recommended to place this development manager repo within the same directory as project repo as shown below:
WORKSPACE ├── dev_manager (development manager repo) | ├── config | ├── scripts | ├── template (project repo template) | | ├── config | | ├── pkg | | ├── ws_robot | | └── ... | ├── dev_init.bash | └── ... ├── project_repo_1 (project repo) | ├── config | ├── pkg | ├── ws_robot | └── ... ├── project_repo_2 (project repo) | ├── config | ├── pkg | ├── ws_robot | └── ... └── project_repo_3 (project repo) ├── config ├── pkg ├── ws_robot └── ...
To use the dev manager, add alias using below format into .bashrc
:
<alias>='source <dev_init_path> <repo dir> <ws dir>'
where <repo dir>
dir is relative to WORKSPACE dir and <ws dir>
dir is relative to working repo dir.
eg:
alias wsrobot='source ~/WORKSPACE/dev_manager/dev_init.bash /project_repo_1 /ws_robot'
alias wsrobot='source ~/WORKSPACE/dev_manager/dev_init.bash /project_repo_2 /ws_robot'
alias wsrobot='source ~/WORKSPACE/dev_manager/dev_init.bash /project_repo_3 /ws_robot'
The project repo must follow the same structure as template. Inside the template contains pre-defined variables for development manager to consume.
Please use the template given if you are creating a new project.
- Write more info.
- Add more info to Lab's OneNote.