Skip to content

ez-turtlebot3/OpenCR

 
 

Repository files navigation

Overview

This repository is a fork of ROBOTIS-GIT/OpenCR. The read-analog-pins-tb3-ros2 branch has extended the TurtleBot3 ROS2 firmware to read data from the analog pins A0-A5 of the OpenCR board. The master branch is kept in sync with the original repository.

Reading analog data is a key element of the ez-turtlebot3 project, which combines this OpenCR fork with an analog-enabled fork of the turtlebot3 repo and a separate ROS 2 analog processor package to process and publish the analog data.

There are also a couple of arduino sketches in read_analog_pins_from_OpenCR that allow the user to plug the OpenCR directly into their PC's USB port to read analog pin data, therefore bypassing the TurtleBot3's Raspberry Pi and ROS 2 altogether.

TurtleBot3 ROS 2 Analog-Enabled Firmware Installation

  1. Connect the OpenCR board to the PC via USB to micro USB.
  2. Install the Arduino IDE and add the OpenCR board to the boards manager following the Robotis E-Manual.
  3. Open the IDE's Library Manager and install the Dynamixel2Arduino library.
  4. Install the Arduino CLI
  • Make sure $HOME/.local/bin is added to your $PATH in your bashrc file:
    • echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
    • source ~/.bashrc
  • curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$HOME/.local/bin sh
  • arduino-cli config init
  • arduino-cli core update-index
  • arduino-cli core install OpenCR:OpenCR
  1. Clone this analog-enabled OpenCR repo fork
  • git clone https://github.com/ez-turtlebot3/OpenCR.git
  • cd OpenCR
  • git switch read-analog-pins-tb3-ros2
  1. Upload the analog-enabled firmware
  • arduino-cli compile --upload -v -p /dev/ttyACM0 --fqbn OpenCR:OpenCR:OpenCR --libraries=$(pwd)/arduino/opencr_arduino/opencr/libraries arduino/opencr_arduino/opencr/libraries/turtlebot3_ros2/examples/turtlebot3_burger/turtlebot3_burger.ino
  1. Wait to hear the OpenCR melody, which indicates the upload was successful.
  2. Disconnect the OpenCR from the remote PC.
  3. Connect the OpenCR to the TurtleBot Raspberry Pi.

License

This project is licensed under the same terms as the original OpenCR project. See the LICENSE file for details.

About

Contains extended TurtleBot3 ROS 2 firmware that reads analog pins A0-A5

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 68.8%
  • C++ 29.4%
  • HTML 1.6%
  • Assembly 0.2%
  • Shell 0.0%
  • Linker Script 0.0%