Skip to content

westpoint-robotics/usma_turtlebot

Repository files navigation

TurtleBot3 Setup

These instructions are based on the Robotis e-Manual for the Turtlebot3. Read the Quick Start Guide to gain an overall understanding of the process. Always click the tab for the ROS Version (i.e. Noetic).

Assuming the TB3 (waffel_pi version) contains a RPi3B+, OpenCR board, LDS-01 LIDAR, and an image running Ubuntu 20.04 with ROS Noetic based on these instructions. If there is no image, see your instructor.

  1. From a WREN Linux computer (Ubuntu 20.04), ssh into the TB3 using the IP address found on the lower waffel. Username is ubuntu and password is turtlebot.

ssh [email protected]

  1. Open the .bashrc

nano .bashrc

  1. Check that your .bashrc on the RPi has these settings:

source /opt/ros/noetic/setup.bash

source ~/catkin_ws/devel/setup.bash

export ROS_MASTER_URI=http://10.X.X.X:11311 # Remote PC

export ROS_HOSTNAME=10.X.X.X # RPI3

export LDS_MODEL=LDS-01

export OPENCR_PORT=/dev/ttyACM0

export OPENCR_MODEL=waffle_noetic

export TURTLEBOT3_MODEL=waffle_pi

  1. Save the .bashrc (Ctrl-x).

  2. Re-source the .bashrc.

source .bashrc

  1. Check the settings on the remote PC (Desktop):

nano .bashrc

  1. Check that your .bashrc on the remote PC has these settings:

source /opt/ros/noetic/setup.bash

source ~/catkin_ws/devel/setup.bash

export ROS_MASTER_URI=http://10.X.X.X:11311 # Remote PC

export ROS_HOSTNAME=10.X.X.X # Remote PC

export TURTLEBOT3_MODEL=waffle_pi

  1. Save and re-source the .bashrc.

source .bashrc

  1. All of the previous commands are based on the Quick Start Guide. Always click the tab for the ROS Version (i.e. Noetic).

TurtleBot3 Bringup

Both the Remote PC (desktop or laptop) and TB3 (RPi) should be properly configured to communicate on the same ROS network over the WREN.

Follow the bringup instructions to start both the Remote PC and TB3.

If you get error messages on the RPi, re-load the firmware to the OpenCR board based on these instructions.

ssh [email protected]

cd ./opencr_update

./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr

TurtleBot3 Basic Operation

After bringup, perform teleoperation using these instructions.

TurtleBot3 Raspberry Pi Camera Module

In order to run Raspberry Pi Camera Module, raspicam_node package will be used.

  1. Access to TB3 via ssh

ssh [email protected] # Turtlebot IP

  1. Update turtlebot3 package

cd ~/catkin_ws/src/turtlebot3 && git pull

Remove broken work spaces. If you are using the following folders, do not run the command.

rm -r turtlebot3_description/ turtlebot3_teleop/ turtlebot3_navigation/ turtlebot3_slam/ turtlebot3_example/

Build.

cd ~/catkin_ws && catkin_make

  1. Install libcamera-based stack

sudo apt install libraspberrypi-bin libraspberrypi-dev

  1. Build raspicam_node

cd ~/catkin_ws/src

git clone https://github.com/UbiquityRobotics/raspicam_node.git

sudo apt-get install ros-noetic-compressed-image-transport ros-noetic-camera-info-manager ros-noetic-diagnostic-updater

cd ~/catkin_ws && catkin_make --only-pkg-with-deps raspicam_node

  1. Enable camera module

sudo nano /boot/firmware/config.txt

Add the following lines below [all]

start_x=1
gpu_mem=128

sudo usermod -a -G video $USER

sudo reboot

  1. Testing the camera node

To see if the camera connected,

vcgencmd get_camera

If the output is supported=1 detected=1, run raspicam_node package by following steps

On your PC: roscore

On the TB3: roslaunch raspicam_node camerav2_1280x960.launch

On your PC: rqt_image_view

At the top of the image viewer, select the raspicam_node topic.

Releases

No releases published

Packages

No packages published