-
Notifications
You must be signed in to change notification settings - Fork 2
Migrating a repository to ROS2 (Humble)
Before starting the migration of a repository to ROS 2, if you have the repository cloned on your computer, make sure that the version you have does not contain any local change and is up to date. If you don't have the repository cloned on your computer already, you can go ahead and clone it and jump directly to the next section of this tutorial.
It is possible to see if your local copy of the repository has been changed by running the following command in a terminal at the root of the repository:
git status
If you have no local change, the output should look something like this:
If you do have local changes, either push them to Github or clear them using the following command before proceeding:
git reset --hard
Finally, make sure that you are on the master
branch and pull the latest changes using the following commands:
git checkout master
git pull
Before starting the migration of your repository, you need to create a new branch using the following command:
git checkout -b humble
You are now ready to migrate your repository to ROS 2! You can have a look at libpointmatcher_ros, norlab_icp_mapper_ros and marmotte_mapping to see how the migration of these pacakges was done.
Once you are done migrating your repository, add the files that need to be committed and commit them using the following commands:
git add <first_file_to_add>
git add <second_file_to_add>
...
git add <last_file_to_add>
git commit -m "Migrated to Humble."
You can then push your newly created branch to Github using the following command:
git push -u origin humble
Once everything is pushed, using a web browser, go to your repository page on Github.com. First, you will need to rename the master
branch to melodic
. To do so, go to the "Settings" tab of your repository (top right of the page)
and select branches in the left menu
. Then, click on the "Rename branch" button (to the right of `master`)
and change the name of the branch to `melodic`. Now, if you go back to the "Code" tab (top left of the page)
, you should receive a notification that looks like this:
. Follow the instructions to make sure the renaming of the branch is also done on your local version of the repository. Finally, you will need to set the `humble` branch as default. To do this, go back to the "Branches" settings, click on the "Switch to another branch" button (to the right of `melodic`)
and select the `humble` branch. You are now done with the migration of your package to ROS 2, good job!
Here are some resources that give an overview of some things to consider while migrating a node :
- Migration guide from ROS 1
- Migrating launch files from ROS 1 to ROS 2
- Migrating YAML parameter files from ROS 1 to ROS 2
Here are some nodes that were migrated successfully from melodic
(ROS1) to humble
(ROS2):
-
norlab_icp_mapper_ros
(Comparison)
- Warthog Teach and Repeat (ROS1)
- Warthog Teach and Repeat (ROS2)
- Time Synchronization
- Deployment of Robotic Total Stations (RTS)
- Deployment of the backpack GPS
- Warthog Emlid GPS
- Atlans-C INS
- How to use a CB Radio when going in the forest
- IP forwarding
- Emlid Data Postprocessing (PPK)
- Lessons Learned
- Robots' 3D Models
- Order Management
- Fast track Master → PhD
- Intellectual Property
- Repository Guidelines
- TF Cheatsheet
- Montmorency Forest Wintertime Dataset
- RTS-GT Dataset 2023
- Deschenes2021 Dataset
- TIGS Dataset
- DRIVE Datasets
- BorealHDR
- TimberSeg 1.0
- DARPA Subterranean Challenge - Urban Dataset
- How to upload a dataset to VALERIA
- ROS1 Bridge
- Migrating a repository to ROS2 (Humble)
- ROS2 and rosbags
- MCAP rosbags
- DDS Configuration (work in progress)
- Using a USB Microphone with ROS2
- ROS2 in VSCode
- ROS2 Troubleshooting