Appendix C: Troubleshooting and FAQ
This appendix provides common troubleshooting approaches and frequently asked questions related to Physical AI and humanoid robotics systems, with particular focus on the ROS 2, simulation, and VLA components discussed throughout this book.
General Troubleshooting Approach
Methodical Debugging Process
- Reproduce the issue - Ensure you can reliably trigger the problem
- Isolate the scope - Determine which subsystem is causing the issue
- Check prerequisites - Verify hardware, network, and dependencies
- Examine logs - Look at error messages and log files
- Test components - Test individual components in isolation
- Formulate hypothesis - Develop a theory about the root cause
- Test hypothesis - Modify one variable at a time to confirm
- Implement solution - Apply the fix
- Verify fix - Confirm the solution resolves the issue
Common ROS 2 Issues and Solutions
Topic Connection Issues
Problem: Nodes are not connecting to topics properly.
Solution:
1. Verify nodes are on the same ROS_DOMAIN_ID
2. Check if nodes are actually publishing/subscribing:
ros2 topic list
ros2 node list
3. Check QoS compatibility between publishers and subscribers
4. Ensure all nodes are using the same rmw implementation
Problem: High latency in topic communication.
Solution:
1. Check for network issues if using multi-machine setup
2. Verify QoS settings (use RELIABLE for critical data, BEST_EFFORT for visual data)
3. Monitor bandwidth usage
4. Consider using intra-process communication where possible
Service/Action Call Failures
Problem: Services return immediately without executing.
Solution:
1. Verify service server is running: ros2 service list
2. Check service type compatibility between client and server
3. Ensure service callbacks are properly implemented and not throwing exceptions
4. Add logging to service callbacks to verify they're being called
Parameter Issues
Problem: Parameters not loading correctly from YAML files.
Solution:
1. Verify YAML syntax using yaml_lint
2. Ensure parameter file follows correct format:
node_name:
ros__parameters:
param_name: value
3. Check file paths and permissions
4. Load parameters correctly in launch files
Simulation Troubleshooting
Gazebo Issues
Problem: Robot falls through the ground.
Solution:
1. Check collision properties of links (ensure <collision> tags are present)
2. Verify mass and inertia values are properly defined
3. Check physics engine settings (time step and solver parameters)
4. Ensure proper orientation of links (especially for humanoid robots)
Problem: Joints behave erratically in simulation.
Solution:
1. Verify joint limits: <limit lower="" upper="" effort="" velocity=""/>
2. Check joint types: ensure revolute joints are not rotating beyond limits
3. Adjust physics parameters: increase iterations, adjust ERP/CFM
4. Verify transmission configurations if using ros2_control
Problem: Gazebo startup crashes.
Solution:
1. Check available GPU memory
2. Run without GUI: gz sim -s
3. Verify graphics drivers are up to date
4. Check for port conflicts if running multiple simulations
Isaac Sim Issues
Problem: Isaac Sim fails to launch in Docker.
Solution:
1. Verify Docker is running with GPU access:
docker run --gpus all --rm -it nvidia/cuda:11.8-devel nvidia-smi
2. Check NVIDIA Container Runtime installation
3. Verify Isaac Sim Docker image is correctly built
4. Check log files in ~/isaac_sim_logs/
Problem: Synthetic data generation fails.
Solution:
1. Verify USD file paths are correct
2. Check if the scene is properly loaded
3. Ensure synthetic data helper components are enabled
4. Verify rendering settings (lighting, materials, camera positions)
Physical AI & VLA Troubleshooting
Vision Issues
Problem: Object detection fails in real-world conditions.
Solution:
1. Check lighting conditions (too bright/dark)
2. Verify camera calibration parameters
3. Test with synthetic data to isolate issues
4. Consider domain randomization techniques during training
5. Validate that model was trained on similar data distributions
Problem: Vision models run too slowly for real-time applications.
Solution:
1. Optimize model through quantization or pruning
2. Use TensorRT or similar acceleration libraries
3. Consider edge inference hardware (Jetson series)
4. Optimize preprocessing pipeline
5. Reduce input resolution if accuracy permits
Language Model Integration Issues
Problem: Large language model responses are inconsistent.
Solution:
1. Use system and user messages appropriately
2. Provide specific context and constraints
3. Implement output parsing to ensure consistent formats
4. Consider fine-tuning for robot-specific commands
5. Validate responses before execution
Problem: Natural language commands not interpreted correctly.
Solution:
1. Create a structured command vocabulary
2. Implement fallback for unrecognized commands
3. Use intent classification before action mapping
4. Implement confidence scoring and rejection thresholds
5. Maintain conversation context for follow-up commands
Action Execution Problems
Problem: Planned actions fail during execution.
Solution:
1. Verify kinematic/kinodynamic constraints are respected
2. Check for obstacles not detected during planning
3. Implement replanning at execution time
4. Add safety margins to planned trajectories
5. Use feedback control to correct deviations
Hardware Troubleshooting
Communication Issues
Problem: Sensors not responding or returning invalid data.
Solution:
1. Check physical connections (USB, power, grounds)
2. Verify baud rates and communication protocols match
3. Test with manufacturer tools or simple terminal programs
4. Check for electromagnetic interference
5. Implement retries and timeouts in ROS nodes
Problem: Servo motors jitter or hold position poorly.
Solution:
1. Check power supply adequacy (voltage drop under load)
2. Verify control frequency (typically 50-100 Hz for servos)
3. Check for mechanical binding
4. Adjust PID gains if implemented
5. Consider upgrade to more powerful servos if consistently underpowered
Real-time Performance Issues
Problem: Control loop misses timing deadlines.
Solution:
1. Use real-time kernel and RT scheduling
2. Reduce computation in control loops
3. Profile code to identify bottlenecks
4. Use dedicated CPU cores for control threads
5. Consider hardware solutions (microcontrollers, FPGA acceleration)
Common Error Messages and Solutions
ROS 2 Common Errors
Error: "No data since 5 seconds for topic X"
Cause: Publisher has stopped publishing or has died
Solution:
- Check if publishing node is still alive: ros2 node list
- Restart the node if necessary
- Check for exceptions in node's log output
Error: "Could not find a connection between 'X' and 'Y'"
Cause: TF frames are not properly published or connected
Solution:
- Check tf2 tree with: ros2 run tf2_tools view_frames
- Verify robot_state_publisher is running
- Check URDF for proper joint connections
- Ensure static_transform_publishers are running for static links
Error: "parameter declared twice"
Cause: Parameter declared in multiple places
Solution:
- Check for duplicate declare_parameter calls
- Verify parameter YAML files don't conflict
- Use node_namespacing appropriately
Simulation Common Errors
Error: "Model fell through the world"
Cause: Physics simulation failed
Solution:
- Check mass and inertia specifications
- Verify collision geometry is properly defined
- Adjust physics parameters (smaller time step, more iterations)
- Check for NaN values in transforms
Error: "Failed to load plugin"
Cause: Plugin not found or incompatible
Solution:
- Verify plugin exists in specified path
- Check compiler compatibility
- Ensure plugin library is linked correctly
- Check ROS package path and installation
Performance Optimization
Memory Management
# Example: Memory-efficient sensor data processing
import numpy as np
from collections import deque
class EfficientSensorProcessor:
def __init__(self, buffer_size=100):
# Use deque to avoid memory allocation on every append
self.buffer = deque(maxlen=buffer_size)
self.data_type = np.float32 # Use appropriate data type
def process_sensor_data(self, raw_data):
# Convert to efficient data type
processed = np.asarray(raw_data, dtype=self.data_type)
self.buffer.append(processed)
# Process only what's needed, not the entire buffer
recent_data = np.array(list(self.buffer)[-10:])
return self.compute_with_recent(recent_data)
Multi-threading Considerations
# Example: Thread-safe parameter updates
import threading
from rclpy.node import Node
class ThreadSafeController(Node):
def __init__(self):
super().__init__('threadsafe_controller')
# Use threading lock for shared data
self.param_lock = threading.Lock()
# Declare parameters
self.declare_parameter('kp', 1.0)
# Update parameters safely
self.add_on_set_parameters_callback(self.safe_parameter_callback)
def safe_parameter_callback(self, parameters):
with self.param_lock:
for param in parameters:
if param.name == 'kp':
self.kp = param.value
return SetParametersResult(successful=True)
Frequently Asked Questions
Q: How do I debug a complex Physical AI system with multiple components? A: Use a systematic approach:
- Test components individually before integration
- Use logging extensively in your nodes
- Visualize data in RViz/Gazebo to understand system state
- Implement health monitoring for each subsystem
- Create a diagnostic aggregator to correlate system health
Q: What's the best way to test VLA systems before deployment? A: Implement a layered testing approach:
- Unit tests for individual models (vision, language, action)
- Integration tests in simulation with known scenarios
- Hardware-in-loop testing with limited physical interaction
- Controlled safety testing with human oversight
- Gradual expansion of operational parameters
Q: How do I handle the sim-to-real transfer gap? A: Several techniques can help bridge the gap:
- Domain randomization during training
- System identification to calibrate simulators
- Online adaptation algorithms that adjust to real-world conditions
- Robust control techniques that tolerate model inaccuracies
- Extensive validation in realistic simulation environments
Q: What safety mechanisms should I implement in humanoid robots? A: Essential safety mechanisms include:
- Emergency stop (both software and hardware)
- Joint position and torque limits
- Collision detection and avoidance
- Balance recovery behaviors
- Operational envelope monitoring (speed, acceleration limits)
- Human safety detection (keep safe distances)
- Graceful degradation when systems fail
Q: How do I optimize AI models for edge deployment on humanoid robots? A: Consider these optimization strategies:
- Model quantization (INT8, FP16) for reduced precision
- Model pruning to remove redundant connections
- Knowledge distillation to create smaller student models
- Hardware acceleration (TensorRT, OpenVINO, EdgeTPU)
- Multi-modal fusion to reduce computational load
Q: What's the recommended approach for multi-robot coordination? A: For multi-robot systems:
- Implement distributed coordination algorithms
- Use communication protocols with built-in message validation
- Plan for graceful degradation when communication fails
- Implement conflict resolution for shared resources
- Use behavior trees or state machines for coordination logic
Systematic Debugging Checklist
Before Running Complex Systems
- Verify all individual components function in isolation
- Check system resource availability (CPU, memory, disk)
- Validate network connectivity for distributed systems
- Confirm parameter values are appropriate for your hardware
- Ensure TF tree is complete and consistent
- Verify all required nodes are launched
When Issues Occur
- Check the ROS 2 graph: ros2 topic list, ros2 node list
- Examine logs: ros2 topic echo, ros2 run rqt_console rqt_console
- Visualize system state in RViz
- Verify timing relationships and control frequencies
- Monitor system resources (top, htop, nvidia-smi)
- Test with simplified scenarios before complex tasks
Performance Issues
- Profile computational bottlenecks
- Check for memory leaks or unnecessary allocations
- Monitor real-time constraints adherence
- Verify data flow rates match system capacity
- Validate control loop frequencies
This troubleshooting guide should help resolve common issues encountered in Physical AI and humanoid robotics development. Remember to maintain detailed logs and version control to help isolate and fix problems efficiently.