Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This is still a work in progress, therefore the repository is unstable.

This package was tested with ROS 2 Humble and TypeDB 2.27.0

**Note for Ubuntu 22.04 (Jammy) users:** If you're using ROS 2 Rolling on Ubuntu 22.04, please see the special rosdep setup instructions below to resolve missing dependency definitions.

## Installing

[Install ROS 2 Humble](https://docs.ros.org/en/humble/Installation.html)
Expand Down Expand Up @@ -39,6 +41,13 @@ Install dependencies:
```Bash
cd ~/rosa_ws/
source /opt/ros/humble/setup.bash

# For Ubuntu 22.04 (Jammy) with ROS 2 Rolling, setup custom rosdep dependencies first:
./src/rosa/setup_rosdep.sh

# Optional: Validate that the rosdep setup worked correctly
./src/rosa/validate_rosdep.sh

rosdep install --from-paths src --ignore-src -r -y
```

Expand All @@ -49,6 +58,26 @@ source /opt/ros/humble/setup.bash
colcon build --symlink-install
```

### Troubleshooting Ubuntu 22.04 (Jammy) with ROS 2 Rolling

If you encounter rosdep errors about missing definitions for packages like `behaviortree_cpp`, `popf`, `launch_pytest`, `rclcpp_cascade_lifecycle`, or `tf_transformations`, you can manually add the custom rosdep source:

```Bash
# Create rosdep sources directory
mkdir -p ~/.ros/rosdep/sources.list.d/

# Add ROSA custom rosdep definitions
echo "yaml file://$(pwd)/src/rosa/rosdep.yaml" > ~/.ros/rosdep/sources.list.d/50-rosa.list

# Update rosdep database
rosdep update

# Now retry the rosdep install
rosdep install --from-paths src --ignore-src -r -y
```

**Note:** The `rosdep.yaml` file in this repository provides custom definitions for packages that are not available in the standard rosdep database for Ubuntu 22.04 (Jammy). Some dependencies like `ros_typedb` and `ros_typedb_msgs` are built from source as specified in `rosa.repos`, so they don't require system packages.

## Running

Start typedb:
Expand Down
39 changes: 39 additions & 0 deletions rosdep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Custom rosdep definitions for ROSA dependencies on Ubuntu 22.04 (Jammy)
# This file provides missing rosdep keys for dependencies not available in the standard rosdep database

behaviortree_cpp:
ubuntu:
jammy: [ros-rolling-behaviortree-cpp]
# Alternative for other distributions if needed
# focal: [ros-foxy-behaviortree-cpp]

rclcpp_cascade_lifecycle:
ubuntu:
jammy: [ros-rolling-rclcpp-cascade-lifecycle]

launch_pytest:
ubuntu:
jammy: [ros-rolling-launch-pytest]

tf_transformations:
ubuntu:
jammy: [python3-tf-transformations]
# This package is generally available across Ubuntu versions

popf:
ubuntu:
jammy: [ros-rolling-popf]

# External dependencies from kas-lab organization
# These packages need to be built from source as specified in rosa.repos
ros_pytest:
ubuntu:
jammy: [python3-pytest]

ros_typedb:
ubuntu:
jammy: [] # Built from source, no system dependency

ros_typedb_msgs:
ubuntu:
jammy: [] # Built from source, no system dependency
53 changes: 53 additions & 0 deletions setup_rosdep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash

# Setup script for ROSA rosdep dependencies on Ubuntu 22.04 (Jammy) with ROS 2 Rolling
# This script adds the custom rosdep.yaml file to the rosdep sources list

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROSDEP_FILE="$SCRIPT_DIR/rosdep.yaml"
ROSDEP_SOURCE_FILE="$HOME/.ros/rosdep/sources.list.d/50-rosa.list"

echo "Setting up ROSA rosdep dependencies for Ubuntu 22.04 (Jammy)..."

# Check if rosdep.yaml exists
if [ ! -f "$ROSDEP_FILE" ]; then
echo "Error: rosdep.yaml not found at $ROSDEP_FILE"
exit 1
fi

# Check if rosdep is installed
if ! command -v rosdep &> /dev/null; then
echo "Error: rosdep is not installed. Please install it with:"
echo " sudo apt update && sudo apt install python3-rosdep"
exit 1
fi

# Create rosdep sources directory if it doesn't exist
mkdir -p ~/.ros/rosdep/sources.list.d/

# Add the custom rosdep source
echo "yaml file://$ROSDEP_FILE" > "$ROSDEP_SOURCE_FILE"

echo "✓ Added ROSA rosdep source to $ROSDEP_SOURCE_FILE"

# Initialize rosdep if not already done (ignore errors if already initialized)
echo "Initializing rosdep (if needed)..."
rosdep init 2>/dev/null || echo "rosdep already initialized"

# Update rosdep database
echo "Updating rosdep database..."
if rosdep update; then
echo "✓ rosdep database updated successfully"
else
echo "⚠ Warning: rosdep update encountered issues, but continuing..."
fi

echo ""
echo "🎉 ROSA rosdep setup complete!"
echo ""
echo "You can now run:"
echo " rosdep install --from-paths src --ignore-src -r -y"
echo ""
echo "If you encounter any issues, check the troubleshooting section in README.md"
42 changes: 42 additions & 0 deletions validate_rosdep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Validation script to check if ROSA rosdep dependencies are properly configured
# This helps users verify that the rosdep setup worked correctly

echo "Validating ROSA rosdep configuration..."

# Check if rosdep sources file exists
ROSDEP_SOURCE_FILE="$HOME/.ros/rosdep/sources.list.d/50-rosa.list"
if [ ! -f "$ROSDEP_SOURCE_FILE" ]; then
echo "✗ ROSA rosdep source file not found at $ROSDEP_SOURCE_FILE"
echo " Please run ./setup_rosdep.sh first"
exit 1
fi

echo "✓ ROSA rosdep source file found"

# Test key dependencies to see if rosdep can resolve them
TEST_DEPS=("behaviortree_cpp" "popf" "launch_pytest" "rclcpp_cascade_lifecycle" "tf_transformations")
FAILED_DEPS=()

echo "Testing dependency resolution..."

for dep in "${TEST_DEPS[@]}"; do
if rosdep resolve "$dep" >/dev/null 2>&1; then
echo " ✓ $dep - resolved"
else
echo " ✗ $dep - failed to resolve"
FAILED_DEPS+=("$dep")
fi
done

if [ ${#FAILED_DEPS[@]} -eq 0 ]; then
echo ""
echo "🎉 All ROSA dependencies are properly configured!"
echo "You can now run: rosdep install --from-paths src --ignore-src -r -y"
else
echo ""
echo "⚠ Some dependencies failed to resolve: ${FAILED_DEPS[*]}"
echo "This might be normal if you're not on Ubuntu 22.04 (Jammy) with ROS 2 Rolling"
echo "Try running: rosdep update"
fi