Code Monkey home page Code Monkey logo

skalman's Introduction

skalman

Setup:

Setup the Raspbian RPI (wifi hotspot, video streaming):


Setup the Ubuntu RPI (for reading the LiDAR, communicating with the laptop and communicating with the OpenCR):

  • Install Ubuntu Mate:

  • Install ROS:

    • $ sudo apt-get update
    • $ sudo apt-get upgrade
  • Setup and test the LiDAR:

    • $ sudo apt-get install ros-kinetic-hls-lfcd-lds-driver
    • Make sure that your username is in the dialout group in /etc/group (otherwise you won't have permission to open /dev/ttyUSB0):
      • $ sudo nano /etc/group
      • In my case (my username is 'pi'), I hade to change the line "dialout:x:20:" to "dialout:x:20:pi"
      • Restart the computer ($ sudo reboot)
    • $ roslaunch hls_lfcd_lds_driver hlds_laser.launch (the LiDAR should now start turning and publish messages to /scan, check this with the command $ rostopic echo /scan)
  • Install the needed packages for communicating with the OpenCR etc:

    • $ sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation
    • $ cd ~/catkin_ws/src
    • $ cd ~/catkin_ws
    • $ catkin_make
  • Allow access to the OpenCR USB port without acquiring root permission:

    • rosrun turtlebot3_bringup create_udev_rules
  • Enable SSH:

    • $ sudo apt-get install raspi-config rpi-update
    • $ sudo raspi-config
    • Select "Interfacing Options"
    • Select "SSH", select "Yes"
    • Reboot to confirm the changes
  • Make it connect to the WiFi network of the Raspian RPI on boot:

    • Press on the WiFi symbol and select "Edit Connections"
    • Select the RPI network and click Edit
    • Below "General", make sure that "Automatically connect to this network when it is available" is selected
    • Edit any other networks you previously have connected to and make sure that "Automatically connect to this network when it is available" is NOT selected
  • Get its IP address:

    • Make sure it is connected to the Raspbian RPI wifi
    • $ ifconfig
    • The IP address is found as "inet addr" below "wlan0". In my case I got: 172.24.1.57

Setup the laptop:

  • Install ROS:

    • TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO! TODO!
  • Create a catkin workspace in skalman/laptop:

    • $ cd ~/skalman/laptop
    • $ mkdir catkin_ws
    • $ cd catkin_ws
    • $ mkdir src
    • $ catkin_make
    • $ sudo nano ~/.bashrc
    • Add the below line to the bottom of this file (Ctrl+Shift+v to paste the line, Ctrl+x - y - Enter to save the file)
source ~/skalman/laptop/catkin_ws/devel/setup.bash
    • $ source ~/.bashrc
  • Install all dependent packages for TurtleBot3 control:

    • $ sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation
    • $ cd ~/skalman/laptop/catkin_ws/src/
    • $ cd ~/skalman/laptop/catkin_ws
    • $ catkin_make
  • Install the image_transport package:

    • $ sudo apt-get install ros-kinetic-image-transport-plugins
  • Install the aprilTags package:

    • $ cd ~/skalman/laptop/catkin_ws/src
    • $ cd ~/skalman/laptop/catkin_ws
    • $ catkin_make
  • Get its IP address:

    • Make sure it is connected to the Raspbian RPI wifi
    • $ ifconfig
    • The IP address is found as "inet addr" below "wlan0". In my case I got: 172.24.1.72

Setup the ROS IP addresses:

  • In my case, the laptop has IP address 172.24.1.72 and the Ubuntu RPI has IP address 172.24.1.57

  • On the laptop (master):

    • $ sudo nano ~/.bashrc
    • Add the following two lines to the bottom of the file: "export ROS_MASTER_URI=http://172.24.1.72:11311" and "export ROS_HOSTNAME=172.24.1.72"
    • $ source ~/.bashrc
  • On the Ubuntu RPI (slave):

    • $ sudo nano ~/.bashrc
    • Add the following two lines to the bottom of the file: "export ROS_MASTER_URI=http://172.24.1.72:11311" and "export ROS_HOSTNAME=172.24.1.57"
    • $ source ~/.bashrc

Usage (OLD):

  • Power on the Raspbian RPI and wait for a few seconds (for the wifi hotspot to start)

  • Connect the laptop to the Raspbian RPI wifi

  • Connect the battery and power on the OpenCR (this will power on the Ubuntu RPI)

  • SSH into the Ubuntu RPI:

  • SSH into the Raspbian RPI:

  • [laptop] $ roscore

    • (ALT 1) Launch publishers for all sensors (INCLUDING THE LIDAR) and subscribers for steering commands:
      • [Ubuntu RPI] $ roslaunch turtlebot3_bringup turtlebot3_robot.launch
    • (ALT 2) Launch publishers for all sensors except the LIDAR and subscribers for steering commands:
      • [Ubuntu RPI] $ roslaunch turtlebot3_bringup turtlebot3_core.launch
  • Launch keyboard teleoperation:

    • [laptop] $ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
  • Start video streaming on the Raspbian RPI:

    • [Raspbian RPI] $ sh start_video_stream.sh
  • Launch the webpage:

    • (Make sure that the laptop is connected to the Raspian RPI wifi)
    • (Make sure that the Raspbian RPI is streaming video)
    • [laptop] python ~/skalman/laptop/webpage/app.py

Usage:

  • Power on the Raspbian RPI and wait for a few seconds for the wifi hotspot to start

  • Connect the laptop to the Raspbian RPI wifi (RPI_Summer17)

  • Connect the battery and power on the OpenCR (this will power on the Ubuntu RPI)

  • SSH into the Raspbian RPI:

  • [Raspbian RPI] $ sh start_video_stream.sh

  • [laptop] $ roslaunch skalman laptop.launch

  • SSH into the Ubuntu RPI:

  • [Ubuntu RPI] $ roslaunch skalman ubuntu_rpi.launch

  • Go to http://172.24.1.72:5000/ (manually steer using WASD on the laptop, or using the arrows on a smartphone)

skalman's People

Contributors

fregu856 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.