Robotics Indoor SDK overview
Estimote Robotics Indoor SDK allows you to use Estimote Location Beacons with UWB to receive information about coordinates inside an Indoor Location. This tutorial will explain you how to prepare a setup that allows you to get live updates of (x,y) coordinates of a robot (or any other object).
What’s ahead (aka Table of Contents)
- Obtaining App ID and App Token
- Preparing your location
- Preparing Raspberry Pi
- Preparing the beacons
- Setting up your workspace
- 5 x Estimote Location Beacons with UWB
- 1 x iPhone 5S or newer
- 1 x Raspberry Pi 3 Model B
- Estimote Account (sign up here)
- iOS Estimote app
- iOS Estimote Indoor Location app
- 4 x jumper wires
Important: Before you start, make sure that all of your beacons are updated to the newest firmware.
You can update the firmware of your beacons with the Estimote app.
Obtaining App ID and App Token
Log in in to Estimote Cloud, select “Apps”, and create a new “Your Own App”. This will get you the App ID and App Token required for the final configuration.
Preparing your location
Before you start using Robotics Indoor SDK, you need to create a map of your space. You will create your location in just a couple of minutes using the automapping process in the iOS Estimote Indoor app (you can do it by following the tutorial here). After successful location setup, you’ll find your location identifier in the Cloud (in the Locations tab) and in the iOS Estimote Indoor app.
Preparing Raspberry Pi
First of all, you need to set up Robot Operating System on Raspberry Pi according to this tutorial.
The second step is connecting the Central Beacon (the one on the robot) to Raspberry Pi. You need to find the GPIO port pins on the side of the beacon. This is how the connection with Raspberry Pi looks like: pinout
- Pin port 1 ↔ GPIO 15 (pin 10)
- Pin port 2 ↔ GPIO 14 (pin 8)
- Pin port 3 ↔ 3.3V (pin 1)
- Pin port 4 ↔ GND (pin 6)
Here you can find an information about using built-in UARTs for custom purposes. To receive results on serial port, you must reconfigure one of them.
Tip: Alternatively, you can use the USB to UART converter, but you might have to reprogram it for more than 300 mA.
Tip: To make sure that the Central Beacon is using the external power instead of the batteries, open up the enclosure by removing the back plate and remove the batteries.
Preparing the beacons
After you connected the Central Beacon to your Raspberry Pi, you need to switch the beacon’s GPIO ports to UART to enable communication between the ROS package and the beacon firmware.
In order to do this you need to open the iOS Estimote app and connect to the beacon that you’ve just hooked up to your Raspberry Pi. Then go to GPIO settings and set the configuration for both GPIO0 and GPIO1 to UART.
Don’t worry if the LED on the beacon turns green while switching GPIOs to UART, this is normal behaviour.
Secondly, you have to prepare the beacons in your location to work with our ROS package. In order to do that you have to open the iOS Indoor Location app and open the location you’ve created at the begining (or any other location that contains only UWB Location Beacons).
Go to location settings by tapping on the white bar at the bottom of the screen. At the bottom of the location settings and parameters list you should see an “Enable Robot Navigation” switch.
If you don’t see the “Enable Robot Navigation” switch and your location was created using only UWB Location Beacons, let us know: email@example.com, and we’ll look into it.
Switch the “Enable Robot Navigation” to ON and wait for the process to finish. Note down the PanID value that is displayed at the end of the process! You will need it for later configuration of the ROS package.
Setting up your workspace
Start by creating a ROS workspace (link to tutorial) from where you will run your project (we will refer to this directory as
Execute workspace setup commands by running:
$ cd $CATKIN_WORKSPACE $ source ./devel/setup.bash
Next, create a folder in the src directory where you’ll clone our node project. You can clone the repository with our node from here.
$ cd $CATKIN_WORKSPACE/src $ mkdir estimote_robotics_indoor_sdk $ git clone firstname.lastname@example.org:Estimote/Robotics-Indoor-SDK.git estimote_robotics_indoor_sdk
$ cd $CATKIN_WORKSPACE $ catkin make
To provide information about your setup (app id, app token, location identifier, beacons PanID and USB port directory i.e.
/dev/ttyS0), you need to fill out the
params.yaml file which you can find in your node directory (
Open a new terminal window and run:
In the previous window (the one where you have your
$ rosparam load src/estimote_robotics_indoor_sdk/src/params.yaml
(remember to be in the main workspace directory, otherwise
rosparam won’t find the
Now you can run:
$ rosrun estimote_robotics_indoor_sdk runner.py
Now you can open up a third terminal window and run:
$ cd $CATKIN_WORKSPACE $ source ./devel/setup.bash $ rosparam load src/estimote_robotics_indoor_sdk/src/params.yaml $ rosrun estimote_position listener.py
If everything went well, the third terminal should start displaying information about your robot x, y coordinates.
[INFO] [1504616206.201462]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 3.01399005148, 7.99962693196 [INFO] [1504616206.715274]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.93667003483, 8.00168879907 [INFO] [1504616207.226787]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.97898994055, 8.00056026825 [INFO] [1504616207.741355]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 3.02120991733, 7.9994344022 [INFO] [1504616208.253420]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.97188665846, 8.00074968911 [INFO] [1504616208.765653]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.985776781, 8.00037928584 [INFO] [1504616209.277594]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.9505101929, 8.00131972819 [INFO] [1504616209.792502]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.97182003917, 8.00075146562 [INFO] [1504616210.303953]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.97215313563, 8.00074258305 [INFO] [1504616210.816947]: /listener_8258_1504616175325 || Estimote Indoor SDK position x, y = 2.92938354968, 8.00188310534
Now your robot knows excactly where it is so now it’s your turn. With our Robotics-Indoor-SDK you can create many interesting robotics projects! It’s a super simple way to start building an autonomous RC Car or your own self-driving vacuum cleaner.