A repository for the collaboration of group 13 in completing workshop tasks for the Autonomous Mobile Robotics module of the University of Lincoln's Computer Science BSc course.
https://discordapp.com/invite/dk8Eht
- Install the prerequesite packages from LCAS in Ubuntu 16.04 by following the steps at https://github.com/LCAS/rosdistro/wiki#using-the-l-cas-repository-if-you-just-want-to-use-our-software.
- Run
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ros-kinetic-uol-cmp3103m
to ensure that packages are up-to-date, and that the correct course specific packages are installed. - Create a catkin workspace with the following commands:
mkdir -p ~/workspace/src
cd ~/workspace/src
catkin_init_workspace
cd ..
catkin_make
- Setup environment variables for your terminal (do this for each new terminal that you want to use to interact with the robot simulation) with
source ~/workspace/devel/setup.bash
- Launch the simulation of the turtlebot, including
roscore
andgazebo
with the commandroslaunch turtlebot_gazebo turtlebot_world.launch world_file:=$(rospack find turtlebot_gazebo)/worlds/empty.world
. - To interact with the simulation via
rviz
, runroslaunch turtlebot_rviz_launchers view_robot.launch
. - Open a new terminal and repeat step 4 before running any Python scripts, either directly with
python <name of python file>
, or via an IDE such as Spyder e.g.spyder <name of python file>
.
- Download
ros-network.sh
andrpi.ovpn
from this repository. These files have been edited to match the ip address of our robot. The rpi.ovpn file was previously available from the web server hosted on the raspberry pi, but required modification to match the ip address of the robot. - Connect to the web server hosted on the raspberry pi in browser. The ip address is http://10.82.0.103/. From here, go into the tmule control and start the turtlebot and roscore services. If the later steps don't work, click the check button to ensure that they're running properly.
- Run the vpn client:
sudo openvpn <filepath>/rpi.ovpn
. This vpn must be kept running. The pc is now connected to the robot via a vpn. The robot has the address 192.168.2.1. - For ros commands to be run on the robot, not the local pc, a few environment variables have to be set so ros knows where to run these commands. This is the purpose of ros-network.sh. It's a bash script that will set these environment variables up. In each terminal that we want to use to run commands on the robot, we need to source those environment variables using the script:
source ~/ros-network.sh 192.168.2.1
. - You can verify that this has worked successfully by running
rostopic list
.roslaunch turtlebot_rviz_launchers view_robot.launch
will launch rviz, which should show us the view from the kinect on the robot. - Starting spyder in this terminal should actually cause any code run through spyder to work on the robot.
sudo apt update
sudo apt upgrade
- Open environment with the map and poles:
roslaunch uol_turtlebot_simulator object-search-training.launch
- Open the correct Rviz for this environment:
roslaunch turtlebot_rviz_launchers view_robot.launch
- Keyop if must:
roslaunch kobuki_keyop keyop.launch