Warning : The contents in this chapter corresponds to the
Remote PC (your desktop or laptop PC) which will control TurtleBot3. Do NOT apply this instruction to your TurtleBot3.
Note : OpenCR1.0 is pre-loaded with the software needed to run your specific TurtleBot3 model(Burger or Waffle). Refer to the information below only if you want to modify the existing software or write new software for OpenCR1.0.
Note : This instruction was tested on Ubuntu 16.04 and ROS Kinetic Kame and OpenCR1.0 software setup can be done from Intel® Joule™.
OpenCR1.0 controls DYNAMIXELs with instructions from the SBC. To be able to control DYNAMIXELs, a specific firmware should be installed on the board. See the descriptions and configure the settings.
Following instructions will setup OpenCR1.0 Arduino development environment on the
Tip : The terminal application can be found with the Ubuntu search icon on the top left corner of the screen. Shortcut key for terminal is Ctrl-Alt-T.
[Remote PC] The following commands allow to use OpenCR1.0 USB port for uploading
Arduino IDE program without acquiring root permission.
wget https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/99-opencr-cdc.rules sudo cp ./99-opencr-cdc.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules sudo udevadm trigger
[Remote PC] OpenCR1.0 libraries are designed for 32-bit platform, therefore, 64-bit PC requires 32-bit compiler for Arduino IDE.
sudo apt-get install libncurses5-dev:i386
[Remote PC] Download the latest version of
Arduino IDE from official Arduino homepage and install the program. OpenCR1.0 supports Arduino IDE
1.6.12 or later (OpenCR1.0 has also been tested with Arduino IDE
[Remote PC] Extract downloaded file to desired folder and execute the install file in the folder from the terminal. The below example uses tools folder in the root directory (
~/). This folder will act as Arduino IDE folder.
cd ~/tools/arduino-1.8.1 ./install.sh
[Remote PC] Open the script file with below command.
[Remote PC] Append below
Arduino IDE path information at the end of the
bashrc file. It is recommended to use gedit editor. (Use another editor if necessary)
[Remote PC] Last but not least,
bashrc file to apply changes.
[Remote PC] In order to run
Arduino IDE on Linux platform, enter below command on the terminal.
[Remote PC] If the program is installed and configured correctly, you’ll be able to see GUI program as below.
[Remote PC] When
Arduino IDE is running, go to File → Preferences from the menu of the program. When the Preferences window appears, copy and paste following link to the
Additional Boards Manager URLs textbox. (This step may take about 20 min.)
[Remote PC] Go to Tools → Board → Boards Manager.
[Remote PC] Type
OpenCR into the textbox to find the
OpenCR by ROBOTIS package. If the package is found, click Install.
[Remote PC] When the package installation is completed,
INSTALLED text will be appeared next to the package name.
[Remote PC] See if
OpenCR Board is now in the list of Tools → Board. Select OpenCR Board to import OpenCR Board source.
[Remote PC] This section shows how to setup the USB port for program upload. OpenCR1.0 should be connected to the PC with the USB port. [Remote PC] Select Tools → Port → /dev/ttyACM0.
Warning : The last digit value
0 in the string
/dev/ttyACM0 might be different depend on the USB connection environment.
Note : This section is not necessary until there is new updates in the OpenCR bootloader. Once the bootloader is burned on the board, IT DOESN’T NEED EXTRA BURNING.
The STM32F7xx, which is used for the main MCU of OpenCR1.0, supports DFU(Device Firmware Upgrade). This enables built-in bootloader of the MCU to boot with the DFU protocol by using USB, primarily for the bootloader initialization, the recovery mode and the bootloader update. The biggest advantage of using bootloader with USB is that JTAG equipment is not required. Therefore, writing the new firmware by using the DFU mode which is embedded in the MCU will not require writing / debugging equipment such as STLink.
[Remote PC] Go to Tools → DFU-UTIL
[Remote PC] Press Boot button at first, then press Reset button after few seconds while Boot button is pressed. Keeping Boot button pressed, release Reset button at second. Finally, release Boot button slowly. This enables user to activate the DFU mode.
[Remote PC] If you successfully entered to DFU mode, you will be able to find
STMicroelectronics STM Device in DFU Mode text string when lsusb is entered in the terminal.
[Remote PC] Go to Tools → Burn Bootloader to download the bootloader.
[Remote PC] When download is completed, press Reset button again.
OpenCR1.0 firmware (or the source) for ROS is to control DYNAMIXEL and sensors in the ROS. The firmware is located in OpenCR example which is downloaded by the board manager. If you have TurtleBot3 Burger,
[Remote PC] Go to File → Examples → turtlebot3 → turtlebot3_burger → turtlebot3_core.
If you have TurtleBot3 Waffle,
[Remote PC] Go to File → Examples → turtlebot3 → turtlebot3_waffle → turtlebot3_core.
[Remote PC] Click Upload button to upload the firmware to OpenCR1.0.
Note : If error occurs while uploading firmware, go to Tools → Port and check if correct port is selected. Press Reset button on the OpenCR1.0 and try to upload the firmware again.
[Remote PC] When firmware upload is completed,
jump_to_fw text string will be printed on the screen.