Skip to content

Turtlebot2 Build

Andy Edmonds edited this page Oct 29, 2018 · 8 revisions

Here we've documented how to get a Raspberry PI (RPI, 3B+) up and running with a Turtlebot 2

Hardware

We use the following components:

Powering RPI 3B+

Installing the base

There are a number of images out there that already have ROS baked in. We decided to go with these but some of them do not work with the RPI 3B+

We also tried images that did not have ROS installed.

Basic System Software Setup

Once the image was installed the following commands were issued: * run rpi-update * run apt-get update && apt-get -y upgrade

Then the RPI hardware was customised with raspi-config

  • enable camera
  • enable ssh
  • disable desktop environment once all config is done
  • memory split - 32 or 64M

As the RPI has limited memory we then disabled a set of running services that were not needed:

  • sudo systemctl disable magni-base.service
  • sudo systemctl disable roscore.service
  • sudo systemctl disable pifi.service
  • sudo systemctl disable sshguard.service
  • sudo systemctl disable nginx.service
  • sudo systemctl disable triggerhappy.service
  • sudo systemctl disable cups.socket
  • sudo systemctl disable cups.service
  • sudo systemctl disable cups-browsed.service

Additional ROS Installs

There were a set of additional ROS packages that needed to be installed:

sudo apt-get install ros-kinetic-turtlebot ros-kinetic-turtlebot-apps ros-kinetic-turtlebot-interactions ros-kinetic-turtlebot-simulator ros-kinetic-kobuki-ftdi ros-kinetic-ar-track-alvar-msgs ros-kinetic-kobuki* ros-kinetic-turtlebot ros-kinetic-turtlebot-apps ros-kinetic-turtlebot-interactions ros-kinetic-turtlebot-simulator ros-kinetic-kobuki-ftdi ros-kinetic-rocon-remocon ros-kinetic-rocon-qt-library ros-kinetic-ar-track-alvar-msgs ros-kinetic-kobuki-core ros-kinetic-openni-*

ROS Packages Dependencies

Once all the basics were complete the following ROS specific install steps were carried out

mkdir catkin_ws
git clone https://github.com/robopeak/rplidar_ros.git ~/catkin_ws/src/icclab_turtlebot/rplidar_ros
git clone https://github.com/icclab/icclab_turtlebot.git -b kinetic ~/catkin_ws/src/icclab_turtlebot
cd ~/catkin_ws && catkin_make

Validation tests

Below are the set of tests that were run in order to ensure that the install was ok:

  • RPI camera is ok
    • raspistill -o image.jpg
  • mobile_base is ok - tested - note errors below
    • roslaunch turtlebot_bringup minimal.launch
    • roslaunch turtlebot_teleop keyboard_teleop.launch
  • kinect is ok - tested via
    • roslaunch turtlebot_bringup 3dsensor.launch
  • map acquisition is ok
    • roslaunch turtlebot_rviz_launchers view_navigation.launch
  • map saving is ok
    • rosrun map_server map_saver -f ~/map1
  • Auto-nav is ok
    • roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml
    • roslaunch turtlebot_rviz_launchers view_navigation.launch --screen
  • Battery status is not working
    • rostopic echo /laptop_charge
  • rplidar
  • icclab_turtlebot2
    • on bot: roslaunch icclab_turtlebot minimal_with_rplidar.launch
      • was errors with zeroconf - disable it
    • on iva: roslaunch icclab_turtlebot amcl_icclab.launch map_file:=/home/ubuntu/catkin_ws/src/icclab_turtlebot/icclab_latest_map.yaml initial_pose_x:=1.395 initial_pose_y:=5.806 initial_pose_a:=-2.506
      • You can also use the default package: roslaunch turtlebot_navigation amcl_demo.launch map_file:=/home/ubuntu/catkin_ws/src/icclab_turtlebot/icclab_latest_map.yaml initial_pose_x:=1.395 initial_pose_y:=5.806 Ainitial_pose_a:=-2.506
    • on laptop: roslaunch turtlebot_rviz_launchers view_navigation.launch —screen
      • Note: this works best on a linux workstation/laptop. Working on Mac is a difficult task (ROS is not well supported there).

Base Errors

These are (safely?) ignored

* [ERROR] [1539603755.712074911]: Kobuki : Timed out while waiting for serial data stream [/mobile_base].
* [ERROR] [1539603764.023063942]: Kobuki : malformed sub-payload detected. [91][170][5B AA 55 4D 01 0F 8C B7 00 00 00 7E 04 FE 03 00 ]
* [ERROR] [1539603767.458549610]: Kobuki : malformed sub-payload detected. [18][170][12 AA 55 4D 01 0F FC C4 00 00 00 7E 04 ]
* [ERROR] [1539603803.859147488]: Kobuki : malformed sub-payload detected. [231][170][E7 AA 55 4D 01 0F 68 53 00 00 00 7E 04 FE 03 00 ]

Clone this wiki locally