-
Notifications
You must be signed in to change notification settings - Fork 14
Workshop 1 ‐ Introduction
The goal of this session is to make you familiar with the LIMO robot platform which will be used throughout all remaining practical sessions and is a key component of the assessment. This includes the robot's components and functionality, tools for remote operation, software development and simulation. You have already used the robot in your first year, but since then, our setup has changed and we hope it is much easier to use. Even, if the concepts covered here seem to be straightforward please go through all the tasks and treat them as a refresher session.
The repository is a good starting point for your code development in this module. It contains a basic setup enabling easy integration with either real or simulated robots through ROS2 and containerisation. It provides a preconfigured Development Container with ROS2 installed and a VNC-based light desktop enabling interaction through the browser with the dockerised OS. Most of the instructions in this repository are only tested in the computing labs but you should be able to replicate this setup on your computer at home and continue development from any place.
-
First, switch the lab computer on and select an operating system. We recommend Ubuntu Linux-based Pop!_OS but Windows is also fine. The containerisation is realised through Docker, and for code development and interaction with the robots, we will use Visual Studio Code (VSC). Both Docker and VSC are already installed in the labs and available through the taskbar/dock. On Windows machines, you may need to start the Docker Desktop manually. Open VSC.
-
Clone the repository to your local computer: from Explorer, click on Clone Repository and provide the URL https://github.com/LCAS/ROB2002. Then select the repository destination folder (e.g. Documents) and if prompted, open the repository in VSC and approve the trust option. The local folder structure should be the same as the GitHub repository.
-
Re-open the repository in the container. The first time it happens, this will take some time (minutes), but eventually, the build script will open automatically the browser window with the lite desktop (no-VNC). Click on "Connect" and enter the password
vscode
when prompted.
Now you are ready to work with a real robot or start the simulation.
-
Setup up the real LIMO robot by following points 1,3 and 4 of the following instructions.
-
Inspect the robot's nodes and topics by using the
ros2 node
andros2 topic
commands (in a new terminal). When you type the command without any additional arguments, you should see all available options. Display and compare the format of the following topics/odom
,/scan
,/tf
and/camera/color/image_raw
. You might want to also refer to the official node and topic tutorials. -
Now, let us use the graphical visualiser RVIZ to look at the robot and its sensor topics. Start by typing
rviz2 -d /opt/ros/lcas/src/limo_ros2/src/limo_description/rviz/model_sensors_real.rviz
which uses a pre-defined configuration file, and you should see the interface with a robot model and its sensor data displayed in the remote desktop. To get familiar with the interface, adjust the laser scan visualisation options and see how these affect the output. Try to add new visualisation for sensors not included in the provided configuration (e.g. odometry). -
Teleoperation. Leave the RVIZ running. In a new terminal start the keyboard teleoperation node
ros2 run teleop_twist_keyboard teleop_twist_keyboard
and drive the robot around using the keyboard. Have fun, but pay attention to other robots and your human fellows, though! -
Let's now send some basic robot control commands using ROS topics. The robot's speed can be controlled by the
/cmd_vel
topic. Use theros2 topic pub
functionality to send a singleTwist
message (linear and angular velocity command) as in this example:ros2 topic pub --once /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.5}}"
Now, adjust the linear components of the
Twist
message and see the resulting trajectory. -
Using your knowledge of the topic publishing, issue a series of commands that will drive the robot:
- in a circle with a radius of 1 m;
- in a 2 m square.
Use as few commands as possible.
- To start the simulator, open the terminal and execute the following commands:
ros2 launch limo_gazebosim limo_gazebo_diff.launch.py
- Inspect the simulated robot and its sensors by running
rviz2
in another terminal window with the following config filesrc/limo_gazebosim/rviz/urdf.rviz
.rviz2 -d /opt/ros/lcas/src/limo_ros2/src/limo_gazebosim/rviz/urdf.rviz
- Repeat the tasks from Section 3 which used the real robot but this time in the simulated environment.
- Try out different wheel configurations as described in Section 1.7 of the manual.
- Learn more about the nodes and topics. Whilst these concepts will be covered later in the course, this will give you a first glimpse into various ROS functionality associated with LIMO.
- Learn how to create a simple ROS2 publisher node and modify the example such that it sends a single
/cmd_vel
command to control LIMO from the script. - Explore other built-in functionalities on the real robot by following the manual (e.g. localisation, mapping or vision).