This repo contains an enclosed catkin workspace along with tools designed to help you manage the versioning of your custom configuration.
Note that since this is a repo containing a workspace containing other repos. This will sligtly affect the way you use git on your packages. See the Workspace versioning layout section for details.
- Recommended tools
- Requirements
- .rosinstall
- src
- Workspace versioning layout
- Main configurations
- Main workflow
- Branch nomenclature
- Troubleshooting
These tool are recommended by Walking Machine to work on Sara. Those are only mere recommendation. You are invited to use your prefered IDE (except visual studio. Yerk! :P ).
- atom
- pycharm
- clion
- Ubuntu 16.04 LTS
- Install ROS Kinetic for Ubuntu by following all steps up to 1.7. After completing these steps you can continue with the tutorials which are good for learners. Please note that these tutorial are for personal learning only and are not required on SARA. For experimented users you can simply install ROS and skip the tutorial.
- git.
sudo apt-get install git
Sara_install uses wstool. This piece of software uses a configuration file named .rosinstall which define the list of packages required to install your configuration. Depending on your needs, you can edit this file to change your configuration.
The src directory is the place where all packages are cloned in a catkin workspace. Sara_install is no exception to this rule. The difference is that the packages within src can be managed by wstool.
This workspace is special since it is encapsulated within the sara_install git repo. This means that it's configuration is versionised and you can switch branches to change configuration. Though, you need to keep in mind that the src directory is purposely ignored by sara_install. See .gitignore. This is to let wstool be the main package manager and also to maintain retrocompatibility whith the old manual workflow. Each packages within src won't be modified by sara_install. They remain their own individual git repositories.
For instance, if you have a custom configuration within your src and want to try another one, you can checkout the new configuration branch without changing the content of your src. You will need to install this new configuration to update your src.
Depending on waht you want installed, you can checkout one of these specific branches for the most supported configurations.:
config/sara_kinetic
for installing the full sara workspace.config/simulation_kinetic
for a simulation based configuration.master
is the default. It barely contains anything. Perfect for a minimalistic test.
If you want to install every packages with their main branches.
- Clone this repo anywhere. Optionally, choose the desired branch.
git clone https://github.com/WalkingMachine/sara_install.git [-b <desired_branch>]
See Main configurations for a list of default branches. - Source the setup.sh script.
source sara_install/script/setup.sh
- Run the install script
INSTALL_SARA
and pay attention to the screen. There might be prompts for passwords and stuff. - Optionnaly, you can add the following line to your
~/.bashrc
:source <installation path>/sara_install/script/setup.sh
Make sure to replace the<installation path>
with the path to sara_install. - Your are now ready to code.
- Edit code within the desired packages, create feature branches, commit your changes, push them.
cd src/my_package
git pull
editing
# To check that you really are on master
git status
# To go in a newly created branch
git checkout -b feature/<my_awesome_feature>
git commit edited_file
git push -u origin feature/<my_awesome_feature>
When you change branches or add packages in the src folder, you are actually creating a custon configuration. To officialise your custom configuration, follow these steps:
- Use
STATUS_SARA
to see all modified packages. - Use
SCRAPE_SARA_CONFIG
to take a snapshot of your current configuration. git checkout -b config/<my_awesome_config>
git commit src/.rosinstall
git push -u origin config/<my_awesome_config>
If you need to work with all the latest packages, use the update.sh script.
UPDATE_SARA
If you need to update the .rosinstall file from your custom configuration, use the scrape_config.sh script.
SCRAPE_SARA_CONFIG
A full list of functions is available here.
Here is a list of namespaces we use to define our branches names:
- Official branches used in competition:
config/...
- When developping a new feature on a package:
dev_config/<package_name>/...
- To perform tests using a specific set of packages or to test a bugfix:
test_config/<package_name>/...
- When developping a new feature for sara_install itself:
feature/...
- When making a fix for a bug in sara_install itself:
fix/...
- catkin_make not found
- Close the terminal and reopen it.
- Build error, finished before reaching [100%]
- Look for indication of missing packages. Install them if you can and create a issue mentioning the error on the issue tracker.