Author Archives: Salvatore


About Salvatore

Robotics/AI Engineer

Saru48W+ Mechanical Keyboard

Saru48W+ Mechanical Keyboard

License: GPLv3

tags: ZMK

Status: Currently under development.

An ortholinear 13x4 hand-wired custom Mechanical Keyboard based on the nice!nano.

My third keyboard designed from scratch, this time with Bluetooth connectivity.

Components

  • 1x nice!nano (ZMK), USB-C and Bluetooth
  • 1x 3.7V 503040 600mAh LiPo battery
  • 48x switches
  • 1x EC11 encoder
  • 30x M2 5~6mm screws
  • 6x M2 nuts
  • 12x M2 10mm stand-offs
  • 2x M4 Low profile brass heat inserts
  • 2x M4 6~8mm Socket cap head screws
  • 1x micro switch (power)
  • 1x micro push button (bootsel, reset)
  • 3D printed case, plate, feet

Story

I wanted a more compact portable keyboard with Bluetooth connectivity and an encoder.
Different MCU, different firmware.

Keymap (dev)

Keymap

Repository

https://github.com/slabua/keyboards/tree/main/saru48wplus

3D Model

3D model of Saru48W+ rev1 also available on:
Onshape: [Link] (Coming Soon)
Thingiverse: https://www.thingiverse.com/thing:6428317
Printables: https://www.printables.com/model/717305-saru48w-rev1

Some photographs [More]

image

Build process [More]

image

CAD renders [More]

image


JeegVa44 ErgoZero Split Mechanical Keyboard

JeegVa44 ErgoZero Split Mechanical Keyboard

License: GPLv3

tags: Raspberry Pi RaspberryPi Raspberry Pi Pico RaspberryPiPico MicroPython

Status: COMPLETED.

A split hand-wired custom Mechanical Keyboard based on the Waveshare RP2040-Zero.

My second keyboard designed from scratch, this time split.

Components

  • 2x RP2040 (KMK on Waveshare RP2040-Zero), USB-C port
  • 44x switches
  • 2x TRRS breakout boards
  • 1x TRRS cable
  • 28x M2 5mm screws
  • 14x M2 10mm stand-offs
  • 4x M4 Low profile brass heat inserts
  • 4x M4 6~8mm Socket cap head screws
  • 8x 10mm Rubber feet
  • 46u Round hole female pin header
  • 3D printed case, plate, feet

Story

I wanted a portable split keyboard with a gentle vertical stagger, sixth column available and four thumb keys.
I also wanted to learn more about proper CAD design, so this time I ditched Blender and I designed everything from scratch in Onshape.

Keymap (dev)

Keymap

Repository

https://github.com/slabua/keyboards/tree/main/jeegva44ergozero

3D Model

3D model of JeegVa44 ErgoZero rev1 also available on:
Onshape: [Link]
Thingiverse: https://www.thingiverse.com/thing:5866262
Printables: https://www.printables.com/model/404303-jeegva44-ergozero-rev1

Some photographs and renders


Small Form Factor RP2040 Boards

Small Form Factor RP2040 Boards

tags: Raspberry Pi RaspberryPi Raspberry Pi Pico RaspberryPiPico RP2040 MicroPython CircuitPython Arduino C/C++ Pimoroni Tiny2040 Tiny 2040 Seeed Seeed Studio XIAO XIAO RP2040 Waveshare RP2040-Zero

Introduction

Given the great potential of the RP2040 chip announced on the 21st of January 2021 as the first microcontroller designed by Raspberry Pi Ltd, more and more boards from different manufacturers have been populating the shelves of enthusiast makers.

About this article

This article will be covering the general characteristics of the RP2040 chip, and introduce three popular small form factor boards that I have been considering for some of my projects to come.

Front

Back


The RP2040 Microcontroller

At the very core of the aforementioned boards there is the RP2040 chip.

Here follows a list of its major characteristics:

Component Description
CPU: Dual ARM Cortex-M0+ @ 133 MHz
Memory: 264kB on-chip SRAM in six independent banks
Storage: Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus
Architecture: DMA controller
Fully connected AHB crossbar
Interpolator and integer divider peripherals
On-chip programmable LDO to generate core voltage
2 × on-chip PLLs to generate USB and core clocks
Interfacing: 30 × GPIO pins, 4 of which can be used as analogue inputs
Peripherals: 2 × UARTs
2 × SPI controllers
2 × I2C controllers
16 × PWM channels
1 × USB 1.1 controller and PHY, with host and device support
8 × PIO state machines
Package: 7 × 7 mm QFN-56 package

Other notable properties include:

  • Supported input power 1.8–5.5V DC
  • Operating temperature -40°C to +85°C
  • Drag-and-drop programming using mass storage over USB
  • Low-power sleep and dormant modes
  • Accurate on-chip clock
  • Temperature sensor
  • Accelerated integer and floating-point libraries on-chip

RP2040 Pinout

Resources

https://www.raspberrypi.com/products/rp2040/specifications/
https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html
https://datasheets.raspberrypi.com/rp2040/rp2040-product-brief.pdf
https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf

^Top


Boards

Since all of the following boards use the same RP2040 microcontroller chip, only the relevant features that have been updated by the respective manufacturers in comparison with the original Raspberry Pi Pico will be listed.

※ Describing the Raspberry Pi Pico is beyond the scope of this article.

Pimoroni Tiny 2040

Overview

Features

Component Description
Board form factor: 16 + 3 pins
Storage: 2MB or 8MB of QSPI flash supporting XiP
Interfacing: 12 × GPIO pins
4 × 12-bit ADC channels
12 × PWM
Peripherals: 2 × I2C
2 × UART
1 × SPI
SWC/SWD pins
Power, programming, data transfer: USB Type-C interface
Castellated pads allows direct soldering onto a PCB
LED: 1 × user controllable RGB LED
Buttons: 1 × BOOT button (doubles up as user input button)
1 × RESET button
Software compatibility: Micropython ・ CircuitPython ・ C/C++ ・ Arduino
Dimensions: 21.3 x 18 mm
approx 22.9 x 18.2 x 6 mm (including the USB-C port)

What makes it stand out

  • 8MB of QSPI flash supporting XiP variant available
  • User input button (doubles up as DFU select on boot)

Resources

Product page: https://shop.pimoroni.com/products/tiny-2040?variant=39560012234835

^Top

Seeed Studio XIAO RP2040

Overview

Features

Component Description
Board form factor: 14 pins
Storage: 2MB of on-board Flash memory
Interfacing: 11 × GPIO pins
4 × 12-bit ADC channels
11 × PWM
Peripherals: 1 × I2C
1 × UART
1 × SPI
1 × SWD Bonding pad
Power & Downloading interface: USB Type-C interface
Castellated pads allows direct soldering onto a PCB
LEDs: 1 × user LED
1 × user WS2812 RGB LED
1 × power LED
2 × LEDs for serial port downloading
Buttons: 1 × BOOT button
1 × RESET button
Power Pads: For the battery power supply
Software compatibility: Micropython ・ CircuitPython ・ C/C++ ・ Arduino
Cover: Cover for protecting the circuit
Dimensions: 20 x 17.5 x 3.5 mm

What makes it stand out

  • No components on the back for seamless SMD integration via castellated pads
  • Small size of 20 x 17.5 x 3.5 mm for wearable devices and small projects
  • 2 × user controllable RGB LEDs

Resources

Product page: https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html
Wiki: https://wiki.seeedstudio.com/XIAO-RP2040/

^Top

Waveshare RP2040-Zero

Overview

Features

Component Description
Board form factor: 18 + 5 pins + 10 solder points
Storage: 2MB of on-board NOR-Flash memory
Interfacing: 29 × GPIO pins (9 of which via solder points)
4 × 12-bit ADC channels
16 × PWM
Peripherals: 2 × I2C
2 × UART
2 × SPI
8 × PIO state machines
Power, programming, data transfer: USB Type-C interface
Castellated pads allows direct soldering onto a PCB
LED: 1 × user controllable WS2812 RGB LED
Buttons: 1 × BOOT button (doubles up as input button)
1 × RESET button
Software compatibility: Micropython ・ CircuitPython ・ C/C++ ・ Arduino
Dimensions: 23.5 x 18 mm

What makes it stand out

  • 29 × multi-function GPIO pins
  • Full peripherals range support

Resources

Product page: https://www.waveshare.com/product/raspberry-pi/boards-kits/raspberry-pi-pico-cat/rp2040-zero.htm
Wiki: https://www.waveshare.com/wiki/RP2040-Zero

^Top


Comparison

~

Board Form Factor

  • All of the three boards are contained in a small package that can be easily fit on wearable or space constrained devices, with the smallest of them being the Seeed XIAO RP2040 and the largest being the Waveshare RP2040-Zero.

Storage

  • Other than the standard 2MB on-board flash memory, the Pimoroni Tiny 2040 is also available for purchase in the 8MB variant.

GPIO and Peripherals Interfaces

  • An impressive amount of GPIO pinout has been squeezed onto the Waveshare RP2040-Zero for a total of 29 GPIO and full peripheral support, costing only a marginal increase in form factor size.
  • The Pimoroni Tiny 2040 loses only one of the two SPI peripheral interfaces, although the number or GPIO pins is more than halved down to 12.
  • The board with least amount of available GPIO pins is, understandably, the Seeed XIAO RP2040 with only 11 GPIO pins available, keeping only one interface for each type of supported peripheral.
  • Despite the above differences, each board provides access to all of the 4 ADC channels available on the RP2040 chip.

LED

  • RGB LEDs for visual signalling are available on each board, with the Seeed XIAO RP2040 actually sporting two user controllable RGB LEDs.

Reset Button

  • Each board also comes equipped with a reset button. In this case there is no obvious winner.

SMD Integration

  • SMD integration via castellated pads is a breeze with the Seeed XIAO RP2040 as there are completely no components on the bottom of the board.

^Top


Conclusion

Each board excels on one or more different aspects.
To wrap it up:

  • Pimoroni Tiny 2040:
    • Largest storage (in the 8MB variant)
  • Seeed Studio XIAO RP2040:
    • Smallest form factor
    • 2 × user LEDs
    • SMD friendly
  • Waveshare RP2040-Zero:
    • Most available GPIOs (29)
    • Full range of peripheral interfaces

^Top


Notes

※ The XIAO RP2040 board has been generously donated by Seeed Studio as part of their currently ongoing Free Shipping campaign in 221 countries and counting.

^Top


AtreuSLB50+ Mechanical Keyboard

AtreuSLB50+ Mechanical Keyboard

License: GPLv3

tags: Raspberry Pi RaspberryPi Raspberry Pi Pico RaspberryPiPico MicroPython

Status: COMPLETED.

A hand-wired custom Mechanical Keyboard based on the Raspberry Pi Pico.

Finally I had the time to wrap up my little side project started about three months ago, and I thought to share it here. Although inspired by the Atreus, I couldn't quite find the right compromise among the non-split ergo keyboards, so I decided to make my own.

Components

  • 1x RP2040 (KMK on Raspberry Pi Pico), USB-C port
  • 50x switches
  • 1x SSD1306 128x64px 0.96in IIC OLED display
  • 2x EC11 rotary encoders
  • 1x EVQWGD001 rotary encoder
  • 1x Pimoroni IIC trackball breakout
  • 1x Active buzzer
  • 2x micro switches (bootsel, reset)
  • 3D printed case (5-10° tilt), plate, pcb

Story

The design started from a semi-automated customised process by forking an OpenSCAD hotswap pcb generator repository, subsequently heavily worked on Blender. I had also added cutouts for per-key rgb, but in the end I gave up the idea of hand wiring the LEDs. At least in this version which, for me, has been an insightful experience.
I am slowly finalising the firmware configuration and I will eventually put it on github as usual. Wiring diagram and key layout will come along later.

Keymap

[Coming Soon]

Repository

https://github.com/slabua/keyboards/tree/main/atreuslb50+

3D Model

3D model of AtreuSLB50+ rev1 also available on:
Thingiverse: https://www.thingiverse.com/thing:5458679
Printables: https://www.printables.com/model/262446-atreuslb50-rev1

Some photographs


Pico Motorcycle Dashboard

Pico Motorcycle Dashboard

tags: Raspberry Pi RaspberryPi Raspberry Pi Pico RaspberryPiPico MicroPython

Status: Currently under development.
https://github.com/slabua/PicoMotorcycleDashboard

A Motorcycle Dashboard based on the Raspberry Pi Pico and the Pimoroni Pico Display Pack.

Components

  • Raspberry Pi Pico
    • Main control board
  • Pico Display Pack
    • Input:
    • Button A
    • Button B
    • Button X
    • Button Y
    • Output:
    • 240x135 px IPS display
    • RGB LED
  • Sensors
    • Built-in temperature sensor
    • (internal ADC on pin 4)
    • DS18B20 Temperature sensor
    • (currently up to 3 in parallel)
  • Work in progress
    • Connection for Battery/Fuel/Rpm readings

Wiring Diagram

Breadboard - Full diagram

Breadboard

Breadboard - Display directly mounted on the back of the Pico (not shown)

Breadboard


Usage

Screens

Home

Home

  • A: Go to next (Battery) screen
    • If pressed again within 3 seconds,
      cycle through all the screens
  • B: Cycle Brightness presets
  • X: Select Multiple or Single Temperature mode
  • Y: If Multiple (*) or Single (**) Temperature mode:
    • Cycle Temperature sources (**)
    • Cycle bars style (*) (globally)
  • X+B: Cycle Colour palette
  • Y+B: Show Info scroll banner (hold)

Battery

Battery

  • A: Go to Home screen
  • B: Cycle Brightness presets
  • X: Continuous / Discrete battery representation
  • Y: Cycle Graphics style
  • Y+B: Show Info scroll banner (hold)

Fuel

Fuel

  • A: Go to Home screen
  • B: Cycle Brightness presets
  • X: -
  • Y: Cycle Bars style (globally)
  • Y+B: Show Info scroll banner (hold)

Temperature

Temperature

  • A: Go to Home screen
  • B: Cycle Brightness presets
  • X: Cycle Temperature sources
  • Y: Clear history for the current temperature source
  • Y+B: Show Info scroll banner (hold)

RPM

RPM

  • A: Go to Home screen
  • B: Cycle Brightness presets
  • X: Cycle Ramp style
  • Y: Cycle Bars style (globally)
  • Y+B: Show Info scroll banner (hold)

Stats

Stats

  • A: Go to Home screen
  • B: Cycle Brightness presets
  • X: Update Configuration file
  • Y: Reset uptime
  • X+B: Reset Configuration file
  • Y+B: Show Info scroll banner (hold)

A Practical Introduction to the Raspberry Pi Pico

A Practical Introduction to the Raspberry Pi Pico

tags: Raspberry Pi RaspberryPi Raspberry Pi Pico RaspberryPiPico MicroPython

Introduction

My name is Salvatore and I am a Development Engineer at 株式会社Rist.

  • Robotics team, responsible for Robotics R&D.
  • Robot design, control, motion, perception and manipulation.
  • Image analysis, recognition and classification.
  • AI algorithms design and implementation.
  • UI/UX design and implementation.

About this article

This article aims to give a quick introduction to the Raspberry Pi Pico, through simple step-by-step instructions to its setup and providing some code examples in MicroPython.

※ No soldering nor external components are required to follow this tutorial~

What is the Raspberry Pi Pico

The Raspberry Pi Pico is a microcontroller able to acquire various inputs and provide outputs through a series of GPIO pins, similar to a Raspberry Pi computer [1][2].
Microcontrollers are most suitable for embedded applications or any other situations in which the use of a full computer running an Operating System would be considered not necessary.

Environment Setup

~

User group

In order to have read/write permission to the serial port created upon connecting the Pico, the current user must belong to the dialout group.
Verify the current groups the user belongs to with:

$ groups

If the user does not belong to the dialout group, add it as follows:

# usermod -a -G dialout $USER

To make the changes effective, relog the current user to the system.

※ A reboot might be needed after performing the operation, in the case which a simple relog would not be sufficient.

Thonny and MicroPython

Proceed with the installation of the Thonny Python IDE [3]:
As of writing this article, the easiest way to get the most updated version of the IDE on a variety of linux distributions is through pip.

$ pip install thonny

※ For more information and other platforms support, visit thonny.org.

Once installed, the Thonny IDE would look similar to:

In order to control the Pico, it is necessary to switch the Python interpreter to MicroPython (Raspberry Pi Pico).

Click on the bottom right corner to switch the interpreter:
Python 3.7.9 > Configure interpreter...
Then select MicroPython (Raspberry Pi Pico) from the combo box list.

Or alternatively, from the Thonny menu, select:
Run > Select interpreter... > Interpreter > MicroPython (Raspberry Pi Pico)

Connecting the Pico to the PC

As the Pico comes out of the box, it needs to be initialised by installing the MicroPython firmware.
This can be done easily from the Thonny IDE itself.

To connect the Pico to the computer:

  1. Press and hold the BOOTSEL button on the Pico
  2. Connect the Pico to the computer via micro USB
  3. Release the BOOTSEL button

The Pico is now connected as a USB mass storage device.

MicroPython firmware installation

By clicking the Stop/Restart button on the Thonny toolbar, the IDE will connect to the Pico and it will prompt for the MicroPython firmware installation.

Proceed with the installation.

At this point, the environment setup is complete.

Code

As mentioned in the introduction, for this tutorial no external component are required.
The provided sample code will make use of the on-board power LED (GPIO 25) and the embedded temperature sensor.

LED test

Let's skip the basic LED on/off/blink tests and try the PWM controlled brightness test instead.

Create a new file and paste the following code [1]:

from machine import Pin, PWM
from time import sleep

pwm = PWM(Pin(25))
pwm.freq(1000)

while True:
    for duty in range(1024, 65025, 2):
        pwm.duty_u16(duty)
        sleep(0.0001)
    for duty in range(65025, 1024, -4):
        pwm.duty_u16(duty)
        sleep(0.0005)

By running this code, the on-board LED will pulse smoothly according to the values specified in the ranges of the duty cycles and the sleep intervals.

※ The value 65025 corresponds to the LED maximum brightness.

Temperature test

For the temperature test, use the following code [4]:

import machine
from time import sleep

sensor_temp = machine.ADC(4)
conversion_factor = 3.3 / 65535

while True:
    reading = sensor_temp.read_u16() * conversion_factor
    temperature = 27 - (reading-0.706)/0.001721
    print(temperature)
    sleep(2)

The temperature measured by the sensor will be printed in the Shell standard output every 2 seconds.

Putting it together

The following code will make the on-board LED pulse with variable speed.

from machine import Pin, PWM
from time import sleep

sensor_temp = machine.ADC(4)
conversion_factor = 3.3 / 65535

pwm = machine.PWM(machine.Pin(25))
pwm.freq(1000)

while True:
    reading = sensor_temp.read_u16() * conversion_factor

    temperature = 27 - (reading-0.706)/0.001721
    print(temperature)

    if temperature < 19:  # Lower threshold
        steps = 16
    elif temperature > 23:  # Higher threshold
        steps = 64
    else:
        steps = temperature

    for duty in range(0, 65025, int(steps**2)):
        pwm.duty_u16(duty)
        sleep(0.001)
    for duty in range(65025, 0, -int(steps**3)):
        pwm.duty_u16(duty)
        sleep(0.05)

The LED will blink in three different ways, depending on the ambient temperature measured by the on-board sensor:

  • Temperature below the lower threshold:
    • The LED pulses at a slow pace
  • Temperature within the thresholds interval:
    • The LED pulses at a pace proportional to the temperature
  • Temperature above the upper threshold:
    • The LED pulses at a fast pace

Adjust the Lower and Higher thresholds to best suit the local environment temperature.

Stand-alone operation

It is time to store the program in the Pico.

File > Save as...
And select Raspberry Pi Pico from the following dialog window:

In order to make the code run upon power up, the file must be named main.py.

※ Safe operating voltages are between 1.8V and 5.5V.

Alternatives

Recently, various boards are taking advantage of the RP2040 chip to provide custom solutions. One of them is the Seeed Studio XIAO RP2040, currently available through a Free Shipping campain in 221 countries and counting.
More on this and other tiny boards soon! Please check it out if you like.

References

[G] https://github.com/slabua/RaspberryPiPico
[Q] https://qiita.com/slabua/items/ed0a49cd587d0c8103b8
[1] https://www.raspberrypi.org/documentation/pico/getting-started/
[2] https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico
[3] https://hsmag.cc/picobook
[4] https://tkrel.com/14899


Testing ROS Bridge on the TurtleBot3

ROS Bridge

~


Table of Contents

Overview

~

Introduction

My name is Salvatore and I am a Development Engineer at 株式会社Rist.

About this article

This article is meant to be a quick and direct introduction to the ROS Bridge, based on the official documentation.
This is the first article of a series related to my work at Rist.

About me

Present

Joined Rist in February 2020, currently part of the Development Team.
Responsible for Robotics R&D, and among other things, primarily working on the following topics:

  • Robot design, control, motion, perception and manipulation.
  • Image analysis, recognition and classification.
  • AI algorithms design and implementation.
  • UI/UX design and implementation.

Background

Graduated cum laude with a master's degree in Computer Science Engineering for Intelligent Systems at University of Palermo, Italy, presenting a Thesis in Robotics on a Brain-Computer Interface Framework.
Previously graduated with the grade of 110/110 in Computer Science Engineering, presenting a Thesis in Artificial Intelligence / Latent Semantic Analysis.

ROS Bridge

~

What is ROS Bridge

The ROS Bridge is a ROS 2 package that makes possible to seamlessly exchange messages between ROS 1 and ROS 2, on shared topics. Once executed, the bridge taps on both ROS 1 and ROS 2 topics and, by default, establishes a communication bridge between the existing topics which bear the same name.
It is also possible to establish a bridge for any existing topics, regardless of their concurrent status in both environments.

Why it is needed

Currently, the ROS 2 core packages are still undergoing heavy development, and most of the third-party packages are still relying on ROS 1.
Therefore, by using the ROS Bridge, it is possible to make use of those packages that are still not natively running on ROS 2.

Installation

~

ROS 2 machine

As previously stated, the ROS Bridge is a ROS 2 package, and it is available in the official repositories.
In order to run the ROS Bridge, the machine running ROS 2 is required to also run a functional ROS 1 environment.

Environment

HW: Raspberry Pi 3 Model B+
(used as the computational unit for TurtleBot3 Burger/Waffle Pi)

Software Version
OS Ubuntu 18.04.4 LTS (Bionic Beaver)
Python Python 2.7.17 (Default)
Python 3.6.9
ROS ROS 1 (Melodic)
ROS 2 (Dashing)

For information on setting up a ROS 2 Dashing environment on a machine running Ubuntu, refer to the official documentation.

  • To proceed with the Bridge installation, execute:
$ sudo apt install ros-dashing-ros1-bridge

Bash

I have slightly customised the Bash configuration file, adding an automatic IP recognition and a convenient alias for sourcing the ROS environments.

  • Add the following lines at the end of the ~/.bashrc file:
# ROS
ROS_MASTER_IP=192.168.0.100  # Ip of the ROS 1 master machine
WIFI_INTERFACE=$(iw dev | awk '$1=="Interface"{print $2}')
WIFI_IP=$(/sbin/ip -o -4 addr list $WIFI_INTERFACE | head -1 | awk '{print $4}' | cut -d/ -f1)
export TB3_MODEL=burger
export TURTLEBOT3_MODEL=${TB3_MODEL}

# ROS1
export ROS_IP=$WIFI_IP
export ROS_HOSTNAME=$WIFI_IP
export ROS_MASTER_URI=http://$ROS_MASTER_IP:11311
alias source-ros1='source /opt/ros/melodic/setup.bash'

# ROS2
alias source-ros2='source /opt/ros/dashing/setup.bash; source ~/turtlebot3_ws/install/setup.bash; export ROS_DOMAIN_ID=30 #TURTLEBOT3'

Note: In order to retrieve the interface name, the iw package must be present in the system.
If it is not already available, proceed with its installation:

$ sudo apt install iw

ROS 1 machine

The use of the ROS Bridge is completely transparent to the ROS 1 machine, therefore the machine running ROS 1 is required to only be configured to run a ROS 1 environment and its ROS 1 related packages.

Environment

HW: Desktop PC

Software Version
OS Ubuntu 18.04.4 LTS (Bionic Beaver)
Python Python 2.7.17
Python 3.6.9 (Default)
ROS ROS 1 (Melodic)

For information on setting up a ROS 1 Melodic environment on a machine running Ubuntu, refer to the official documentation.

Bash

  • Similarly, add the following lines at the end of the ~/.bashrc file:
# ROS
WIFI_INTERFACE=$(iw dev | awk '$1=="Interface"{print $2}')
WIFI_IP=$(/sbin/ip -o -4 addr list $WIFI_INTERFACE | head -1 | awk '{print $4}' | cut -d/ -f1)
export TB3_MODEL=burger
export TURTLEBOT3_MODEL=${TB3_MODEL}

# ROS1
export ROS_IP=$WIFI_IP
export ROS_HOSTNAME=$WIFI_IP
export ROS_MASTER_URI=http://$WIFI_IP:11311
alias source-ros1='source /opt/ros/melodic/setup.bash > /dev/null && source ~/catkin_ws/devel/setup.bash > /dev/null'

Running the demo example


To verify the successful installation of the Bridge, it is possible to run a simple talker/listener example between the machine running ROS 1 and the machine running ROS 2, and vice versa.

ROS 2 machine

  • Install the demo examples:
$ sudo apt install ros-dashing-demo-nodes-py

Shell 1: bridge

  • Launch the bridge:
$ . /opt/ros/melodic/setup.bash
$ . /opt/ros/dashing/setup.bash
$ ros2 run ros1_bridge dynamic_bridge

Shell 2: listener

  • Launch the listener:
$ . /opt/ros/dashing/setup.bash
$ ros2 run demo_nodes_py listener

ROS 1 machine

  • Install the demo examples:
$ sudo apt install ros-melodic-rospy-tutorials

Shell 1: roscore

  • Launch roscore:
$ . /opt/ros/melodic/setup.bash
$ roscore

Shell 2: talker

  • Launch the talker:
$ . /opt/ros/melodic/setup.bash
$ rosrun rospy_tutorials talker

Terminals

Screenshot from 2020-07-28 13-50-45.png

Switching roles

To switch the roles of the two machines, it is also possible to run the listener on the ROS 1 machine and the talker on the ROS 2 machine.

ROS 2 machine: talker

  • Launch the talker:
$ ros2 run demo_nodes_py talker

ROS 1 machine: listener

  • Launch the listener:
$ rosrun rospy_tutorials listener

Verify the USB camera stream

~

ROS 2 machine

  • Install the image_tools package:
    This package will allow the ROS 2 machine to use a regular USB camera to produce a stream of frames of specified dimensions on a chosen topic.
$ sudo apt install ros-dashing-image-tools

Shell 1: bridge

  • Launch the bridge:
$ . /opt/ros/melodic/setup.bash
$ . /opt/ros/dashing/setup.bash
$ ros2 run ros1_bridge dynamic_bridge

Shell 2: cam2image

  • Obtain the camera stream:
$ . /opt/ros/dashing/setup.bash
$ ros2 run image_tools cam2image -s 0 -x 320 -y 240 -t /image_raw
  • For more information about the usage of the available parameters:
$ ros2 run image_tools cam2image -h

ROS 1 machine

Shell 1: roscore

  • Launch roscore:
$ . /opt/ros/melodic/setup.bash
$ roscore

Shell 2: rqt_image_view

  • Verify the camera stream:
$ . /opt/ros/melodic/setup.bash
$ rqt_image_view /image_raw

Terminals

Screenshot from 2020-07-28 14-01-52.png

References



Master’s Degree project added

Added the following pages:

  • UniPA BCI Framework project page:
    an Advanced Brain-Computer Interface framework which includes many novel features.

Edited parent and other reference pages accordingly.


Brief introduction to the Master's Degree Thesis:

  • The UniPA BCI Framework is an augmented framework based on the P300 paradigm and allows a user to select individual actions to be performed by a robot or, in the more classic configuration, to spell a sequence of symbols.
  • The framework takes advantage of additional developed modules, which perform the acquisition of eye gaze coordinates and biometric signals.
  • The use of such modules allows to achieve a combined response which does not only take in account the response of a traditional BCI system based on the P300 paradigm, but it also considers useful information, such as the user visual focus and her level of engagement with the system, providing a more robust and effective global response.

Kyoto: A map of places to visit

I thought to share a map of Kyoto points of interest I created some time ago. It mostly contains locations of temples, but it also includes other places I found interesting to visit.

The map is dinamically linked from my google account, so whenever I'll add more places, they will automatically appear on this post as well. I realise that, for an easier reading of the map, I should change the pin appearance depending on the type of location pinned on the map, but this is something I'll try to do later, if I find some spare time.
(more…)


Comments issue and New theme

I have just discovered that there have been some issues in leaving comments which were, apparently, related to the fact that I was still using an outdated theme on the latest WordPress release. I'm not sure how long this problem has been around, my apologies for the trouble.

I'm temporarily using this new theme, and although I don't particularly like it, it's still better than a theme that doesn't let people leave comments at all.
It's still a bit messy, but it'll do for now.

More configuration guides for the Raspberry Pi are on my to-do list since quite some time by now. I'll put them up once I'll be more free.