diff --git a/.github/workflows/ros2_build_test.yml b/.github/workflows/ros2_build_test.yml new file mode 100644 index 0000000..7642107 --- /dev/null +++ b/.github/workflows/ros2_build_test.yml @@ -0,0 +1,38 @@ +name: ROS 2 Jazzy Build and Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-and-test: + runs-on: ubuntu-24.04 + container: + image: ros:jazzy + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + path: src/${{ github.event.repository.name }} + + - name: Install Dependencies (rosdep) + run: | + apt-get update + rosdep update + rosdep install --from-paths src --ignore-src -r -y + + - name: Build Packages + shell: bash + run: | + source /opt/ros/jazzy/setup.bash + colcon build + + - name: Run Tests + shell: bash + run: | + source /opt/ros/jazzy/setup.bash + colcon test + colcon test-result --all diff --git a/BuildInstructions.md b/BuildInstructions.md index 0ab6569..556c930 100644 --- a/BuildInstructions.md +++ b/BuildInstructions.md @@ -1,6 +1,15 @@ Basic placeholder robot with a base box and moveable cylinder arm. -How to build: +## Setup workspace and Clone repo (*Skip if repo already cloned*) +- Run these commands inside the terminal in Ubuntu: +``` +mkdir -p ~/waybionic_ws/src +cd ~/waybionic_ws/src +git clone https://github.com/Waybionic/waybionic_ground_station.git +cd ~/waybionic_ws +``` + +## Build and Launch - Run these commands in your workspace: ``` source /opt/ros/jazzy/setup.bash diff --git a/docs/model_import_runbook.md b/docs/model_import_runbook.md new file mode 100644 index 0000000..19c9371 --- /dev/null +++ b/docs/model_import_runbook.md @@ -0,0 +1,26 @@ +# Waybionic Model Import Runbook + +This guide is for importing and testing real URDF and mechanical mesh exports (STLs) without breaking the clean ROS 2 foundation or editing Python launch files. + +## 1. Where to put the files +- **Meshes (.stl, .dae):** Place all 3D mesh files into `waybionic_description/meshes/`. +- **URDF/Xacro (.urdf, .xacro):** Place your exported robot description file into `waybionic_description/urdf/`. + +*Important: Inside the URDF, ensure the mesh paths use the standard ROS package syntax. Example:* +`` + +## 2. Rebuild the Workspace +Any time new files are added, rebuild the foundation so CMake can install them to the ROS 2 share directory. +From the root of your workspace (`~/ros2_ws`): +``` +colcon build --packages-select waybionic_description +source install/setup.bash +``` + +## 3. Test the model +Don't edit `display.launch.py` to test the model. Instead, pass the path to the new URDF using the `model:=` argument. +From the root of your workspace, run: +``` +ros2 launch waybionic_bringup display.launch.py model:=$(ros2 pkg prefix waybionic_description --share)/urdf/YOUR_NEW_FILE.urdf +``` +If parsed correctly, RViz will automatically open and display the model. If there are issues, errors will print in the terminal. \ No newline at end of file diff --git a/fresh-clone_build_test.txt b/fresh-clone_build_test.txt new file mode 100644 index 0000000..4e27eab --- /dev/null +++ b/fresh-clone_build_test.txt @@ -0,0 +1,41 @@ +COMMAND:~$ mkdir -p ~/waybionic_qa_ws/src +COMMAND:~$ cd ~/waybionic_qa_ws/src +COMMAND:~/waybionic_qa_ws/src$ git clone https://github.com/Waybionic/waybionic_ground_station.git +Cloning into 'waybionic_ground_station'... +remote: Enumerating objects: 785, done. +remote: Counting objects: 100% (48/48), done. +remote: Compressing objects: 100% (20/20), done. +remote: Total 785 (delta 43), reused 28 (delta 28), pack-reused 737 (from 1) +Receiving objects: 100% (785/785), 114.11 MiB | 10.51 MiB/s, done. +Resolving deltas: 100% (244/244), done. +COMMAND:~/waybionic_qa_ws/src$ cd ~/waybionic_qa_ws +COMMAND:~/waybionic_qa_ws$ source /opt/ros/jazzy/setup.bash +COMMAND:~/waybionic_qa_ws$ rosdep install --from-paths . --ignore-src -r -y +/usr/bin/rosdep:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html + from pkg_resources import load_entry_point +#All required rosdeps installed successfully +COMMAND:~/waybionic_qa_ws$ colcon build --packages-select waybionic_description waybionic_bringup +Starting >>> waybionic_description +Finished <<< waybionic_description [3.67s] +Starting >>> waybionic_bringup +Finished <<< waybionic_bringup [3.65s] +Summary: 2 packages finished [7.43s] +COMMAND:~/waybionic_qa_ws$ source install/setup.bash +COMMAND:~/waybionic_qa_ws$ ros2 launch waybionic_bringup display.launch.py +[INFO] [launch]: All log files can be found below /home/hoodu/.ros/log/2026-07-10-13-05-05-540928-HKINSPIRON-5729 +[INFO] [launch]: Default logging verbosity is set to INFO +[INFO] [robot_state_publisher-1]: process started with pid [5733] +[INFO] [joint_state_publisher_gui-2]: process started with pid [5734] +[INFO] [rviz2-3]: process started with pid [5735] +[robot_state_publisher-1] [INFO] [1783710305.811042817] [robot_state_publisher]: Robot initialized +[joint_state_publisher_gui-2] [INFO] [1783710306.116934240] [joint_state_publisher_gui]: Waiting for robot_description to be published on the robot_description topic... +[joint_state_publisher_gui-2] [INFO] [1783710306.142611172] [joint_state_publisher_gui]: Centering +[rviz2-3] [INFO] [1783710306.184346358] [rviz2]: Stereo is NOT SUPPORTED +[rviz2-3] [INFO] [1783710306.184576062] [rviz2]: OpenGl version: 4.5 (GLSL 4.5) +[rviz2-3] [INFO] [1783710306.235441816] [rviz2]: Stereo is NOT SUPPORTED +[joint_state_publisher_gui-2] [INFO] [1783710306.248351270] [joint_state_publisher_gui]: Centering +[INFO] [rviz2-3]: process has finished cleanly [pid 5735] +[INFO] [joint_state_publisher_gui-2]: process has finished cleanly [pid 5734] +^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) +[robot_state_publisher-1] [INFO] [1783711167.445574412] [rclcpp]: signal_handler(SIGINT/SIGTERM) +[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 5733] \ No newline at end of file diff --git a/scripts/check_waybionic_ws.sh b/scripts/check_waybionic_ws.sh new file mode 100755 index 0000000..c2e1c46 --- /dev/null +++ b/scripts/check_waybionic_ws.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Fail immediately if any command fails +set -e + +echo "=== Waybionic Workspace Sanity Check ===" + +echo "1. Sourcing ROS Jazzy..." +source /opt/ros/jazzy/setup.bash + +echo "2. Checking dependencies with rosdep..." +rosdep install --from-paths src --ignore-src -r -y + +echo "3. Building Waybionic packages..." +colcon build --packages-select waybionic_description waybionic_bringup + +echo "4. Sourcing workspace..." +source install/setup.bash + +echo "5. Parsing URDF for syntax errors..." +# Find the URDF dynamically regardless of the clone folder name +URDF_PATH=$(find src -name "waybionic_placeholder.urdf" | head -n 1) +xacro $URDF_PATH > /dev/null + +echo "=== ✅ All checks passed! The foundation is clean and ready. ==="