Skip to content
Marc Hanheide edited this page Feb 23, 2022 · 26 revisions

Some general recommendations and rules for the workshop engagement

  1. Be active, seek support: both within your team of peers and the delivery team. We are here to help you. If you don't ask, we don't know what you may be struggling with! Use the helpdesk pro-actively!
  2. Keep notes and code: Everything that you got working, you want to make sure you can find again. Keep a log of the command lines that you use regularly, put them in a text file that you store online and have always at hand, etc. Best practice is to keep all your code at the end of the session in a code repository (GitHub, GitLab, bitbucket, you name it) so that you can just check it out at another location/PC or even at home at any time needed. You will find that we share all relevant code fragments also on GitHub with you (https://github.com/LCAS/teaching/tree/lcas_melodic/cmp3103m-code-fragments/scripts). If you just want to keep some notes and code fragments yourself, https://gist.github.com/ is a good place, for instance. Be an actual computer scientist/software developer and never put code or command line notes in Word or Google Docs etc! Simply, don't!
  3. If things are not working immediately, don't give up: Seek help, and once it works, make sure you make a note of what you did to make it work. There are no stupid questions! But asking the same thing again and again because you didn't write it down is a bit stupid ;-)
  4. Google yourself: We are working with Python in ROS. This is probably the most widely used combination for doing robotics these days. There is a huge community out there that have answered most questions already. As level 3 students you are expected to be able to solve problems and seek solutions yourself. You will always find us very willing to help you, but isn't it much more rewarding to find a solution yourself?

This week: Getting to know your simulation

This week, we'll look at simulation and setting up our computers and working environments. You should

  1. boot into Linux (we are using Ubuntu Linux 18.04LTS this year! On the lab PCs, start the computer and press [F12] until you can select "Ubuntu" to boot into)

  2. Open a terminal, you'll mostly be using commands in the terminal. Hints:

    • [Ctrl-C] will stop a currently running command
    • [Tab] is very useful to auto-complete a command
    • [Up] and [Down] allow you to browse the history of previously typed commands
  3. Due to a setup problem in the current school's Ubuntu image, the graphics are a bit poor (problem with the NVIDIA drivers in the lab we are using), and also you need to run one additional command to ensure the correct Python version is used. Please run conda config --set auto_activate_base false in the terminal

  4. make sure all the software is installed according to Robotics Computer Setup, NOTE: The Lab computers are installed with the correct software repositories enabled, but your specific computer may be missing the correct packages or they may be outdated. You should definitely run the command

    sudo apt update && sudo apt upgrade && sudo apt install ros-melodic-uol-cmp3103m
    

    in your terminal after you logged in every time you use a computer to ensure you have the most recent version. It is recommended you then close the terminal and open a new one to also make sure all environment variables are correctly set.

    • If this fails with an error like ... but it is not going to be installed, you have some conflicting packages installed. Issue the command sudo apt-get purge "*gazebo*" to get rid of them and run sudo apt-get install ros-melodic-uol-cmp3103m again
    • As this computers may be updated between workshops, make sure you run the above command at the beginning of every workshop session.
  5. (for Linux newbies:) get used to work with the terminal in Linux: a good starting point is the official tutorial for beginners. Please skip the bit about adding a new user.

  6. Try our simulation following this first turtlebot tutorial. Get some very basic ROS commands going: read tutorials 1-6 ("1.1 Beginner Level") from the official ROS tutorials are a good starting point. (BTW, You are using ROS melodic). First, focus on tutorial 5 and 6 (rosnode and rostopic commands)

  7. find out about two ROS commands, namely rostopic and rosnode. Find out what topics exist when you have the simulation up and running, and also how many ROS components are running on your system

  8. What do you think about how you could read the odometry from your robot? Find a way to print the odometry of the simulated robot on the screen when moving it around.

Main Learning Objectives for today

  • Have the simulation up and running, and being able to interact with it.
  • Understand the command line tools rostopic and rosnode to
    • list all "topics"
    • list all "nodes"
    • display the robot's "odometry"

Additional Tasks

  1. Optional: How do you think you could command the robot to move using the topics.
  2. Optional: Generate a maze and navigate to the green square with the keyboard tele-operation.
  3. Optional: run rviz and explore the different visualisation widgets (e.g. try to display the robot camera stream and the Laser scanner data)
  4. Optional: familiarise yourself with the programming environment Microsoft Visual Studio Code (VSCode), which we recommend for programming in ROS and Python. You can launch it either using the command code on the command line, or from the "start" menu. You are free to use another favourite IDE, e.g. Spyder, if you prefer, but you must always make sure to use Python 2.7 (not 3.x) when running code (for now, Python 2.x is being phased out).
  5. Optional: Explore the module's GitHub repository to better understand the structure of the implementation. Focus on the uol_turtlebot_simulator package.

Clone this wiki locally