Make ROS enabled Flutter Application Part 1

Photo by Robert Thiemann on Unsplash

Develop a ROS enabled Flutter app that can use to control the robot using a joystick from the mobile app

Flutter +ROS

Flutter is Google SDK to build mobile applications for both iOS and Android. Robot Operating System is a framework for making robots. We would combine these technologies and build an application to control a robot.

Welcome to the series, where we will learn about Flutter and ROS.

In this tutorial, we would use Turtlebot3 in Gazebo Simulation and Flutter roslib plugin.

Create a Flutter application

flutter create my_app

Add dependencies to your flutter project

dependencies:
roslib: ^0.0.3
webview_flutter: ^1.0.3
control_pad: ^1.1.1+1

Add Joystick to the Application and use a move function to calculate the linear and angular velocity from the joystick by providing parameters degree and distance.

Initialize ROS connection and publish the data to the topic

Now, combine both of these files, e.g. get the linear and angular velocity from the joystick and then publish these values to /cmd_vel topic.

Our application is complete, now let’s work on setting the things for ROS. We will use the ROS bridge web server to make the connection between the app and ROS

roscore
roslaunch rosbridge_server rosbridge_websocket.launch
export TURTLEBOT3_MODEL=waffle
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch

Check the full project at GitHub.

If you have an idea for other ROS + Fluter Related Project. Please add in the comment section.

Things to do

  • Need to add a working video of app and gazebo simulation

Hi, I am enthusiast programmer and electronics hobbyist