Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

A Project Report on

Legged Robotic System

Internship Report
2024 July

Submitted by
1.Kedar Dhavale
2.Avinash Chandore
3.Vaibhav Pangarkar
4.Sainath Ingle

Mentor
Abhijit Kamble, Sc 'F'
R&DE(E), DRDO, Pune
Index

1.Introduction
2.Background
3.Problem Statement
4.Hardware Requirments
5.software requirements
6.Implementation
7.References
1. Introduction

In recent years, the integration of robotics with advanced


software frameworks has revolutionized various industrial and
consumer applications. The use of Robot Operating System (ROS)
has been pivotal in enhancing the capabilities and flexibility of robotic
systems, enabling them to perform complex tasks efficiently.
Concurrently, the emergence of Flutter has ushered in a new era of
cross-platform app development, offering robust tools for creating user
interfaces that are both dynamic and intuitive.

This project explores the synergistic potential of ROS and Flutter in


the development of a Lagged robotic system—a system designed to
operate with minimal latency, ensuring precise and responsive control.
By leveraging ROS's middleware capabilities, we can orchestrate the
interaction between hardware components and high-level algorithms
seamlessly. Meanwhile, Flutter will be employed to build a versatile
control interface that enhances user interaction with the robotic
system.

The primary objective of this project is to demonstrate how ROS can


facilitate real-time data exchange and control in robotic applications
while utilizing Flutter to deliver a seamless user experience across
multiple platforms. By integrating these technologies, we aim to
showcase the feasibility and benefits of developing Lagged robotic
systems that prioritize responsiveness and reliability.

This introduction sets the stage for an exploration into the technical
details, implementation strategies, and practical applications of ROS
and Flutter in the context of Lagged robotic systems. By the end of
this project, we are making the less repose time for robot less than
1ms.

2. Background

The field of robotics has seen remarkable advancements in


recent years, driven by the convergence of hardware innovation and
sophisticated software frameworks. Traditional robotic systems have
typically relied on specialized proprietary software for control and
operation, often limiting their interoperability and adaptability to new
technologies. In contrast, the Robot Operating System (ROS) has
emerged as a de facto standard in robotics research and industrial
applications due to its open-source nature and modular architecture.

ROS provides a flexible platform that facilitates the development of


complex robotic systems by offering capabilities such as hardware
abstraction, device drivers, communication middleware, and a vast
library of algorithms. This ecosystem enables developers to focus on
higher-level functionalities and applications rather than low-level
hardware integration, thereby accelerating innovation in the field.

Simultaneously, the demand for intuitive and responsive user


interfaces has grown, especially with the proliferation of mobile and
web applications. Flutter, Google's UI toolkit for building natively
compiled applications for mobile, web, and desktop from a single
codebase, has gained traction for its ability to create visually
appealing and interactive interfaces across multiple platforms.
The concept of a Lagged robotic system combines the strengths of
ROS in robotic control and data management with Flutter's capabilities
in UI development. This integration aims to address several key
challenges in robotics:

1. Latency Reduction: Lagged robotic systems focus on minimizing


delays between sensor input, computation, and actuator
response, which is crucial for applications requiring real-time
interaction and precise control.
2. User Experience Enhancement: By leveraging Flutter's
cross-platform capabilities, Lagged robotic systems can provide
a consistent and user-friendly interface across devices,
enhancing usability and accessibility.
3. Scalability and Flexibility: ROS's modular and distributed
architecture allows Lagged robotic systems to scale from simple
robotic platforms to complex multi-robot systems or swarm
robotics, adapting to diverse application scenarios.
4. Interoperability and Integration: Integrating ROS with Flutter
facilitates seamless communication and data exchange between
robotic components and user interfaces, enabling holistic system
management and control.

In summary, the development of a Lagged robotic system using ROS


and Flutter represents a significant step towards creating responsive,
adaptable, and user-centric robotic solutions. By harnessing the
strengths of these technologies, this project aims to push the
boundaries of what is possible in robotic control systems, paving the
way for future innovations in automation, teleoperation, and
human-robot interaction.

3. Problem Statment :

To reduce the response time of the robot which is less than 1 ms.

Software Requirments :

● Operating System
● ROS Distribution
● DDS Implementation
● Real-Time Middleware and Libraries
● Development Tools
● Google Flutter

Operating System : Real-Time Operating System (RTOS)

ROS Distribution :
Latest stable release of ROS 2, such as Foxy Fitzroy, Galactic
Geochelone, or Humble Hawksbill.
ROS 2 has better support for real-time operations compared to ROS

DDS Implementation:
Fast DDS & Cyclone DDS:

● Both are DDS implementations supported by ROS 2 and can be


configured for low-latency communication
Real-Time Middleware and Libraries:
rclcpp:

● ROS 2 client library for C++. Ensure real-time capabilities are


enabled and optimized.

Realtime Support Libraries:

● realtime_tools: Provides tools to support real-time


programming in ROS.
● rtt_ros2: Real-time toolkit for ROS 2 (if needed).

Development Tools:
Profiling and Debugging Tools:

● perf: Performance analysis tool for Linux.


● Valgrind: Instrumentation framework for building dynamic
analysis tools.
● GDB: GNU Debugger for debugging applications.

Google Flutter:
Combination with ros to make an application.

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.
Hardware Requirments :

1. CPU (Central Processing Unit)

● High-Performance Multi-Core CPU:


○ Prefer CPUs with high clock speeds and multiple cores to
handle parallel processing efficiently.
○ Examples: Intel Core i7/i9, AMD Ryzen 7/9, or higher-end
server-grade CPUs like Intel Xeon or AMD EPYC.

2. Memory (RAM)

● Low-Latency, High-Speed RAM:


○ Ensure you have sufficient RAM (at least 16 GB, preferably
32 GB or more) with high clock speeds and low latency.
○ Use DDR4 or DDR5 memory modules with low CAS
latency.

3. Real-Time Clock (RTC)

● Dedicated Real-Time Clock:

Some real-time systems benefit from dedicated RTC hardware to


ensure precise timing.
SRS Diagram :

Architecture Overview
Implementation :

Integrate ROS2 with VIM

1. Install ROS
2. Install Vim
3. Setup resources
4. Create Environment
5. Create binary for the Hardware control and add a node

Integration with Flutter

1. Create a Flutter application


2. Add dependencies for flutter
3. Add Libraries
4. Build Binary package
5. Initialize ROS connection and Push the data :

Create the connection

import
'package:flutter/materi
al.dart';

import 'package:roslib/roslib.dart';

class Publisher extends StatefulWidget {

@override

_PublisherState createState() =>


_PublisherState();

class _PublisherState extends


State<Publisher> {

Ros ros;

Topic chatter;

Topic counter;

Topic cmd_vel;

@override

void initState() {
ros = Ros(url:
'ws://192.168.1.4:9090');

chatter = Topic(

ros: ros,

name: '/chatter',

type: "std_msgs/String",

reconnectOnClose: true,

queueLength: 10,

queueSize: 10);

cmd_vel = Topic(

ros: ros,

name: '/cmd_vel',

type: "geometry_msgs/Twist",

reconnectOnClose: true,

queueLength: 10,

queueSize: 10);

counter = Topic(

ros: ros,

name: '/counter',

type: "std_msgs/String",

reconnectOnClose: true,

queueSize: 10,

queueLength: 10,

);
super.initState();

void initConnection() async {

ros.connect();

await chatter.subscribe();

await counter.advertise();

await cmd_vel.advertise();

setState(() {});

void publishCounter() async {

var msg = {'data': ''};

await counter.publish(msg);

print('done publihsed');

void publishCmd() async {

var linear = {'x': 0.5, 'y': 0.0,


'z': 0.0};

var angular = {'x': 0.0, 'y': 0.0,


'z': 0.5};

var twist = {'linear': linear,


'angular': angular};

await cmd_vel.publish(twist);
print('cmd published');

void destroyConnection() async {

await chatter.unsubscribe();

await counter.unadvertise();

await ros.close();

setState(() {});

@override

Widget build(BuildContext context) {

return StreamBuilder<Object>(

stream: ros.statusStream,

builder: (context, snapshot) {

return Center(

child: Column(

crossAxisAlignment:
CrossAxisAlignment.center,

mainAxisAlignment:
MainAxisAlignment.center,

children: [

ActionChip(

label: Text(snapshot.data
== Status.CONNECTED

? 'DISCONNECT'
: 'CONNECT'),

backgroundColor:
snapshot.data == Status.CONNECTED

? Colors.green[300]

: Colors.grey[300],

onPressed: () {

print(snapshot.data);

if (snapshot.data !=
Status.CONNECTED) {

this.initConnection();

} else {

this.destroyConnection();

},

),

StreamBuilder(

stream:
chatter.subscription,

builder: (context2,
snapshot2) {

if (snapshot2.hasData)
{

return
Text('${snapshot2.data['msg']}');

} else {

return
CircularProgressIndicator();
}

},

),

RaisedButton(onPressed: ()
{

publishCounter();

}),

RaisedButton(onPressed: ()
{

publishCmd();

}),

],

),

);

},

);

Step By Step Implementation :

1. Add Libraries
2. Create a clone for the robot
3. Add dependencies
4. Manage the motors, sensors through the ROS function
5. Provide data for the same.
References

1. https://www.ros.org/

2. https://www.spiceworks.com/tech/artificial-intelligence/articl
es/what-is-robot-operating-system/

3. https://flutter.dev/

4. https://docs.ros.org/en/foxy/index.html

You might also like