In this tutorial, we will show you how to integrate your Leo Rover with Freedom Robotics platform.
Freedom's Pilot teleoperation enables extremely low latency (50-200ms round trip) and fully customizable control of your robot - from real-time driving to triggering missions to custom commands for manipulation and navigation.
All in an intuitive-to-use interface designed for tablets, phones and desktops in the real-world, where you need to be able to drop your interface, pick it up, and continue on.
You can use it together with stock Leo Rover UI with only simple steps needed to integrate.
This way you'll be able to connect to the Rover via Internet from anywhere you want. Together with remote driving functionality, Freedom Robotics allows for data streaming, 3D-mapping visualisation, GPS data overlay on map, and much more.
See more: https://www.freedomrobotics.ai/
You can choose either free trial, paid plan or use any dedicated discount code.
Connect to the Rover via SSH and connect the Rover to the Internet.
After logging in you should see main menu with overview with your robots.
Start by clicking the Add Device button, located in the bottom left corner of the screen.
Then you can choose either you want to customize your robot, or get the quick installation with some base settings. We will choose the Custom Create option.
No matter what option did you choose, next step is the same. After short time we get a custom curl command that will install Freedom Robotics agent when executed on our Rover.
We will run this command in LeoRover console, but first we need to make sure that some things will install. To do so, click the Advanced Settings button.
There look for REMOTE SSH and WEB RTC settings and make sure both are checked.
You can also see if there is install_elements=webrtc fragment in the generated command.
Next you have to run the generated curl command in the LeoRover console. To do so you need to connect to the Rover via ssh, and Rover needs to have internet connection. Then just copy paste the command and press Enter. The installation of Freedom Robotics agent will start and you will be asked for password. Type in the password (default: raspberry) and continue the installation.
When the installation is complete, the service is installed and will start with every boot of the system. You can close the ssh connection (press ctrl + d) and go back to the freedom robotics.
Now the PROCEED button should be active (if you didn't notice, before the installation it was inactive). Click it.
Now you will be asked for your robots name. It can be anything you want, we will continue with LeoRover. Enter your robot's name and click PROCEED button.
Now you have to choose the robot's type. If this is your first robot it's better to chose from the drop-down list New Type, and fully configure your robot. You can also choose any preset if you have already configured any robot before - settings will be added automatically.
If you choose New Type, you will be asked for the type's name. Same as with the robot's name, you can choose anything you want. We will continue with LeoRobot. To continue press PROCEED.
The next step is to choose group for your robot. The purpose of grouping is to have devices that will be managed as a unit (e.g. they have the same type, are in the same area or are deployed for specific customer) in one group. You can choose from already existing groups (if you have added any before), or Create New Group. We will go with the second option and create LeoRovers group.
When you provide the groups name, confirm it with Enter and customization will continue.
From now on begins the customization of topics for your freedom robotics agent. The steps will be skipped if you have chosen Quick Create option in the beginning.
First step is to configure what topics will be allowed to receive commands from Freedom Robotics. This is useful if you want to add commands for buttons on joystic (e.g make a photo when pressing square button), or if you want to pilot the robot using the UI joystic in freedom robotics. You have 3 options:
We will chose the DEFAULT option and continue by clicking PROCEED.
Then comes customization of the Smart Alerts. At the time of writing this tutorial, the customization is not possible and you can choose only the DEFAULT option.
After this step, the adding new device ends. But we haven't yet configured topics that will be visible in the Freedom Robotics, therefore we click Go To Device.
Now we see that the device is connected, although not active even though our rover is still turned on. That's because Freedom Robotics doesn't get any info from any topics from the robot. After the configuration the robot will be visible as active. So now from the robots menu we go to Settings.
In this section you can actually change the things that we have configured earlier (name, type group etc.) or even delete the device from account.
We want to customize topics, so we will go to Bandwidth section.
Here you can see all the topics (ROS topics) that are monitored by the interface. If you have chosen the Quick Create option, the platform listens to all the topics ran on the ROVER (/* entry in Included Topics). It's better to exclude the ones that are not needed, so if you have it, please delete the /* entry.
Now we will add the topics that are specific to Leo Rover.
To use the basic functionality of the Rover you should include the topics below. These are the topics that will be listened to by the platform.
/cmd_vel is published by default so you don't need to add it.
You add the topic to the Bandwith by clicking Add in the Included Topics section.
Then you will have to enter the topics name and choose the frequency of sending messages from this ropic to the Freedom Robotics platform, from drop-down list.
This is how our Included Topics looks in the end.
Now if you go to the main menu, you will see that your device is active.
When you are in the robots settings, go to the PILOT section.
Now modify /cmd_vel MAX ANGULAR VELOCITY to 60deg/s and MAX LINEAR VELOCITY to 0.5m/s - choose the right options from the drop-down lists. Those values are closer to the real speeds the Rover can go.
These parameters will modify the UI joystick scale to the proper realistic values.
Start by logging into your Freedom Robotics Account.
Then in the overview panel click the ACTIVE devices.
Now you will see all the active devices. Chose the device that you want to connect to, and on the panel on the right click the GO TO DEVICE button.
Now you are in the Stream mode of the interface - here you can see messages from the topics added in the Bandwidth section. You can play with the modes to learn how to navigate in the interface.
When connected to the device, go to the Pilot mode.
You should see jpeg video stream in the background and UI features. Everyone who is logged to your account can see the same view as a spectator, but only one person can take over the control.
Click Take Over in the upper section of the video stream.
Wait couple of seconds until the streaming method is changed from JPEG stream to WebRTC (you'll see that the notice in the image center changes).
Now you're able to drive the Rover with the red joystic. You can also change the speed with the slider on the right of the joystic.
Assemble IMU module to your Rover and follow the IMU tutorial to enable IMU data streaming to ROS environment.
Now connect to your device via Freedom Robotics and go to the device Settings and then go to Bandwidth section.
Now add new topic to Included Topics.
Include /imu* topic - this will include all the topics from the imu sensor.
Now you can see in the Stream section data from the IMU topics.