Skip to main content

Session 5

Warm-up Task: Controlling a Turtle with your Keyboard

Start a turtle using turtlesim:

ros2 run turtlesim turtlesim_node

Now we want to use the node teleop_twist_keyboard from the package teleop_twist_keyboard. Your task is: Using teleop_twist_keyboard move the turtle using your keyboard.

Launch System

TBA

Visualization tools (RVIZ and others)

For the RViz part of the session, I ended up giving a more direct, hands-on explanation of the most useful panels in RViz. The main reason is that I’m not planning to write separate session notes for that section, at least not myself. Honestly, the RViz User Guide already does an excellent job of explaining how it works, so writing additional notes for RViz would mostly be redundant.

So, if you want to go back over that part of the session, just check the RViz User Guide.

Simulator (Gazebo)

TBA

Install Gz Harmonic + Humble

sudo apt remove ignition* ros-humble-ros-ign* && sudo apt autoremove

sudo apt-get update
sudo apt-get install curl lsb-release gnupg

sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] https://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update

sudo apt-get install ros-humble-ros-gzharmonic

Source: Binary Installation on Ubuntu

WSL - Fix Slow Perfomance on NVIDIA GPUs

On the main page, in the Prerequisites & Setup, section, the course explicitly recommends using a native Ubuntu installation. Nevertheless, a significant number of participants still chose to use WSL2 despite the warning about reduced performance. I explained at a high level that WSL uses software rendering to display graphical applications running inside the WSL environment, which significantly affects Gazebo’s performance. In other cases, users may encounter a black screen or even some form of segmentation fault.

The current patch applies only to NVIDIA GPUs. This problem is a known issue, Windows 11 WSLg Gazebo Black Screen, and it is related to the Mesa driver.

You need to update your mesa driver to 25.0.+, to resolve it, you need to run the following commands:

sudo add-apt-repository ppa:kisak/turtle
sudo apt update && sudo apt dist-upgrade
sudo apt install mesa-utils

Add the following environment variables to your .bashrc:

export GALLIUM_DRIVER=d3d12
export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA

Source your .bashr or slose and open a new terminal, and check your current device:

glxinfo | grep Device:

It should print something like:

Device: D3D12 (NVIDIA GeForce RTX 4060 Laptop GPU) (0xffffffff)

Robots

During the live session, someone asked for recommendations for low-cost robots. I explained that robots are generally still expensive for students and for personal acquisition, but I presented some of the more affordable options I am familiar with.

List of robot (These are not explicit recommendations in favor of anything.)

Problems with Some Systems

External Resources - Book and more

Someone asked me whether I had any book or resource recommendations on robotics and/or ROS. I answered that I tend not to recommend any specific resource explicitly, mainly because it depends on each person’s situation and intended learning path. However, I do have a personal list of bookmarked resources that I think are worth checking out, exploring, and using to identify the sources that seem most interesting and useful to you.

Robotics - Books Bookmarks