ASL FreeFlyer software stack with ROS2. See build status for support on ROS2 distrbutions.
mkdir -p ~/ff_ws/src
git clone [email protected]:StanfordASL/freeflyer2.git ~/ff_ws/src/freeflyer2
- Install dependencies
rosdep update && rosdep install --from-paths ~/ff_ws/src --ignore-src -y
- Build the code (skipping the driver package)
cd ~/ff_ws && colcon build --packages-skip ff_drivers
- Source workspace install
source ~/ff_ws/install/local_setup.bash
The CI will build and run all registered tests. PR can be merged only when all status checks
pass. ROS2 code styles
are enforced for C++. Python code style is enforced through black
.
Here are some tips for fixing code style issues for a PR.
Run the following command to manually run all tests and see detailed test results including format violation
$ colcon build && colcon test && colcon test-result --verbose
Every source file (e.g. .cpp
, .hpp
, .py
) including launch files should have a copy of
the license at the very top. See any source files for an example.
- Run
ament_uncrustify --reformat
to automatically format C++ source files. - Run
ament_cpplint
to check for style violations and fix them manually.
Please install black
with pip install black
for the first time.
Importantly
- to format all Python code with black automatically run
$ cd freeflyer2
$ black .
- to check formatting without changing the files run
$ cd freeflyer2
$ black --check .
If you hate the ROS2 conventions so bad, you can disable specific code style test by adding
the following line before ament_lint_auto_find_test_dependencies()
in CMakeLists.txt
.
set(AMENT_LINT_AUTO_EXCLUDE <test1> [<test2> ...])
For example, if you want to disable code style checks for all Python files, you can add
set(AMENT_LINT_AUTO_EXCLUDE ament_cmake_flake8 ament_cmake_pep257)
freeflyer
-- top level pacakge (contains just launch files)ff_estimate
-- implement different state estimatorsff_control
-- implement different controllersff_drivers
-- driver code that interfaces with hardwareff_msgs
-- custom message typesff_params
-- shared parameters about dynamics and actuatorsff_sim
-- a lightweight pure Python simulatorff_viz
-- RVIZ visualization