This repo demonstrates how to customize the ROBOTIS OpenCR firmware to work with a 3rd motor on the Turtlebot 3 and ros2 Humble.
The repo is a fork of ROBOTIS' OpenCR library.
All code for the 3rd "GIX" motor is based on the Open Manipulator firmware extension for the Turtlebot 3.
Setup was tested using Ubuntu 24.04.
-
Install the Arduino IDE.
-
Follow ROBOTIS' guide to configure your computer's USB ports to work with the OpenCR board. Scroll down to where it says "Click here to expand more details about firmware uploads using the Arduino IDE".
-
Continue following their guide to add the OpenCR board to Arduino IDE.
-
Add the Dynamixel2Arduino library to the Arduino IDE.
-
Make sure that only the new motor is plugged into the OpenCR board.
-
Plug in the OpenCR over USB.
-
Follow step 7 of the Turtlebot 3 OpenCR setup guide to put the board in "recovery mode".
-
In Arduino IDE, open File > Examples > OpenCR > 10. Etc. > usb_to_dxl.
-
Select the OpenCR board and its port in Arduino IDE.
-
Flash the example firmware onto the OpenCR board.
-
Install the Dynamixel Wizard.
-
Plug a battery into the OpenCR board and turn the power on.
-
Scan for the new motor, if the motor is new, the default ID should be 1, and the baudrate should be 57600.
-
Change the ID to 3, and the baudrate to 1,000,000.
-
Make sure you can move the motor using the Dynamixel Wizard.
-
Turn off the OpenCR and unplug it.
-
Plug all 3 motors into the OpenCR board.
-
Plug in the OpenCR board to your computer.
-
Clone this repo, do not download it.
-
Open the t516_OpenCR.ino file in Arduino IDE.
-
Change the configuration string to either "GIX_Burger" or "GIX_Waffle" depending on the type of Turtlebot 3 you are using.
-
Select the OpenCR board, and its port in Arduino IDE.
-
Put the OpenCR board in recovery mode.
-
Install the GIX firmware onto the OpenCR board.
-
Turn off the OpenCR board, unplug it from your computer, and plug it back into the Turtlebot's Raspberry Pi. It should play a different song on startup.
The ros2_control code to use the 3rd motor is demonstrated in the GIXLabs' t516_project_example repo
If your motor is not working for some reason, follow ROBOTIS' firmware recovery guide.
This repo is licensed under the Apache-2.0 license.
