EV3 control over Bluetooth and ROS 2
Bluetooth communication between a Linux computer and a LEGO EV3 running the stock firmware, and a ROS 2 package to teleoperate it as a differential-drive robot.
To control the LEGO EV3 over Bluetooth with the stock firmware, we followed the steps by A. Brown and Geekdroppings.

Installing the program on the LEGO
Download the EV3-bluetooth.ev3 program. To upload it to the brick you need the LEGO MINDSTORMS EV3 software in Spanish or English.
Inside the program, change the name of the device the LEGO will connect to (your computer’s Bluetooth name).
Building the robot
The mobile platform is built with the official driving base instructions.

Bluetooth connection
On Ubuntu, install the tools to manage the serial Bluetooth connection:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bluetooth bluez blueman
Then follow A. Brown’s instructions to pair the brick. If no devices show up, the driver may be missing; this Linux Mint forum thread explains how to install it.
Using it with ROS 2
Download the ev3 package, unzip it into ws/src and then:
# Allow access to the serial port created by the Bluetooth link
sudo chmod 777 /dev/rfcomm0
# From the ws folder: build the package
colcon build
# If setuptools warnings appear: pip3 install setuptools==58.2.0
# Add the package to the environment
source install/setup.bash
# Node that talks to the LEGO
ros2 run ev3 diferential
In another terminal, run keyboard teleoperation:
ros2 run teleop_twist_keyboard teleop_twist_keyboard Translated from Spanish.