UBlox EVK-M8N GPS module

This tutorial will guide you through the process of connecting a UBlox GPS module to your Leo Rover.





UBlox EVK-M8N GPS module

This tutorial will guide you through the process of connecting a UBlox GPS module to your Leo Rover.

EVK-7 / EVK-8 / EVK-M8 evaluation kits make evaluating the high performance u-blox 7, u-blox 8 and u-blox M8 positioning products simple. The built-in USB interface provides both power supply and high-speed data transfer, and eliminates the need for an external power supply. The u-blox evaluation kits are compact, and their user-friendly interface and power supply make them ideally suited for use in laboratories, vehicles and outdoor locations.

In this tutorial we will present the process of connecting a UBlox GPS module to your Leo Rover and integrating it with the system on the UBlox EVK-M8N GPS module example.

The steps might slightly differ for other UBlox models, but should be essentially similar.

After completing this tutorial, you should be able to get the gps localization data of your rover.

What to expect?


List of components

Mechanical integration

When it comes to mounting the module, any solution that works for you is okay. You can 3D print a special mounting plate, use a velcro or even a tape.

Wiring and electronics connection

Wiring up the module is very simple, as it doesn't require external power supply. You just need to connect the module with a USB cable with the rover via the USB socket in the mounting plate. There is a micro-usb mounting hole with the USB sign on the module, and you need to plug in the USB cable there.

Software integration

The first thing you can do is to make sure your device has the correct permissions and is available at the fixed path on your system. To do this, you can add the following rule to the udev service. We will need idVendor and idProduct, to make the rules for the correct device. To get that information, you need to connect to the rover via ssh, and then, you can use the lsusb command. It will list all connected usb devices. In the output, you should look for something named like U-Blox AG [u-blox 8]

lsusb output

Now, our idVendor and idProduct are the two strings after ID divided by: sign. In our case, idVendor is 1546 and idProduct is 01a8.

After getting those two, the only thing that is left is the port that the device connects to. You can get it by running dmesg -w in the terminal, and then connecting the module to the rover. You should see that the new device is registered, and on what port (with this command, you can also get the idVendor and idProduct values).

dmesg -w output

Now, you need to make a udev rules file.


Paste these lines to /etc/udev/rules.d/ublox.rules file and reload udev rules by typing:

Your device should now be available at the /dev/ublox_gps path.

We want the sensor functionality to be available in the ROS ecosystem, so you should install a ROS package that provides a node for the sensor you are trying to integrate.

Now, create a launch file that would start the node with a fitting configuration.


Include your launch file in the robot.launch file (somewhere between <launch> tags), so that your node will start at boot.

In /etc/ros/robot.launch:

Your robot should be aware of where the module is located and what space it occupies. You can ensure it does that by creating a URDF model of the module.


Make sure that "frame_id" param in the launch file and "link name" in ublox.urdf.xacro file have the same value.

And including it in the description that is uploaded at boot.


The last step is to either reboot the robot

or restart the leo service


What next?


Need help? Contact us - contact@fictionlab.pl