Table of Contents

Overview
#

OpenCR (Open-source Control module for ROS) is the motor controller and sensor interface for TurtleBot3. This guide covers firmware setup and basic testing.

Installation Steps
#

Add ARM Architecture Support
#

sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install libc6:armhf

Set Environment Variables
#

export OPENCR_PORT=/dev/ttyACM0
export OPENCR_MODEL=burger

For Waffle:

export OPENCR_MODEL=waffle

Download Firmware
#

rm -rf ./opencr_update.tar.bz2
wget https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS1/latest/opencr_update.tar.bz2

Extract and Flash
#

tar -xvf opencr_update.tar.bz2
cd ./opencr_update
./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr

Key Concepts Explained
#

dpkg
#

Debian Package Manager:

  • Low-level package management
  • Install, remove, configure packages
  • --add-architecture: Enables cross-architecture packages

armhf
#

ARM Hard Float:

  • ARM processor architecture
  • Uses hardware floating-point unit
  • More efficient than software float (armel)

libc6
#

GNU C Library version 6:

  • Core system library
  • Provides standard C functions
  • Required for running ARM binaries

Environment Variables
#

Why use them:

  • Flexibility: Easy to change without editing scripts
  • Security: Credentials not in code
  • Automation: Scripts can read values

Testing OpenCR
#

Physical Setup
#

  1. Connect power to OpenCR
  2. Place robot on flat ground
  3. Ensure wheels are free to move

Push Button Test
#

OpenCR has test buttons:

ButtonFunction
SW1Move forward
SW2Rotate left

LED Indicators
#

LEDMeaning
PWRPower on
USERProgrammable
STATUSROS connected

Troubleshooting
#

Permission Denied
#

sudo chmod a+rw /dev/ttyACM0

Or add user to dialout group:

sudo usermod -a -G dialout $USER
# Logout and login again

Device Not Found
#

Check connection:

ls /dev/ttyACM*

If not listed:

  • Check USB cable
  • Try different USB port
  • Restart OpenCR

Firmware Flash Failed
#

Error: Cannot open device

Solutions:

  1. Check port name matches actual device
  2. Ensure no other program using port
  3. Verify USB connection

OpenCR Commands
#

Reset OpenCR
#

Press RESET button or:

# From ROS
rosservice call /motor_power "state: false"
rosservice call /motor_power "state: true"

Check IMU Data
#

rostopic echo /imu

Motor Status
#

rostopic echo /joint_states

Advanced Configuration
#

Custom Firmware
#

For development:

# Clone repository
git clone https://github.com/ROBOTIS-GIT/OpenCR.git

# Open in Arduino IDE
# Select OpenCR board
# Upload sketch

Calibration
#

IMU calibration:

rosrun turtlebot3_bringup turtlebot3_motor_calibration.py

Hardware Connections
#

OpenCR
├── USB → Raspberry Pi
├── Dynamixel → Motors (L/R)
├── LDS → Laser sensor
├── IMU → Internal
└── Power → 11.1V LiPo