Getting new members up to speed with ROS development and our workflow!
You will add a package called <your-name>_pkg that publishes a topic of random message type (Float32, etc / see below) on a 0.5 Hz timer. You will also subscribe to that same topic, and summarize it into a string with your name. Next you'll publish that to the central echo_service node. In the end it will look cool with everyone's names and summaries like below:
root@1689cc4c21d7:/workspaces/onboarding# ros2 launch onboarding all.xml
[echo_service-1] [INFO] [1788337433.134494635] [echo_service]: Echo request recieved: cole recieved a float: 32.45
[echo_service-1] [INFO] [1788337476.212902835] [echo_service]: Echo request recieved: andy recieved a green image
[echo_service-1] [INFO] [1788337476.212902835] [echo_service]: Echo request recieved: oliver's IMU is accelerating +X
[echo_service-1] [INFO] [1788337476.212902835] [echo_service]: Echo request recieved: ryden's joystick is drifting
[echo_service-1] [INFO] [1788337476.212902835] [echo_service]: Echo request recieved: adrian's CAN packet was recieved
# ... etc ...
You can choose any messages from:
- std_msgs
- sensor_msgs
- vision_msgs
- nav_msgs
- or make your own! (super cool extension activity) See the
onboarding_msgspackage for an example...
- Go through the introductory slides here
- Get set up with the repo:
- Create a GitHub account and join the palouse-robosub organization by pinging an admin on Discord
- Install git on your computer and clone this repo
- Install Docker and enter the DevContainer by clicking the
><symbol in the lower left of VS Code and clicking Reopen In Container.
- Get ready to add changes:
- Create a new branch in the format
<your-name>/<what-you-are-adding>(likebob/add-bob-pkg) - Build the existing code by using
colcon build - Load your newly built ROS workspace with
source install/setup.bash - Run the existing code with
ros2 launch onboarding all.xml
- Create a new branch in the format
- Make a copy of the
onboarding_examplepackage and name it<your-name>_pkg. Be sure to update all instances of the package name, even in files likeCMakeLists.txt- Pull up ROS2 Jazzy Quickstart Tutorial and read it while you:
- Create a publisher node that publishes your topic of choice on a 0.5Hz timer
- Update
CMakeLists.txtandpackage.xml - Create a subscriber node that summarizes the topic of your choice into a string of some sort
- Update
CMakeLists.txtandpackage.xml - Update your subscriber node to call the
/echo_stringservice with your description string and name - Update your launch file, and the one in
src/onboarding/
- Get ready to merge:
- Make sure your code is formatted properly by running
./util/formatin your terminal - Build and run your code using
colcon ...andros2 ... - Commit your changes & push them to GitHub
- Add your name to the
.github/CODEOWNERSfile!
- Make sure your code is formatted properly by running
- Open a Pull Request and request review
- Ensure that CI passes
- Make any necessary changes
- Merge your first PR!
- Celebrate 🎉🎉🎉
This repo was copied directly from palouse-robosub/guppy in order to almost directly match its structure and function. Some notable features include:
- ROS Packages source code located in src/
- Nix Flake at flake.nix containing dependencies and a custom development environment
- Dockerfile which builds a DevContainer for local ROS development
- Custom .clang-format file allowing standardized C++ formatting in
ryden-format - Preconfigured VSCode settings in .vscode with recommended extensions, autocompletion paths, and build settings
- CI/CD pipeline at .github/workflows/ci.yaml that runs automatically on every push to lint, build, and test new code
- Codeowners file at .github/CODEOWNERS allowing for automatic PR review requests, and keeping contributors updated about relevant changes
Each of these items was ported from guppy with minimal modification in order to replicate our actual development workflow. We would like you to become familiar and comfortable with all of the above tooling and practices.