Skip to content

CollaborativeRoboticsLab/kobuki

Repository files navigation

Kobuki ROS2 package

This repository and the dependencies repository focuses on merging all the public forks available on the original Kobuki Base repositories and extending the work towards an complete ROS2 package for kobuki based turtlebot robots. Additionally a Dockerfile and prebuilt containers for kobuki system has been provided that supports both ARM64 and AMD64 systems.

Docker Usage

Docker Compose based use

Add the following snippet under services to any compose.yaml file to add this container.

  kobuki:
    image: ghcr.io/airesearchlab/kobuki:humble
    command: ros2 launch kobuki kobuki.launch.py
    restart: unless-stopped
    privileged: true
    network_mode: host
    volumes:
      - /dev:/dev

Setup for pulling container from ghcr.io and running

Clone this reposiotory

git clone https://github.com/AIResearchLab/kobuki.git

Pull the Docker image and start compose (No need to run docker compose build)

cd kobuki/docker
docker compose pull
docker compose up

Setup for building the container on device running

Clone this reposiotory

git clone https://github.com/AIResearchLab/kobuki.git

Build the Docker image and start compose

cd kobuki/docker
docker compose -f compose-build.yaml build
docker compose -f compose-build.yaml up

Direct Installation

  1. Install the following binary dependencies

    sudo apt install ros-humble-angles ros-humble-diagnostics ros-humble-joint-state-publisher ros-humble-ros-testing
  2. Optional Dependencies for using kobuki_keyop Issue #21

    sudo apt install xterm
  3. Optional Dependencies for using kobuki_joyop

    sudo apt install ros-humble-teleop-twist-joy ros-humble-joy
  4. Clone main repository and dependencies

    git clone --recurse-submodules https://github.com/AIResearchLab/kobuki.git
    git clone --recurse-submodules https://github.com/AIResearchLab/kobuki_dependencies.git
  5. Build the system with following command.

    colcon build
  6. Set udev rule for kobuki using following commands and unplug and replug the usb cable.

    wget https://raw.githubusercontent.com/kobuki-base/kobuki_ftdi/devel/60-kobuki.rules
    sudo cp 60-kobuki.rules /etc/udev/rules.d
    
    sudo service udev reload
    sudo service udev restart

Non-ROS usage

Check connectivity

Run following commands in the workspace.

source ./install/setup.bash
kobuki-version-info

Ouput should be like,

Version Info:
Hardware Version: 1.0.4
Firmware Version: 1.2.0
Software Version: 1.1.0
Unique Device ID: 97713968-842422349-1361404194

Kobuki Teleop keyboard

Run following commands in the workspace and follow onscreen instructions

source ./install/setup.bash
kobuki-simple-keyop

ROS usage

Kobuki system with navigation stack (joysitck backup) start

source ./install/setup.bash
ros2 launch kobuki kobuki_navigation.launch.py

Kobuki system with joystick start

source ./install/setup.bash
ros2 launch kobuki kobuki_joystick.launch.py

Kobuki KeyOp control

Run following commands in the workspace to start kobuki system.

source ./install/setup.bash
ros2 launch kobuki_node kobuki_node.launch.py

Run following commands in the workspace to use kobuki keyboard control.

source ./install/setup.bash
ros2 run kobuki_keyop kobuki_keyop_node