Error Codes Reference
This document provides a reference for error codes and messages that may appear in the RCR Common Robotics Platform.
ROS2 Error Codes
Node Errors
Node Not Found
Code:
NODE_NOT_FOUNDCause: Node not running or not found
Solution: Check if node is launched, verify node name
Node Already Running
Code:
NODE_ALREADY_RUNNINGCause: Multiple instances of same node
Solution: Kill existing node, restart system
Topic Errors
Topic Not Found
Code:
TOPIC_NOT_FOUNDCause: Topic not published or wrong name
Solution: Check topic list, verify publisher
Topic Connection Failed
Code:
TOPIC_CONNECTION_FAILEDCause: Network or communication issue
Solution: Check network, restart nodes
Service Errors
Service Not Available
Code:
SERVICE_NOT_AVAILABLECause: Service not running or not found
Solution: Check service list, verify service name
Service Call Failed
Code:
SERVICE_CALL_FAILEDCause: Service error or timeout
Solution: Check service logs, verify parameters
Hardware Error Codes
Power System Errors
Low Battery
Code:
LOW_BATTERYCause: Battery voltage below threshold
Solution: Charge battery, check battery health
Power Supply Failure
Code:
POWER_SUPPLY_FAILURECause: Power supply malfunction
Solution: Check power connections, replace supply
Overcurrent Protection
Code:
OVERCURRENT_PROTECTIONCause: Current draw too high
Solution: Check for shorts, reduce load
Motor System Errors
Motor Driver Error
Code:
MOTOR_DRIVER_ERRORCause: Motor driver malfunction
Solution: Check driver connections, replace driver
Encoder Error
Code:
ENCODER_ERRORCause: Encoder malfunction or disconnection
Solution: Check encoder wiring, replace encoder
Motor Overload
Code:
MOTOR_OVERLOADCause: Motor current too high
Solution: Reduce load, check for binding
Sensor Errors
LiDAR Error
Code:
LIDAR_ERRORCause: LiDAR malfunction or disconnection
Solution: Check USB connection, restart LiDAR
Camera Error
Code:
CAMERA_ERRORCause: Camera malfunction or disconnection
Solution: Check USB connection, restart camera
IMU Error
Code:
IMU_ERRORCause: IMU malfunction or disconnection
Solution: Check I2C connection, restart IMU
System Error Codes
Communication Errors
Serial Communication Error
Code:
SERIAL_COMM_ERRORCause: Serial port communication failure
Solution: Check serial connection, restart device
USB Communication Error
Code:
USB_COMM_ERRORCause: USB communication failure
Solution: Check USB connection, restart device
Network Communication Error
Code:
NETWORK_COMM_ERRORCause: Network communication failure
Solution: Check network connection, restart network
File System Errors
File Not Found
Code:
FILE_NOT_FOUNDCause: Required file missing
Solution: Check file path, restore file
Permission Denied
Code:
PERMISSION_DENIEDCause: Insufficient permissions
Solution: Check file permissions, use sudo if needed
Disk Space Full
Code:
DISK_SPACE_FULLCause: Insufficient disk space
Solution: Free up disk space, clean logs
Error Handling
Error Logging
System Logs
# Check system logs
journalctl -u ros2
journalctl -u robot
# Check ROS2 logs
ros2 log list
ros2 log show
Application Logs
# Check application logs
tail -f /var/log/robot.log
tail -f ~/.ros/log/latest/robot.log
Error Recovery
Automatic Recovery
System attempts automatic recovery
Restart failed components
Fallback to safe mode
Manual Recovery
Follow recovery procedures
Restart system components
Check error logs
Error Prevention
Regular Maintenance
Perform regular maintenance
Monitor system health
Update software regularly
Monitoring
Monitor system performance
Check for early warning signs
Implement health checks
Diagnostic Tools
System Diagnostics
# Check system resources
htop
df -h
free -h
# Check network
ip addr show
ping google.com
# Check USB devices
lsusb
ls /dev/tty*
ROS2 Diagnostics
# Check ROS2 status
ros2 node list
ros2 topic list
ros2 service list
# Monitor topics
ros2 topic hz /${ROS_NAME}/topic_name
ros2 topic echo /${ROS_NAME}/topic_name
Hardware Diagnostics
# Check I2C devices
i2cdetect -y 1
# Check serial devices
ls /dev/tty*
# Check power
cat /sys/class/power_supply/BAT0/voltage_now
Error Reporting
Reporting Errors
When reporting errors, include:
Error Code: Specific error code
Error Message: Full error message
Context: What was happening when error occurred
System State: Current system state
Logs: Relevant log entries
Steps to Reproduce: How to reproduce the error
Error Tracking
Document all errors
Track error frequency
Monitor error trends
Update error codes as needed
For common issues, see Common Issues For recovery procedures, see Recovery Procedures For troubleshooting, see Troubleshooting