Skip to content

slambox-ros is a ROS package to communicate with SLAMBOX.

Notifications You must be signed in to change notification settings

j-marple-dev/slambox-ros

Repository files navigation

SLAMBOX ros driver

SLAMBOX ros driver is a ROS package to communicate with SLAMBOX.

Table of Contents

1. Getting started

1.1. Installation

1.1.1. Requirements

  • ROS noetic (Recommended)
  • SLAMBOX-SDK (v0.2.0)
  • glog (>=v0.6.0)
  • CMake (>= 3.16.3)
  • docker (Optional but highly recommended)
  • dialout group permission. Use below command to include dialout group to your linux account for UART communication.
    sudo usermod -aG dialout $USER

1.1.2. (Optional) Building the docker image

  • Our docker image includes development environment. We highly recommend docker system.
    # Clone this repository
    git clone https://github.com/j-marple-dev/slambox-ros.git --recursive
    
    # Change directory
    cd slambox-ros
    
    # Build docker image
    docker build . -t jmarpledev/slambox-ros -f docker/Dockerfile  --build-arg UID=$(id -u) --build-arg GID=$(id -u)

1.1.3. Local ROS system

Pre-requisite

# Assuming that your ROS workspace is ~/catkin_ws
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/j-marple-dev/slambox-ros.git --recursive
cd ../
catkin build slambox_ros
# Choose the shell which you are using
source devel/setup.{bash|zsh}

1.2. Configuration

1.2.1. Client configuration

serial_communication:
  enabled: true
  port_name: "/dev/ttyUSB0"
  baudrate: 921600

ethernet_communication:
  enabled: false
  server_addr: "192.168.101.101"
  port: 21580

publish:
  odom_topic: "/SLAMBOX/odom"
  pointcloud_topic: "/SLAMBOX/pointcloud"

subscribe:
  request_topic: "/SLAMBOX/request"

1.3. Usage

1.3.1. Local ROS system

  • Running ROS node

    roslaunch slambox_ros slambox_ros_client.launch
  • Check rostopic in another shell

    rostopic hz /SLAMBOX/odom /SLAMBOX/pointcloud

1.3.2. Running on Docker image

  • Run docker container for running SLAMBOX-ROS client

    docker run -ti --privileged -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev -v $PWD:/home/user/catkin_ws/src/slambox-ros --network host jmarpledev/slambox-ros /usr/bin/zsh
  • Run docker container for running SLAMBOX-ROS client with rviz visualization

    docker run -ti --privileged -e TERM=xterm-256color -e DISPLAY=:0 -v /dev:/dev -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $PWD:/home/user/catkin_ws/src/slambox-ros --network host jmarpledev/slambox-ros /usr/bin/bash -lic "roslaunch slambox_ros slambox_ros_client.launch rviz:=true"
  • Run docker container with shell (For development environment)

    docker run -ti --privileged -e DISPLAY=:0 -e TERM=xterm-256color -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v /dev:/dev -v $PWD:/home/user/catkin_ws/src/slambox-ros --network host jmarpledev/slambox-ros /usr/bin/zsh

2. Getting help

Please visit https://sbox.jmarple.ai for more information.

3. Contributing

  • For those who wish to contribute to this proejct please refer to the CONTRIBUING.md.

4. External resources

  • glog - Google Logging Library
  • fmt Modern formatting library
  • cli - C++ CLI Library
  • ducker - Docker Helper CLI application