Host machine requirements: setting up docker and (optional) nvidia-docker

  1. Install Docker CE, see installation instructions.
  • Also perform the post installation instructions, so that docker can be run without requiring root privileges by a non-root user. (this is optional, otherwise, scripts must be run as root)
  1. (optional) If you have an NVIDIA graphic card, install the latest drivers.
  • Recommended method:

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt update
    

    Then, on Ubuntu from the menu / Dash, click on the "Additional Drivers" and on the tab with the same name, select the driver you want to use, and "Apply changes". Wait until the driver is downloaded and installed, and reboot.

  1. (optional) If you have an NVIDIA graphic card and Ubuntu 16.04, install nvidia-docker 1.0. See installation instructions. If you are on Ubuntu 14.04, you can install nvidia-docker following the instructions here, see "Ubuntu distributions" instructions.
  • Also install nvidia-modprobe by running sudo apt-get install nvidia-modprobe, a reboot may be required.

Building this docker image

  1. mkdir ~/Projects
  2. cd ~/Projects
  3. git clone https://github.com/eaa3/turtle2i_docker
  4. cd turtle2i_docker
  5. docker build . -t turtle

Setting up turtle2i packages

Outside docker (in the host machine), follow the steps:

  1. ./fetch_packages.sh

Building turtle2i packages

  1. Quick script to build packages: ./build_turtle.sh turtle

(Manual option) You must run the following commands inside the docker container with the pre-installed dependencies. To start the docker container you can run:

  1. cd ~/Projects/turtle2i_docker
  2. Run the container: ./bash.sh turtle
  3. Setup ROS: source /opt/ros/kinetic/setup.bash
  4. catkin_make
  5. Source the catkin workspace: source devel/setup.bash

(Step 1 will create a container, open a bash terminal with all required setup, including mapping turtlebot2i folder and the needed visualisation configuration inside the docker)

Ps.: You can open other terminals inside the same container by running the script inside turtle2i_docker ./exec_container $(./get_containerId.sh) on a separate terminal.

Example usage

After building successfully. Run the following command in a terminal inside the turtle docker container:

  1. Run the container: ./bash.sh turtle

  2. roslaunch turtlebot2i_gazebo turtlebot_world.launch

(don't forget to source devel/setup.bash beforehand in every terminal you open inside the turtle docker container)

Manually Command the Arm (in a separate terminal inside the same docker container):

  1. Example 1: rostopic pub -1 /turtlebot/arm_shoulder_pan_position_controller/command std_msgs/Float64 "data: 0.4"

  2. Example 2: rostopic pub -1 /turtlebot/arm_elbow_flex_position_controller/command std_msgs/Float64 "data: 1.4"

The arm should move around in simulation.