Robot MCP - Troubleshooting¶
Common issues and solutions for the Robot MCP system.
Table of Contents¶
- Connection Issues
- Object Detection Problems
- Robot Movement Issues
- LLM and Tool Call Problems
- Performance Issues
- Hardware Problems
- Development and Testing
Connection Issues¶
FastMCP Server Won't Start¶
Symptoms: - Server process exits immediately - Connection timeout errors - "Port already in use" messages
Solutions:
-
Check if port 8000 is already in use:
-
Check Python dependencies:
-
Start server manually with verbose logging:
-
Check log files:
Common Error Messages:
ImportError: No module named 'fastmcp'
→ Solution: pip install fastmcp
ModuleNotFoundError: No module named 'robot_environment'
→ Solution: pip install git+https://github.com/dgaida/robot_environment.git
redis.exceptions.ConnectionError
→ Solution: Start Redis: docker run -p 6379:6379 redis:alpine
Client Can't Connect to Server¶
Symptoms: - "Connection refused" errors - Timeout after 30 seconds - No response from server
Solutions:
-
Verify server is running:
-
Check firewall settings:
-
Verify server/client on same network:
-
Test with simple HTTP request:
Groq API Key Issues¶
Symptoms: - "Invalid API key" errors - Authentication failures - Empty responses from LLM
Solutions:
-
Verify API key is set:
-
Test API key:
-
Regenerate API key:
- Visit https://console.groq.com/keys
- Create new key
-
Update
secrets.env -
Check rate limits:
Object Detection Problems¶
See troubleshooting.md.
Robot Movement Issues¶
See troubleshooting.md.
LLM and Tool Call Problems¶
LLM Not Calling Tools¶
Symptoms: - LLM responds in text only - No robot actions performed - Tools ignored
Solutions:
-
Verify tools are registered:
-
Check tool call format:
-
Improve prompts:
-
Check model capabilities:
Tool Calls Failing¶
Symptoms: - "Error executing tool" messages - Partial execution - Tool returns errors
Solutions:
-
Check parameter types:
# ✅ Good: Correct types pick_place_object( object_name="pencil", # str pick_coordinate=[0.15, -0.05], # List[float] place_coordinate=[0.2, 0.1], # List[float] location="right next to" # str or None ) # ❌ Bad: Wrong types pick_place_object( object_name=123, # Should be string pick_coordinate="[0.15, -0.05]", # Should be list ... ) -
Validate coordinates:
-
Check object exists:
-
Review server logs:
Max Iterations Reached¶
Symptoms: - "Maximum iterations reached" message - Task incomplete - Loop detected
Solutions:
-
Increase iteration limit:
-
Break down complex tasks:
-
Provide intermediate coordinates:
Performance Issues¶
Slow Response Times¶
Symptoms: - Long delays between commands - System feels sluggish - Timeouts
Solutions:
-
Use faster Groq model:
-
Optimize object detection:
-
Enable GPU acceleration:
-
Reduce conversation history:
High Memory Usage¶
Symptoms: - System running out of memory - Crashes during operation - Slow performance
Solutions:
-
Use float16 instead of float32:
-
Clear detection cache:
-
Limit image resolution:
-
Close unused resources:
Rate Limit Errors¶
Problem: Too many requests to Groq
Solutions:
1. Add delays between commands
2. Use a less powerful model (llama-3.1-8b-instant)
3. Upgrade Groq plan for higher limits
4. Clear conversation history: type clear
Hardware Problems¶
See troubleshooting.md.
Development and Testing¶
Testing Without Robot¶
Use Simulation Mode:
# Start server in simulation
python server/fastmcp_robot_server.py --robot niryo
# (without --no-simulation flag)
Mock Objects for Testing:
# Create test objects
test_objects = [
{"label": "pencil", "x": 0.15, "y": -0.05, "width_m": 0.015, "height_m": 0.12},
{"label": "cube", "x": 0.20, "y": 0.10, "width_m": 0.04, "height_m": 0.04},
]
Debugging Tips¶
Enable Verbose Logging:
Add Debug Prints:
# In client code
print(f"Calling tool: {tool_name}")
print(f"Arguments: {json.dumps(arguments, indent=2)}")
Use Interactive Python:
# Test components directly
from robot_environment import Environment
env = Environment(...)
objects = env.get_detected_objects()
print(objects)
Check Redis Data:
Common Development Errors¶
Import Errors:
# ✅ Good
from client.fastmcp_groq_client import RobotFastMCPClient
# ❌ Bad
from fastmcp_groq_client import RobotFastMCPClient
Async/Await Issues:
# ✅ Good
async def main():
await client.connect()
asyncio.run(main())
# ❌ Bad
def main():
client.connect() # Missing await!
Path Issues:
# ✅ Good
server_path = Path(__file__).parent.parent / "server" / "fastmcp_robot_server.py"
# ❌ Bad
server_path = "server/fastmcp_robot_server.py" # Relative to cwd
Getting Help¶
Information to Include in Bug Reports¶
-
System Information:
-
Error Messages:
-
Reproduction Steps:
-
Configuration:
Resources¶
- GitHub Issues: https://github.com/dgaida/robot_mcp/issues
- Architecture: Architecture Guide
- Examples: docs/examples.md
- API Reference: docs/api.md
Quick Diagnostic Checklist¶
Before opening an issue, check:
- [ ] Redis is running
- [ ] Groq API key is valid
- [ ] Server is started and listening on port 8000
- [ ] Client can connect (test with curl)
- [ ] Robot is powered on (if using real robot)
- [ ] Camera is working (check Redis stream)
- [ ] Object detection is running (check for detections)
- [ ] Coordinates are within workspace bounds
- [ ] Object names match detected labels exactly
- [ ] All dependencies are installed
- [ ] Log files checked for errors
If all checked and still having issues, please open a GitHub issue with the information above!