Skip to content

Repository files navigation

Beaverbot

A ROS workspace contains essential packages for running Beaverbot with various hardwares.

This workspace is partially written by TUT-Systems Engneering Labroratory members and being used only for research purpores.

beaverbot

Table of contents

Hardware Configuration

hardware configuration

GNSS device

A Global Navigation Satellite System (GNSS) is a satellite configuration, or constellation, that provides coded satellite signals which are processed by a GNSS receiver to calculate position.

GNSS system is typically only able to provide a positioning accuracy on the order of several of meters. To get better accuracy, Ichimill service provided by SoftBank have been chosen for this project. Simly put, base receivers, which have fixed-location, computes correction information and distribute it via Internet, then it is used by our receiver to correct position obtained from GNSS signal. This system is expected to have a accuracy on the order of several of centimeters.

Since the below GNSS receiver which outputs corrected data is used in this package, nmea_serial_driver node is good enough for converting receiver's output (NMEA sentences) into ROS messages (sensor_msgs/NavSatFix).

In case of using different RTK-GNSS receiver, a package contains nodes for receiving correction information from Ichimill service and sending it to receivers is required. Unofficial package f9p_ichimill satisfies this requirement.

Softbank GNSS receiver

IMU sensor

An Intertial Measurement Unit (IMU) measures and reports body's specific force (also call proper acceleration), angular rate, magnetic fields using a combination of accelerometers, gycroscopes, and magnetomerters.

rt_imu

RT_USB_9axisIMU sensor is used in this project. IMU data is obtained via USB port, and expressed in ROS by using rt_usb_9axisimu_driver

The bias errors of IMU components should be calibrated manually for better accuracy. Refer to this manual for more information.

LiDAR

(in progress)

Robot control system

Tractor part of Beaverbot is an autonomous mobile robot (AMR) whose movement is based on two separately driven wheels placed on either side of the robot body. Velocity commands could be sent to robot via the interface device using serial communication.

robot_communication node in beaverbot_communication package is responsible for commucating with the robot. The velocity command published on /cmd_vel topic will be sent to the robot via interface devices. Concurrently, the rotary encoder data and battery's condition also be published respectively into /encoder and /battery topics.

Software configuration

software configuration

Localization & Mapping

(in progress)

Path planner

(in progress)

Path following controller

(in progress)

Manual for running beaverbot

Cloning the repository


  • Clone the repository and initialize submodules

    # Clone the repository
    git clone https://github.com/systut/beaverbot.git
    cd beaverbot
    
    # Initialize and update submodules
    git submodule update --init

    This will download the following submodules:

    • beaverbot_sensors/f9p_ichimill (Ver0.3.0.0) - For F9P GPS receiver
    • beaverbot_sensors/rplidar_ros (2.1.5) - For RPLIDAR
    • beaverbot_sensors/rt_usb_9axisimu_driver (1.0.1) - For RT-USB-9AXIS-IMU

Setting up the environment


  • Enable GUI within Docker containers

    ! Caution: This method exposes PC to external source. Therefore, a more secure alternative way is expected for using GUI within Docker containers. This problem was raised in Using GUI's with Docker

    For Linux:

    # This command is required to run every time the PC is restarted
    xhost + 

    Make a X authentication file with proper permissions for the container to use.

    # If not working, try to run "sudo rm -rf /tmp/.docker.xauth" first
    cd ./src/beaverbot_dockerfiles/
    chmod +x ./install/xauth.sh && ./install/xauth.sh

    For Windows:

    # Install VcXsrv or Xming X server
    # Start X server with these settings:
    # - Multiple windows
    # - Display number: 0
    # - Start no client
    # - Extra settings: Disable access control
  • Install Docker (optional)

    # For Linux
    chmod +x ./src/docker_installer.sh && ./src/install_docker.sh
    
    # For Windows: Download and install Docker Desktop from https://www.docker.com/products/docker-desktop
  • Launch the environment

    Note: For Windows users, to use USB devices (GPS, IMU, LiDAR), please follow the USB Device Setup instructions at the end of this file before launching the environment.

    cd .\src\beaverbot_dockerfiles
    docker compose -f [docker-compose-file] up -d
  • Open a container in interactive mode

    cd .\src\beaverbot_dockerfiles
    docker compose -f [docker-compose-file] exec [name-of-container] bash
  • Stop containers

    docker compose -f [docker-compose-file] down
  • Commit a container to a new image

    # Do not do this if you're not familiar with Docker commit action. This changes your docker images.
    docker commit [container-id] [image-name:tag]

More other useful Docker's CLI can be found in Docker CLI cheetsheet

Starting up the system with hardwares


Start the environment

cd .\src\beaverbot_dockerfiles
docker compose -f [docker-compose-file] up -d

In terminal 1, run the below to enable sending command to robot and get the wheel encoder data

docker compose -f [docker-compose-file] exec robot_communication bash
roslaunch beaverbot_communication beaverbot_communication.launch

In terminal 2, run the below to start collect GPS and IMU sensor data

docker compose -f [docker-compose-file] exec beaverbot bash
roslaunch beaverbot_launch bringup.launch

Scenario 1: Feedforward control


In terminal 1

cd ./src/beaverbot_dockerfiles
docker compose -f [docker-compose-file] up -d 
docker compose -f [docker-compose-file] exec robot_communication bash
roslaunch beaverbot_communication beaverbot_communication.launch

In terminal 2

docker compose -f [docker-compose-file] exec beaverbot bash
rosrun beaverbot_control feedforward

Scenario 2: Feedback control with pure pursuit controller


In terminal 1

cd ./src/beaverbot_dockerfiles
docker compose -f [docker-compose-file] up -d 
docker compose -f [docker-compose-file] exec robot_communication bash
roslaunch beaverbot_communication beaverbot_communication.launch

In terminal 2

docker -f [docker-compose-file] compose exec beaverbot bash
roslaunch beaverbot_launch nav_pure_pursuit.launch

In terminal 3

docker -f [docker-compose-file] compose exec beaverbot -c "source /opt/ros/noetic/setup.bash && source /root/catkin_ws/devel/setup.bash && sleep 2 && roslaunch beaverbot_control beaverbot_control.launch"
docker exec beaverbot_nura -c "source /opt/ros/noetic/setup.bash && source /root/catkin_ws/devel/setup.bash && sleep 2 && roslaunch beaverbot_control beaverbot_control.launch"

USB Device Setup for Windows

Installation Steps


  1. Install USBIPD-WIN:
winget install --interactive --exact dorssel.usbipd-win
  1. Add USBIPD-WIN to system PATH:
$env:Path += ";C:\Program Files\usbipd-win"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User)
  1. Important: Close and reopen your terminal for PATH changes to take effect

USB Device Management


  1. List available USB devices:
# Shows device states:
# - Not shared: Device is available in Windows but not shared with WSL
# - Shared: Device is bound and ready to be attached to WSL  
# - Attached: Device is currently connected to WSL
usbipd list
  1. Run PowerShell as Administrator and bind your devices:
# This is a one-time setup for each device
# The binding persists across system restarts
usbipd bind -i [VID:PID-of-device]
  1. Check your WSL distribution and load USB drivers for kernel:
wsl --list
# Make sure 'docker-desktop' is listed in the output
wsl -d docker-desktop
modprobe ch341 
modprobe cp210x
modprobe ftdi_sio
exit
  1. Attach devices to WSL:
# This needs to be done after each:
# - System restart
# - Docker restart
# - Physical unplug/replug of device
usbipd attach --wsl docker-desktop -i [VID:PID-of-device]
  1. Verify devices are accessible in container:
docker compose -f [docker-compose-file] up -d
docker compose exec beaverbot ls -l /dev

About

ROS packages for Beaverbot

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages