Skip to content
Open

test #11

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
71 changes: 71 additions & 0 deletions MOVEIT_SUCCESS_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 🎉 MoveIt Integration - SUCCESS! 🎉

## ✅ What Works

The Franka FR3 robot is now fully integrated with ROS 2 MoveIt and working perfectly!

### Successful Demo Features:
- **Robot Connection**: Real hardware at `192.168.1.59`
- **MoveIt Integration**: Full planning and execution pipeline
- **Home Position**: Safe starting configuration
- **Movement**: Joint space movement in X direction
- **Safety**: Conservative speed and workspace limits

## 🚀 Quick Start Commands

### Terminal 1 - Start MoveIt System:
```bash
ros2 launch franka_fr3_moveit_config moveit.launch.py robot_ip:=192.168.1.59
```

### Terminal 2 - Run Demo:
```bash
cd ros2_moveit_franka
source ~/franka_ros2_ws/install/setup.bash
source install/setup.bash
python3 install/ros2_moveit_franka/bin/simple_arm_control
```

## 🔧 Key Fixes Applied

1. **URDF Version Parameter**: Fixed missing `version:0.1.0` in hardware interface
2. **MoveIt Demo Script**: Created working ROS 2 Python script
3. **Joint Space Movement**: Implemented reliable movement using direct joint control
4. **Setup Automation**: Created scripts for easy installation

## 📁 Important Files

- `ros2_moveit_franka/README.md` - Complete documentation
- `ros2_moveit_franka/scripts/setup_franka_ros2.sh` - Automated setup
- `ros2_moveit_franka/ros2_moveit_franka/simple_arm_control.py` - Working demo
- `~/franka_ros2_ws/src/franka_description/robots/common/franka_arm.ros2_control.xacro` - Fixed URDF

## 📊 Test Results

```
✅ Robot Connection: SUCCESS
✅ MoveIt Launch: SUCCESS
✅ Home Movement: SUCCESS
✅ X Direction Movement: SUCCESS
✅ Return Home: SUCCESS
✅ Demo Complete: SUCCESS
```

## 🔄 Integration with Existing System

This MoveIt integration can work alongside your existing Deoxys-based system:
- Same robot IP configuration
- Compatible workspace limits
- Independent operation (run one at a time)
- Can be used for high-level motion planning

## 🎯 Next Steps

The system is ready for:
- Custom trajectory planning
- Pick and place operations
- Integration with perception systems
- Advanced MoveIt features (collision avoidance, etc.)

---
**Status**: ✅ FULLY WORKING - Ready for production use!
75 changes: 75 additions & 0 deletions pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Core dependencies
numpy>=1.19.0,<2.0
scipy
pyzmq
mcap
mcap-ros2-support
opencv-python>=4.5.0
pyrealsense2==2.55.1.6486
pyyaml
matplotlib
Pillow
pyserial
requests
websocket-client
tqdm
h5py
pandas
scikit-learn
torch>=1.9.0
torchvision>=0.10.0
transformers>=4.20.0
wandb
tensorboard
omegaconf
hydra-core
einops
diffusers
accelerate

# ROS2 dependencies (install via rosdep/apt for system packages)
# These are Python packages that can be installed via pip

# Performance optimizations
uvloop # Faster event loop
aiofiles # Async file I/O
aioserial # Async serial communication

# VR/Robot control
oculus_reader # From the existing codebase (for backward compatibility)
pure-python-adb>=0.3.0.dev0 # For Meta Quest (Oculus) VR controller support
deoxys # Keep for compatibility during transition

# Development tools
pytest
pytest-asyncio
black
flake8
mypy
ipython
jupyter
watchdog # For hot reload functionality

# Additional async support
asyncio-mqtt
aiohttp

# Camera dependencies
pyrealsense2==2.55.1.6486 # Latest stable Intel RealSense SDK
opencv-python>=4.5.0 # OpenCV for image processing and generic cameras
pyyaml # For camera configuration files

# ZED SDK Python wrapper (pyzed) must be installed separately:
# 1. Install ZED SDK 5.0 from https://www.stereolabs.com/developers/release
# 2. Run: python /usr/local/zed/get_python_api.py
# Note: Requires CUDA, see ZED documentation for details

# VR dependencies
requests
websocket-client

# Optional dependencies for development
pytest # For running tests
pytest-asyncio # For async tests
black # Code formatting
flake8 # Linting
133 changes: 133 additions & 0 deletions ros2_moveit_franka/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"name": "ROS 2 MoveIt Franka Development",
"dockerComposeFile": "../docker-compose.yml",
"service": "ros2_moveit_franka",
"workspaceFolder": "/workspace/ros2_ws",

// Configure container user
"remoteUser": "root",

// Keep container running after VS Code closes
"shutdownAction": "stopCompose",

// Features and extensions
"customizations": {
"vscode": {
"extensions": [
// ROS extensions
"ms-iot.vscode-ros",
"ajshort.ros2",
"nonamelive.ros2-snippets",

// Python extensions
"ms-python.python",
"ms-python.pylint",
"ms-python.black-formatter",
"ms-python.isort",

// C++ extensions (for potential C++ development)
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools",

// Development tools
"eamodio.gitlens",
"ms-vscode.vscode-json",
"redhat.vscode-yaml",
"ms-vscode.hexeditor",

// Docker support
"ms-azuretools.vscode-docker",

// XML support (for launch files and URDF)
"redhat.vscode-xml",

// Markdown support
"yzhang.markdown-all-in-one"
],
"settings": {
// Python settings
"python.defaultInterpreterPath": "/usr/bin/python3",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.provider": "black",
"python.sortImports.args": ["--profile", "black"],

// ROS settings
"ros.distro": "humble",
"ros.rosSetupScript": "/opt/ros/humble/setup.bash",

// Editor settings
"editor.rulers": [88, 120],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},

// File associations
"files.associations": {
"*.launch": "xml",
"*.urdf": "xml",
"*.xacro": "xml",
"*.sdf": "xml"
},

// Terminal settings
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"args": ["-l"],
"env": {
"ROS_DISTRO": "humble"
}
}
}
}
}
},

// Port forwarding for ROS communication
"forwardPorts": [7400, 7401, 7402, 7403, 7404],
"portsAttributes": {
"7400": {
"label": "ROS DDS Discovery"
},
"7401": {
"label": "ROS DDS User Data"
}
},

// Environment variables
"containerEnv": {
"ROS_DISTRO": "humble",
"ROS_DOMAIN_ID": "42",
"ROBOT_IP": "192.168.1.59",
"PYTHONDONTWRITEBYTECODE": "1"
},

// Post-create setup
"postCreateCommand": [
"bash",
"-c",
"echo 'Setting up development environment...' && source /opt/ros/humble/setup.bash && source /workspace/franka_ros2_ws/install/setup.bash && cd /workspace/ros2_ws && colcon build --packages-select ros2_moveit_franka --symlink-install && echo 'source /workspace/ros2_ws/install/setup.bash' >> ~/.bashrc && echo '✅ Development environment ready!' && echo 'Run: ros2 launch ros2_moveit_franka franka_demo.launch.py use_fake_hardware:=true'"
],

// Mount host's X11 socket for GUI applications
"mounts": [
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
"source=${localWorkspaceFolder},target=/workspace/ros2_ws/src/ros2_moveit_franka,type=bind,consistency=cached"
],

// Additional container capabilities
"capAdd": ["SYS_NICE", "NET_ADMIN"],

// Run arguments for GUI support
"runArgs": [
"--network=host",
"--env",
"DISPLAY=${localEnv:DISPLAY}",
"--env",
"QT_X11_NO_MITSHM=1"
]
}
42 changes: 42 additions & 0 deletions ros2_moveit_franka/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Git files
.git/
.gitignore

# Build artifacts
build/
install/
log/
*.pyc
__pycache__/

# IDE files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Documentation build
docs/_build/

# Python
*.egg-info/
dist/
.pytest_cache/

# ROS
*.bag
*.mcap

# Temporary files
*.tmp
*.temp
Loading