Skip to content

StanfordASL/freeflyer2

Repository files navigation

freeflyer2

humble build iron build rolling build

ASL FreeFlyer software stack with ROS2. See build status for support on ROS2 distrbutions.

Quick Start

  1. Install ROS2 ( Humble or Rolling)
  2. Clone the repo into a ROS2 workspace, e.g.
mkdir -p ~/ff_ws/src
git clone [email protected]:StanfordASL/freeflyer2.git ~/ff_ws/src/freeflyer2
  1. Install dependencies
rosdep update && rosdep install --from-paths ~/ff_ws/src --ignore-src -y
  1. Build the code (skipping the driver package)
cd ~/ff_ws && colcon build --packages-skip ff_drivers
  1. Source workspace install
source ~/ff_ws/install/local_setup.bash

Development Guide

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

Copyright

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.

C++ Code Style

  1. Run ament_uncrustify --reformat to automatically format C++ source files.
  2. Run ament_cpplint to check for style violations and fix them manually.

Python Code Style

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 .

Disable Code Style Test

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)

Package Layout

  • freeflyer -- top level pacakge (contains just launch files)
  • ff_estimate -- implement different state estimators
  • ff_control -- implement different controllers
  • ff_drivers -- driver code that interfaces with hardware
  • ff_msgs -- custom message types
  • ff_params -- shared parameters about dynamics and actuators
  • ff_sim -- a lightweight pure Python simulator
  • ff_viz -- RVIZ visualization

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published