0% found this document useful (0 votes)
7 views

Module VI- ROS and Programming of Robots-updated

The document provides an overview of robot programming, focusing on robot control languages, their classifications, and the requirements for effective robot control. It introduces the Robot Operating System (ROS), detailing its architecture, key components, and benefits of open-source development. Additionally, it discusses various robot languages and their functionalities, along with examples of programming in VAL and kinematics concepts.

Uploaded by

Kritika R
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Module VI- ROS and Programming of Robots-updated

The document provides an overview of robot programming, focusing on robot control languages, their classifications, and the requirements for effective robot control. It introduces the Robot Operating System (ROS), detailing its architecture, key components, and benefits of open-source development. Additionally, it discusses various robot languages and their functionalities, along with examples of programming in VAL and kinematics concepts.

Uploaded by

Kritika R
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 133

Module VI

Programming of Robots

Prepared by
Dr.R.Priyadarshini
Syllabus
Introduction to robot control, Robot
programming and Languages- Introduction to
ROS, Languages, software's and Ros, ROS1,
ROS2, GAZEEBO, Architecture Diagram,
Characteristics of ROS.
Classification of Robot Languages
Robot languages can be grouped broadly in to
three major classes
– First generation language
– Second generation language
– World modelling and task-oriented object
language
General Requirements of a Language for Robot Control

1) Geometric and kinematic calculations: functions and data


types to allow the compact and efficient expression of
coordinate systems in homogeneous coordinates and their
transforms (matrix arithmetic); perhaps even very high level
operations such as solving the kinematic equations.
2) World modelling: the ability to define objects by, for example,
the space enclosed by a set of intersecting surfaces, to
manipulate such objects as a whole, to 'attach' objects(including
parts of the robot) so that the system knows that if one object
moves then any attached objects also move, and to test for
collisions. Other functions can be imagined. World modelling is
related to simulation and computer-aided design.
General Requirements of a Language for Robot Control

3) Motion specification: the ability to do the things


described in the section on specifying trajectories. This
implies functions such as linear interpolation, finding
the equation of a circle from points on it, fitting curves
through a series of points and so on. It may also be
useful to specify sawtooth weaving, as used in arc
welding, speed and acceleration, and the direction of
approach to a certain point (important for assembly).
4) The use of sensing for program branching and servo
control.
General Requirements of a Language for Robot Control

5) Teaching: the ability to accept path points taught


by leading or walking through. This is perhaps an
aspect of trajectory generation.
6) Communication with other machines.
7) Vision and other complex sensing (such as tactile
imaging). Although it is more usual for such
processing to be done in a separate system which
feeds a simple result such as object orientation to the
robot control system, there may be a place for these
capabilities within the language itself.
Robot Languages
• The earliest was MIT's language MHI in 1960. Its main robot-
specific constructs are moves and sensor tests.
• A more general purpose language was WAVE, developed at
Stanford in the early 1970s. It introduced the description of
positions by Cartesian coordinates, coordinated joint motions
and compliance by letting certain joints move freely under
external loads.
• An influential language, which is still being extended, is AL.
This provides Cartesian specification of motions, compliance,
the data ,types and control structures of an Algollike
language, support for world modelling (such as attachment)
and the concurrent execution of processes.
• A more recent language is RAPT, based on the machine tool
language APT, and developed at Edinburgh University. Robot
manufacturers often provide a language to go with their
products. Example is Unimation's VAL for the PUMA robot.
Versatile Assembly Language (VAL)
• It is a popular textual robot language developed by Unimation
Inc. for the PUMA series of robots
• Victor Sheinman developed VAL language
• It is very user friendly
• WAIT and SIGNAL commands can be given to implement a
specific task
• The commands are subroutines written in BASIC and
translated with the aid of an interpreter
• Compiled BASIC has more flexibility
• It provides
arm movement in joint, world and tool coordinates
Gripping
Speed control
Robot configuration control
• RIGHTY changes the robot configuration to
resemble a right human arm
• LEFTY change the robot configuration to
resemble a left human arm
• ABOVE makes the elbow of the robot to point
up
• BELOW makes the elbow of the robot to point
down
Motion control
• MOVE moves the robot to a specific location
• MOVES moves the robot in a straight line path
• DRAW moves the robot along a straight line through specified
distances In X,Y and Z directions
• APPRO moves the robot to a location which is at an offset
(along tool Z-axis) from a specified point
• DEPART moves the tool along the current tool Z-axis
• APPROS or DEPARTS do the same as APPRO or DEPART
instruction, but along straight line paths
• CIRCLE moves the robot through circular interpolation via
three specified point location
Hand control
• OPEN and CLOSE indicates respectively the opening
and closing of the gripper during the next instruction
• OPENI and CLOSEI carry on the same functions, but
immediately
• GRASP indicates the gripper to close
• MOVEST PART indicates that the servo controller
end effector causes a straight line motion to a point
defined by PART
• MOVET PART causes the gripper to move to position
by joint-interpolated motion
Location Assignment and modification
• SET
• HERE
Program control, interlock commands and
input/output controls
• SETI sets the value of an integer variable to the result of an
expression
• TYPEI displays the name and value of an integer variable
• PROMPT
• GOTO performs an unconditional branch to the program step
identified by a given level
• GOSUB and RETURN are necessary to transfer control to a
subroutine and back to the calling program respectively
• IF…THEN ELSE END transfers control to a program step
depending on a relationship being true or false
• PAUSE terminates the execution of a user program
Cont..
• PROCEED resumed from the point
• SIGNAL turns the signals ON or OFF at the specified output
channels
• IFSIG and WAIT test the states of one or more external
signals
• RESET turns OFF all external output signals
• REACT indicates that the reactions
• REACTI interrupts robot motion immediately
• IOPUT and IOGET are the commands that are used either to
send or receive output respectively to a digital I/O module
• ADC and DAC
Simple VAL program
Program DEMO. A
1. APPRO PART, 50
2. MOVES PART
3. CLOSEI
4. DEPARTS 150
5. APPROS BOX, 200
6. MOVE BOX
7. OPENI
8. DEPART 75
END
Meaning of the program
The name of the program is DEMO. A
1. Move to a location, 50mm above the location PART (PART is a
location to be defined)
2. Move along a straight line to PART
3. Close the gripper jaws to grip the object immediately
4. Withdraw 150mm from PART along a straight line path
5. Approach along a straight line to a location 200mm above
the location, BOX (BOX is to be defined later)
6. Move to BOX
7. Open the hand (and drop the object)
8. Withdraw 75mm from Box
• Step 1, 6 & 7 are examples of joint-
interpolated motions
• Steps 2, 4, & 5 are examples of straight line
motion
• Step 3 & 7 contain hand control instruction
• However, an optional level may be given, such
as “10 APPRO PART, 50”
• Go back to the same instruction
ROBOT KINEMATICS
• It is assumed that a robot can be regarded as a chain of
rigid links connected by revolute or prismatic joints at
which actuators, regarded as torque or force generators.
• The control of flexible structures is in its infancy and will
not be discussed.
• With this assumption, there is a set of important
problems in analysis and control, and most of the
literature on robot control addresses one or other of
these.
• Some have accepted solutions; others are the subject of
research.
ROBOT KINEMATICS
They are as follows:
1) formulating the kinematic equations (joint coordinates to world
coordinates) ;
2) solving the kinematic equations (world coordinates to joint
coordinates);
3) the forward problem of dynamics - finding the motions resulting
from joint torques;
4) the inverse problem of dynamics - finding the torques needed to
produce a given motion;
5) specifying a trajectory between target points on the path;
6) actuator servo control - for a single actuator, how to drive it so as
to produce a specified position, velocity or torque.
Forward Kinematics
It is a scheme to determine joint angles of a
robot by knowing its position in the world
coordinate system. For a manipulator, the
position and orientation of the end-effector are
derived from the given joint angles and link
parameters, the scheme is called the forward
kinematics problem.
Reverse Kinematics
It is a scheme to determine the position of the
robot in the world coordinate system by
knowing the joint angles and the link
parameters of the robot.
If, the joint angles and the different
configuration of the manipulator are derived
from the position and orientation of the end
effector , the scheme is called the reverse
kinematics problem.
Introduction to ROS
• ROS is an open-source robot operating system
• A set of software libraries and tools that help
you build robot applications that work across a
wide variety of robotic platforms
• Originally developed in 2007 at the Stanford
Artificial Intelligence Laboratory and
development continued at Willow Garage
• Since 2013 managed by OSRF (Open Source
Robotics Foundation)
ROS has two "sides"
• The operating system side, which provides
standard operating system services such as:
hardware abstraction low-level device control
implementation of commonly used functionality
message-passing between processes package
management
• A suite of user contributed packages that
implement common robot functionality such as
SLAM, planning, perception, vision, manipulation,
etc.
What is ROS?

• ROS is an open-source, meta-operating system for


your robot. It provides the services you would expect
from an operating system, including hardware
abstraction, low-level device control, implementation
of commonly-used functionality, message-passing
between processes, and package management.
• It also provides tools and libraries for obtaining,
building, writing, and running code across multiple
computers.
• ROS is similar in some respects to 'robot frameworks,
such as Player, YARP, Orocos, CARMEN, Orca, MOOS,
and Microsoft Robotics Studio.
The ROS Equation
The ROS project can be defined in a single
equation

• 1. Plumbing: ROS provides publish-subscribe messaging infrastructure designed to support


the quick and easy construction of distributed computing systems.
• 2. Tools: ROS provides an extensive set of tools for configuring, starting, introspecting,
debugging, visualizing, logging, testing, and stopping distributed computing systems.
• 3. Capabilities: ROS provides a broad collection of libraries that implement useful robot
functionality, with a focus on mobility, manipulation, and perception.
• 4. Ecosystem: ROS is supported and improved by a large community, with a strong focus on
integration and documentation. ros.org is a one-stop-shop for finding and learning about the
thousands of ROS packages that are available from developers around the world.
Characteristics of ROS
• Distributed process: It is programmed in the form of nodes, the
smallest units of executable processes. Each node runs independently
and systematically exchanges data.
• Package management: Multiple processes with the same goal are
managed as a package, making it simple to use and develop and
share, modify, and redistribute.
• Public repository: Each package is published to the developer’s
preferred public repository (e.g., GitHub) and attached a license.
• API: When creating a program with ROS, it is designed to call an API
and easily insert it into the code. You’ll notice that ROS programming is
similar to C++ and Python in the source code.
• Supporting various programming languages: The ROS program
includes a client library that can be used with various programming
languages. The library can be used with popular robotics programming
languages like Python, C++, and Lisp and languages like JAVA, C#,
Lua, and Ruby. Put another way, you can write a ROS program in any
programming language you want.
Components of ROS

• ROS consists of a client library to support various


programming languages, a hardware interface for
hardware control, communication for data
transmission and reception,
• The Robotics Application Framework to help create
various Robotics Applications.
• Framework, Simulation tools which can control the
robot in a virtual space, and Software Development
Tools
Key Components of ROS

• Understanding the architecture of ROS involves recognizing the roles of its key
components. These components are designed to work together seamlessly:
• Nodes: Independent processes that represent software programs performing
specific tasks in ROS.
• Messages: Data exchanged between nodes. This could be sensor information
or control inputs.
• Services: Defined locations in the code where functions can be called
remotely.
• Topics: Established channels for nodes to send and receive messages
asynchronously.
• Packages: Organizational unit for ROS code, containing nodes, configuration
files, and sometimes datasets or libraries.
• These components together facilitate communication and coordination for
robot tasks, enhancing functionality and ease of development.
Core Elements of ROS Architecture

• The architecture of ROS is designed to be robust and adaptable. Here


are the principal elements that make up ROS:
• Nodes: These are the fundamental processing units in ROS. Each
node is a standalone process that performs computation.
• Master: The node that manages communication among other nodes.
It keeps track of all the active nodes and facilitates message passing.
• Messages: Defined data structures used by nodes to communicate.
• Topics: These are named buses over which nodes exchange
messages.
• Services: Synchronous communication channels provided by nodes.
• These components work together to enable distributed and parallel
processing in robotic applications.
Example

• Imagine developing a simple robot application where


one node controls the motor speed while another
node processes sensor input.
• In ROS, you could separate these tasks into distinct
nodes, using topics to exchange messages regarding
motor speed adjustments and sensor data.
• This separation of functionalities allows for better
modularity and maintainability.
Three level ROS Architecture
ROS architecture with robots, sensors, controllers and the
central computer.
ROS 2 Architecture
Benefits of Open Source ROS

• Collaboration: Developers around the globe can contribute to and


benefit from the work of others, fostering rapid innovation.
• Cost-effectiveness: Free access to robust software libraries allows you
to save on development costs.
• Adaptability: Open source enables customization and extension to
meet specific requirements.
• Community Support: Access to a vast community means help is
readily available through forums and shared documentation.
• These advantages make ROS an ideal choice for projects that require
flexibility, efficiency, and continual improvement.
• Using open source ROS, suppose you want to create a robot that can
autonomously navigate through a home.
• You can utilize existing open source packages like the Navigation
Stack, which provides capabilities for localization, path planning,
and collision avoidance. By tapping into the shared knowledge base,
you can significantly reduce development time and focus on unique
customizations.
ROS Architecture

• ROS Architecture concept involves Graph Resource Names


in the strategy.
• These are a fundamental piece of the ROS naming system,
providing a way to globally reference nodes, topics,
and services. The use of Graph Resource Names allows for a
consistent and organized structure within the ROS framework,
enabling complex robot applications to be developed with ease.
• This system is hierarchical and supports namespaces, making
it possible to avoid naming collisions.
• By leveraging this naming convention, you can help ensure
clarity and organization in larger projects that employ multiple
modules and processes.
Why ROS?
• Free and open source robotics software
framework
• Message passing interface between processes
• Operating system–like features.
• High-level programming language support and
tools.
• Availability of third-party libraries.
• Off-the-shelf algorithms.
• Ease in prototyping
• Ecosystem/community support.
• Extensive tools and simulators
Robot operating systems - Examples
• Different versions of the Robot Operating System provide
varying functions suitable for specific tasks and research.
• ROS Noetic: A stable version often used for research and
academic purposes.
• ROS 2: An evolution of ROS 1, designed with improved
support for real-time systems, multi-robot systems, and
enhanced security.
• Micro-ROS: Targeted for embedded systems with limited
resources, making it ideal for small robots.
• These different versions cater to the diverse needs of robotic
applications. They allow you to select the most appropriate
tool based on the specific requirements of your project.
ROS contains many open source implementations of common robotics functionality
and algorithms. These open source implementations are organized into "packages".
Many packages are included as part of ROS distributions, while others may be
developed by individuals and distributed through code sharing sites such as
GitHub. Some packages of note include:

Motion Mapping and


planning localization

Navigation Perception

Coordinate
frame
Simulation
representatio
n
ROS Robots
https://robots.ros.org/
When to use
ROS?!
•1- The robot contains many different
sensors and actuators. ROS will help you
create a distributed system for all those
components, instead of having one big
monolith code base that will be hard to
maintain and scale.
•2- For Education Purposes. ROS helps students
see the full picture of robotics applications.
•3- For Research Purposes. Prevents re-inventing
the wheel.
•4- For Fast Prototyping
Why might ROS be not preferable?!
Difficulty in learning:
Difficulties in starting with
ROS can be difficult to learn. It simulation:
has a steep learning curve and
The toughness of learning
developers should become
simulation using Gazebo and
familiar with many new concepts
ROS is a reason for not using it
to get benefits from the ROS
in projects.
framework.

Difficulties in robot Potential limitations:


modeling: 1- complexity to implement
Learning to model a robot in ROS robust multi-robot distributed
will take a lot of time, and applications.
building using URDF tags is also 2- There is a lack of a native
time-consuming compared to real-time application
other simulators. development support
ROS Concepts
There are mainly
three levels of ROS:
• • The ROS file system
• • The ROS Computation
Graph
• • The ROS community
ROS filesystem

Package
Manifests:

Metapackag Message
Packages:
es: (msg) types:

Service (srv)
types:
ROS filesystem

ROS packages are the


main unit of an ROS
software framework.
A ROS package may
Metapackag
Packages:
contain executables,
es: ROS-dependent
library, configuration
files, and so on. ROS
packages can be
reused and shared.
ROS filesystem

The manifests (package.xml) file


will have all the details of the
Package
Manifests: packages, including name,
description, license, and
dependencies.

Message descriptions are stored in the msg folder in


a package. ROS messages are data structures for
Metapackages: Packages: Message (msg) sending data through ROS.
types: Message definitions are stored in a file with the .msg
extension.

Service descriptions are stored in the srv folder with


Service (srv)
the .srv extension. The srv files define the request
types:
and response data structure for service in ROS.
ROS
Computatio MASTER NODES PARAMETER
LEVEL
MESSAGES

n Graph
Level
The ROS Computation Graph
is the peer-to-peer network of
the ROS process that TOPICS SERVICES BAGS
processes data together.
The following are the basic
concepts of ROS CGL: Communication Tools
•A node really isn't much more than an executable file
within a ROS package. ROS nodes use a ROS client
ROS Nodes library to communicate with other nodes. Nodes can
publish or subscribe to a Topic. Nodes can also provide
or use a Service.
A node can be
A node is a
launched
ROS program
independently
that uses
of other nodes
ROS’s
and in any
middleware for
order among
communicatio
launches of
ns.
other nodes.
ROS Nodes Many nodes A node is
can run on the useful only if it
same can
computer, or communicate
nodes may be with other
distributed nodes and
across a ultimately with
network of sensors and
computers. actuators.
• • ROS topics are Named buses in which ROS
ROS Topics nodes can send a message. A node can publish or
subscribe any number of topics.
ROS Topics

• A topic may be introduced, and various publishers may take turns


publishing to that topic.
• Publishers and subscribers are anonymous. A publishers only knows it
is publishing to a topic, and a subscriber only knows it is subscribing to a
topic. Nothing else.
• A topic has a message type. All publishers and subscribers on this
topic must use the message type associated with the topic.
ROS Messages

• • A message is a simple data


structure, comprising typed
fields. Standard primitive types
(integer, floating point,
Boolean, etc.) are supported,
as are arrays of primitive
types. Messages can include
arbitrarily nested structures
and arrays (much like C
structs).
• • The messages are basically
going through the topic.
Creating the Messages
ROS SERVICES

• We have already seen ROS Topics, which is


having publishing and subscribing
mechanism.
• The ROS Service has Request/Reply
mechanism. A service call is a function,
which can call whenever a client node sends
a request.
• The node who create a service call is called
Server node and who call the service is called
client node.
ROS Parameters

• ROS parameter server is a


program that normally runs
along with the ROS master.
• The user can store various
parameters or values on this
server and all the nodes can
access it.
• The user can set privacy of
the parameter too. If it is a
public parameter, all the
nodes have access; if it is
private, only a specific node
can access the parameter.
ROS Bags

• Data logging is a vital debugging tool. It is common in ROS


systems to log data to file for later analysis and playback. Data
logging works as you might expect subscribe to the topic(s)
that you want to log, and then write incoming messages to
disk.
• In fact, you could easily write your own node to log data for
your application. However, you shouldn’t write your own
logger, because ROS provides a powerful, general logging tool
called rosbag. The rosbag tool is able to log data of any type
from any ROS topic, all to a single file. By convention, the
resulting log files have the extension .bag and are referred to
as “ROS bags,” or simply, “bags.”
• ROS Master: An intermediate program that connects ROS
nodes.

ROS Master • When a node wants to publish something, it will inform the ROS
master. When another node wants to subscribe to a topic, it will
ask the ROS master from where it can get the data. You can
see the ROS master as a DNS server for nodes to find
where to communicate.
Creating ROS Applications

• How to create:
1. ROS workspace.
2. ROS package.
3. ROS nodes.
ROS Build System : CATKIN

• catkin is a build system for compiling ROS packages.


(http://wiki.ros.org/catkin).
• catkin is a custom build system made from the CMake
build system and Python scripting.
ROS Workspace
ROS Workspace

1. The first step in ROS development is the creation of the ROS


workspace, which is where ROS packages are kept. We can
create new packages, install existing packages, build and
create new executables.
2. A workspace is simply a set of directories in which a related
set of ROS code lives.
ROS
Workspace

src build devel


folder folder folder
src folder build folder devel folder

• The src folder is • The catkin tool • All the executable


the place where creates some build files results from
you can create, files and intermediate building the
or clone, new cache CMake files packages is
inside the build stored inside the
packages from
folder. devel folder,
repositories.
NOTE: ROS packages only • These cache files which has shell
build and create an help prevent from script files to add
executable when it is in
the src folder rebuilding all the the current
packages when workspace to the
running the ROS workspace
catkin_make path.
command.
Here’s A typical workspace layout
Create a folder for your workspace
Create ( give your folder a name
representable of your application )

So How to Create Create another folder inside the first


name and give it the name "src"
create a
ROS Initialize the workspace using the
Workspace? Initialize command catkin_init_workspce
!
Go back to the main folder and build
Go back your workspace using catkin_make
Add the workspace environment. i.e.
you must set the workspace path so
Add that the packages inside the
workspace become accessible and
visible.
$ mkdir ~/<workspace_name>/src

$ cd ~/<workspace_name>/src

$ catkin_init_workspace

$ cd ..

$ catkin_make
$ source
~/<workspace_name>/devel/setup.bash
ROS Packages
What is ROS ROS software is organized into
packages, each of which contains
packages?! some combination of code, data,
and documentation.

The ROS package is where ROS


nodes are organized—libraries
and so forth
How to create a ROS package?!

$ catkin_create_pkg ros_package_name
package_dependencies

Note make sure you are at the source file when you creating your
packages
So what is the purpose of these files?!

• has all the commands to build the ROS


CMakeLists.tx
source code inside the package and
t:
create the executable.
• An XML file mainly contains the package
package.xml:
dependencies, information, ..etc.

src: • Contains the source code of ROS package.

include: • contains the package header files.


ROS Client
Libraries
The ROS client libraries are a
collection of code with functions to
implement ROS concepts. We can
simply include these library functions
in our code to make it a ROS node.

What are The client library saves development


ROS Client time because it provides the built-in
functions to make a ROS application.
libraries
Think of it as c++ libraries that you
include using the command
#include<library_name.h> at the
beginning of your source code to use
c++ functions such cout and cin
1 Roscp ROS client library for C++.
It is widely used for
developing ROS

: p: applications because of its


high performance.

Main ROS 2 Rospy


the ROS client library for
Python Advantages:
Saving development time.
Client ideal for quick prototyping

Library : : applications Disadvantage:


performance is weaker than
with roscpp

3
the ROS client library of the
Roslis Lisp language. It is mainly
used in motion planning

: p:
libraries on ROS it is not as
popular as roscpp and
rospy.
Include the header files
and modules used in
ROS nodes.

Creating How to initialize a ROS


ROS Nodes node.

How to publish and to


subscribe a topic.
1: Header
Files and C++THE FIRST PYTHON  THE FIRST
ROS SECTION INCLUDES SECTION IMPORTS
THE HEADER FILES PYTHON MODULES
Modules Example: To create a ROS In Python, we have to
C++ node, we have to import modules to create
include the following a ROS node. The ROS
header files. module that we need to
#include "ros/ros.h" import is:
The ros.h has all the import rospy
headers required to
implement ROS
functionalities.
ROS Header files and Modules

• ROS message header:


• std_msgs: is a ROS Package that has a message definition of
standard data types, such as int, float, string, and so forth.

#include "std_msgs/String.h"
# include "std_msgs/Int32.h"
# include "std_msgs/Int64.h"

• If there is a custom message type, we can call it with the following syntax:

# include
"msg_pkg_name/message_name.h"

NOTE: The complete list of message types inside the std_msgs package is at
http://wiki.ros.org/std_msgs.
For python:

• rospy has all the important ROS functions. To import a


message type, we must import the specific modules, like
we did in C++.
The following is an example of importing a string message type in Python.
from std_msgs.msg import String
2: Initializing a
ROS Node
• This is a mandatory step in any ROS node.
• In C++, we initialize using the following line of code:

int main(int argc, char **argv)


{
ros::init(argc, argv, "name_of_node")
.....................
}

• Meanwhile In Python, we use the following line of code:

rospy.init_node('name_of_node',
anonymous=True);
Printing Messages in a ROS Node

• ROS_INFO(string_msg,args): Logging the information of


node
• ROS_WARN(string_msg,args): Logging warning of the
node
• ROS_DEBUG(string_msg ,args): Logging debug messages
• ROS_ERROR(string_msg ,args): Logging error messages
• ROS_FATAL(string_msg ,args): Logging Fatal messages
• Ex: ROS_DEBUG("Hello %s","World");
Creating ROS Node Handler

• After initializing the node, we have to create a NodeHandle


instance that starts the ROS node and other operations, like
publishing/subscribing a topic. We are using the
ros::NodeHandle instance to create those operations.
• In C++, the following shows how to create an instance of
ros::NodeHandle.
ros::NodeHandle nh;
• The rest of the operations in the node use the nh instance.
• In Python, we don’t need to create a handle; the rospy
module internally handles it.
Hello World Example
Steps to build the program

I. Creating the workspace


II. Creating a hello_world Package
III. Creating a ROS C++ Node
IV. Editing the CMakeLists.txt File
V. Building C++ Nodes
VI. Executing C++ Nodes
1. Creating the workspace

$mkdir –p ~/myHello/src
$cd ~/myHello/src
$catkin_init_workspace
$cd ..
$catkin_make
2. Creating a hello_world Package

$ cd ~/myHello/src
$ myHello/src $ catkin_create_package hello_world roscpp rospy std_msgs
Package.xml

is package.xml. As discussed, this file


has information about the package
and its dependencies

You can edit this file and add


dependencies, package information,
and other information to the package
CMakeLists.txt

The find_package() finds the necessary


dependencies of this package.
If these packages are not available, we
can’t able to build this package.

The catkin_package() is a catkin-


provide CMake macro used for specifying
catkin-specific information to the build
system.
3. Creating a ROS C++ Node

• The application can be


divided into two nodes.
• The first Node Is the talker
node which is responsible of
creating the message “Hello
World”
• The second node is the
listener node which will
subscribe to the talker topic
and thus receive the
messages sent by the talker
node through it
Creating a ROS C++ Node | Publisher Node

• Go to the src node and create a C++ file name it


“talker.cpp”
#include "ros/ros.h" with the followingwhile
code:(ros::ok())
{
#include "std_msgs/String.h"
std_msgs::String msg;
#include <sstream> std::stringstream ss;
int main(int argc, char **argv) ss << "hello world " << count;
msg.data = ss.str();
{ ROS_INFO("%s", msg.data.c_str());
ros::init(argc, argv, "talker"); chatter_pub.publish(msg);
ros::spinOnce();
ros::NodeHandle n;
Chapter 5 Programming with ROS
ros::Publisher chatter_pub = 193
n.advertise<std_ loop_rate.sleep();
msgs::String>("chatter", 1000); ++count;
}
ros::Rate loop_rate(10); return 0;
int count = 0; }
Creating a ROS C++ Node | Subscriber
Node
• #include "ros/ros.h"
• #include "std_msgs/String.h"
• void chatterCallback(const std_msgs::String::ConstPtr& msg)
• {
• ROS_INFO("I heard: [%s]", msg->data.c_str());
• }
• int main(int argc, char **argv)
• {
• ros::init(argc, argv, "listener");
• ros::NodeHandle n;
• ros::Subscriber sub = n.subscribe("chatter", 1000, chatterCallback);
• ros::spin();
• return 0;
• }
4. Editing the CMakeLists.txt File

• After saving the two files in


the hello_world/src folder, the
nodes need to be compiled to
create the executable. To do
this, we have to edit the
CMakeLists.txt file, which is
not too complicated. We need
to add four lines of code to
CMakeLists.txt.
5. Building C++ Nodes

After saving CMakeLists.txt, we can build the source code. The command to build the
nodes is catkin_make. Just switch to the workspace folder and execute the
catkin_make command.
To switch to the catkin_ws folder, assume that the workspace is in the home folder:
$ cd ~/catkin_ws
Executing the catkin_make command to build the nodes:
$ catkin_make
6. Executing C++ Nodes

• After building the nodes,


the executables are
generated inside the
catkin_ws/devel/lib/hello
_world/ folder
Executing C++ Nodes

• After creating the executable, we can run it on a Linux terminal:


• Starting roscore:
• $ roscore
• starting the talker node:
• $ rosrun hello_world talker
• The node prints messages on the terminal.
Check the list of ROS topics in the system by
using the following command:
• $ rostopic list
• The listener node can start in another terminal:
• $ rosrun hello_world listener
Open- RDK- Documentation &
Packages

• https://rdk.flexiv.com/manual/ros2_bridge.html
Evolution of ROS – Differences ROS1 &
2
• ROS has evolved significantly since its inception in 2007. It was initially developed at Willow Garage and later supported
by the Open Source Robotics Foundation (OSRF). Over the years, ROS has transitioned through multiple versions, each
bringing functionality, performance, and usability improvements. Initially designed for research purposes, ROS quickly
gained traction due to its modular architecture, facilitating collaboration and code reuse within the robotics community.
Its adaptability across various hardware platforms and open-source nature fueled its growth, making it a go-to
framework for robotics development worldwide.

• As ROS evolved, it expanded beyond research labs into industrial applications, enabling the development of complex
robotic systems for autonomous vehicles, industrial automation, healthcare, and more. As per the official ROS website,
over 740 businesses employed ROS in 2022. Such expansion was supported by the creation of ROS 2, addressing the
limitations of the original ROS and enhancing its capabilities for real-time and industrial-grade deployments.

• ROS Versions

• 1. ROS 1

• Initial development: ROS 1, also known as ‘Boxturtle’, was the first major release introduced in 2010. It laid the
groundwork for the ROS framework, primarily focusing on research and experimentation in robotics.

• Evolution and updates: Subsequent releases within ROS 1, named after different turtles such as Fuerte, Groovy,
Hydro, Indigo, Jade, Kinetic, Lunar, and Melodic, brought about improvements in stability, performance, and expanded
libraries for various functionalities.

• Limitations addressed by ROS 2: Despite its success, ROS 1 faced challenges related to real-time capabilities,
scalability, and support for modern architectures, leading to ROS 2’s development.

• 2. ROS 2

• Introduction and focus: ROS 2 was introduced in 2022 to address the limitations of ROS 1 and expand its capabilities
for more diverse and complex robotics applications, especially in industrial and commercial settings.

• Key features: ROS 2 brings several improvements, including better real-time performance, enhanced security,
increased modularity, improved middleware (using Data Distribution Service – DDS), and expanded platform support.

• Versions and advancements: ROS 2 versions include releases named after alphabetically ordered code names such
as Ardent, Bouncy, Crystal, Dashing, Eloquent, Foxy, and Galactic, with each iteration refining the system and making it
more suitable for industrial-grade deployments.
Evolution of ROS – Differences ROS1 &
2
• The transition from ROS 1 to ROS 2 signifies a shift toward more robust, scalable, and
real-time-capable robotics frameworks. ROS 2’s development is ongoing, with a focus
on addressing further industrial requirements, interoperability, and integration with
modern technologies, marking it as the future of ROS for a wide array of robotics
applications.
• What Is Robotic Process Automation (RPA)? Meaning, Working, Software, and Uses
• How Does ROS Work?
• Understanding how the robot operating system works involves delving into its core
concepts and the step-by-step processes it employs. Here’s a breakdown of the
workings of ROS into key technical steps:
• 1. Node creation
• The foundation of ROS lies in its nodes, which are individual processes responsible for
specific tasks. Developers create these nodes using ROS libraries in languages such as
C++ or Python. Each node typically performs a particular function, such as controlling
a sensor, processing data, or executing algorithms.
• 2. Mastering the ROS Master
• At the core of ROS is the ROS Master, a critical component that facilitates
communication among nodes. It acts as a centralized registry where nodes can find
each other. When a node starts, it registers with the ROS Master, providing information
about its name, type, and functionalities.
• 3. Communication via topics
• Nodes communicate with each other using a pub-sub model through topics. Topics are
named buses, where nodes can publish messages (publishers) or subscribe to receive
messages (subscribers). For instance, a camera node might publish images to a
‘camera’ topic, while an image processing node subscribes to this topic to receive and
process the images.
• 4. Services for request-response communication
• In addition to topics, ROS employs services for request-response communication
between nodes. A node provides a service with a specific functionality; other nodes can
call this service to request that functionality. For example, a node controlling a robotic
arm might offer a ‘move’ service that other nodes can call to instruct the arm’s
movement.
• 5. Parameter server for configuration
• ROS includes a parameter server that stores and manages dynamic configuration data.
Nodes can store and retrieve parameters from this server, allowing easy configuration
changes during runtime. Parameters can control various aspects, such as motor speeds,
algorithm parameters, or sensor configurations.
• 6. ROS packages and file system hierarchy
• ROS uses a specific file system hierarchy for organizing code into packages. A package
typically contains nodes, configuration files, launch files (scripts to start multiple
nodes), and other resources. This structure fosters modularity and reusability, enabling
developers to share and collaborate on specific functionalities or algorithms.
• 7. Tools for visualization and simulation
• ROS provides a suite of powerful tools for visualization and simulation, which are key
aspects of robotics development. Some of the key examples include:
• RQT: RQT is a powerful graphical user interface (GUI) framework within ROS that
provides a collection of plugins for visualization, data inspection, and interaction
with ROS nodes. It offers a customizable interface, allowing users to visualize data,
manipulate parameters, and interact with multiple nodes simultaneously.
• Stage: Stage is a 2D simulation environment within ROS that focuses on
simulating robot behaviors in a 2D space. It allows for quick prototyping and
testing of robot navigation algorithms in simplified environments.
• MoveIt!: MoveIt! is a ROS package specifically designed for motion planning and
manipulation. It offers tools for motion planning, kinematics, collision checking,
and grasping, facilitating the development and testing of robotic manipulation
tasks.
• ROS Control: ROS Control provides a framework to control robot joints and
actuators. It includes controllers for various types of robots, allowing users to
interface with hardware and control robot movements in simulation and real-world
scenarios.
• These tools, along with RViz and Gazebo, constitute a comprehensive suite within
ROS, offering a range of functionalities crucial to developing, testing, and
deploying robotic systems across different domains.
• 8. Integration of hardware abstraction
• ROS abstracts hardware interfaces, allowing nodes to communicate with various
sensors, actuators, and devices without worrying about low-level details. This
abstraction layer simplifies development by providing standardized interfaces for
different hardware components, promoting interoperability among robotic systems.
• 9. Message types and serialization
• Communication between nodes involves passing messages. ROS defines message types
for various data formats, such as integers, floats, images, and custom data structures.
These messages are serialized for transmission across the ROS network, allowing nodes
written in different languages to communicate seamlessly.
• 10. Scalability and adaptability
• ROS is designed to be highly scalable and adaptable to various robotic applications. Its
modular nature allows developers to add or remove nodes easily, enabling the creation of
complex robotic systems by combining different functionalities. Moreover, ROS supports
distributed computing, allowing nodes to run on multiple machines, enhancing
performance and scalability.
• In essence, ROS operates by providing a structured and modular framework for
developing robotics software. It abstracts complexities, enabling seamless communication
between nodes, organizing code into packages for easy sharing, and offering a suite of
tools for visualization, simulation, and hardware integration. This architecture empowers
developers to focus on building advanced robotic applications without getting entangled
in the intricacies of low-level system integration.
• Applications of a Robot Operating System
• ROS has found extensive applications across various domains in robotics due to its
flexibility, modularity, and rich set of tools. As per a July 2023 MarketsAndMarkets report,
the ROS market was valued at $581 million in 2023 and is projected to reach $1,082
million by the end of 2028. The report underscores Asia Pacific, Europe, and North
America as significant regional markets shaping the ROS landscape.
• With the adoption of ROS growing, we need to explore its diverse applications through
examples demonstrating its usage in various domains.
Introduction to ROS2 Basics
• Basics of Robotics & ROS
• Setting up the Development Environment
• Core ROS2 Concepts
• Hands-on Practice
Basics of ROS in Robotics

ROS, also known as Robot Operating System is a


middleware software that connects different
software components to exchange data using a
common communication channel and using
interfaces that are consistent between different
applications

Fun Fact : ROS sometimes is also interpreted as "Really Odd Stuff" or "Roughly Operating System." This reflects
the complexity and quirks users might encounter while working with it
ROS1 vs ROS2 Key Differences
ROS1 vs ROS2 Differences

Communication Decentralized architecture : No ROS master; No global parameters


Services are synchronous in ROS1 while asynchronous in ROS2
Actions are part of ROS 2 core and was absent in ROS 1
Quality of service policies can be defined and fine tuned

Building Environment The build tool changed from from catkin to colcon
A single command line tool (ros2) is used, with different options (pkg, node, run, launch,…)
Reorganization in the package structure, mainly for the Python packages

Coding Style A convention to write nodes has been introduced


Many nodes can run in the same executable
Launch files are written in Python, which gives more flexibility
The new feature of Live cycle nodes allow to have nodes in different states (Unconfigured, Inactive,
Finalized, Active)

The TurtleBot robot, a popular platform for ROS learning, is often nicknamed "Turtle." This playful
name adds a touch of lightheartedness to the learning process.
ROS2 Design
ROS 2 provides a convention on
writing nodes using inherited
Node class with all functionalities
The basic functionality of all ROS 2 elements
are implemented in a single C library called rcl;
then the libraries rclcpp and rclpy adapt this
functionality to the particularities of each
language, C++ and Python

ROS Middleware Layer ROS 2 is based on the


Data Distribution Service (DDS), an open
standard for communications implemented
over UDP. ROS1 : XMLRPC protocol

ROS1 was designed and used on only Linux.


However ROS2 is compatible with Windows
and IOS too.
Deep Dive into ROS2 Concepts
• Introduction to C++ in ROS2
• Advanced Programming and Customization
Developing ROS2 C++ Application
C++ in ROS2: Setting Up the Environment
sudo apt update
sudo apt upgrade –y

Install Git : sudo apt install git


Install VS Code : sudo snap install --classic code
Install Packages for ROS and C++ in VS Code
Remote – Development (from Microsoft)
URDF (from smilerobotics)
ROS - from Microsoft
Creating ROS2 Workspace
sudo apt install python3-colcon-common-extensions If Colcon is not installed in your system

mkdir -p ~/ros2_ws/src && cd ~/ros2_ws Create ros2_ws and Change Directory into it

git clone https://github.com/ros2/examples src/examples -b humble Clone git into ros2_ws

colcon build --symlink-install Build the examples folder

source install/setup.bash Source local folder. You can also use colcon test to test our build

ros2 run examples_rclcpp_minimal_subscriber Run a subscriber node in a terminal


subscriber_member_function

ros2 run examples_rclcpp_minimal_publisher Run publisher node in another terminal


publisher_member_function
Cloning Sample Repo
git clone https://github.com/ros/ros_tutorials.git -b humble Clone ros_tutorials package in our workspace

git clone https://github.com/ros/ros_tutorials.git -b humble Resolve any dependancies

colcon build Build the workspace


source /opt/ros/humble/setup.bash Source underlay and overlay
source install/local_setup.bash

ros2 run turtlesim turtlesim_node Run turtlesim node

• We can also modify the turtlesim node; goto ~/ros2_ws/src/ros_tutorials/turtlesim/src and open
turtle_frame.cpp in VS Code.
• Change setWindowTitle("TurtleSim"); to setWindowTitle(“myTurtleSim");
• Colcon build in ros2_ws
• Run ros2 run turtlesim turtlesim_node

Even though turtlesim is installed the overlay takes precendence


Creating ROS2 Package
A package is an organizational unit for your ROS 2 code. If you want to be able to install your code or share
it with others, then you’ll need it organized in a package. A ROS2 package consists of the following:

Now, lets create a package in ROS2 Workspace and use them


ros2 pkg create --build-type ament_cmake --license Apache-2.0 --node- Create a package in ros2_ws. You will now have a new folder within
name my_node my_package your workspace’s src directory called my_package. Check the contents

colcon build --packages-select my_package Build the package. In this command, only my_package is built and not
all other packages
source install/local_setup.bash Source the workspace
ros2 run my_package my_node To run the executable you created using the --node-name argument
during package creation
Creating Simple Publisher Node
ros2 pkg create --build-type ament_cmake --license Apache-2.0 Navigate into the ros2_ws/src and run this command. Make sure the
cpp_pubsub folder is sourced.

wget -O publisher_member_function.cpp Download the publisher node and examine the contents of
https://raw.githubusercontent.com/ros2/examples/humble/rclcpp/topi publisher_member_function.cpp. Use VS Code to view the contents
cs/minimal_publisher/member_function.cpp

• Navigate to ros2_ws/src/cpp_pubsub folder and check if CMakeLists.txt and package.xml is created


• Open package.xml and fill in <description>, <maintainer> and <license> tags
<depend>rclcpp</depend> After ament_cmake, add below two lines as package needs rclcpp and
<depend>std_msgs</depend> std_msgs in package.xml
find_package(rclcpp REQUIRED) Open CMakeLists.txt and add below lines after existing :
find_package(std_msgs REQUIRED) find_package(ament_cmake REQUIRED)

add_executable(talker src/publisher_member_function.cpp) Add executable and name it talker so that we can use ros2 run
ament_target_dependencies(talker rclcpp std_msgs)
install(TARGETS Lastly, add install(TARGETS..) so that our ros2 run can find the
talker executable
DESTINATION lib/${PROJECT_NAME})
Creating Simple Subscriber Node
wget -O subscriber_member_function.cpp Download the subscriber node and examine the contents of
https://raw.githubusercontent.com/ros2/examples/humble/rclcpp/topi subscriber_member_function.cpp. There is no timer here as subscriber
cs/minimal_subscriber/member_function.cpp only needs to wait for whatever data published

add_executable(listener src/subscriber_member_function.cpp) After ament_cmake, add below two lines as package needs rclcpp and
ament_target_dependencies(listener rclcpp std_msgs) std_msgs in package.xml
install(TARGETS
talker
listener
DESTINATION lib/${PROJECT_NAME})

rosdep install -i --from-path src --rosdistro humble –y # install any dependancies


colcon build --packages-select cpp_pubsub # to build the package
Source the files in a new terminal : source install/setup.bash
ros2 run cpp_pubsub talker
ros2 run cpp_pubsub listener
Setting Up the Environment
printenv | grep -i ROS Check if environment variables are setup correctly. If not,
ROS_VERSION=2 reinstall.
ROS_PYTHON_VERSION=3 https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debi
ROS_DISTRO=humble ans.html

source /opt/ros/humble/setup.bash Use this command on every new terminal to have access to ROS
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc 2 commands

export ROS_DOMAIN_ID=<your_domain_id> Isolates different ROS2 systems running on the same network
echo "export ROS_DOMAIN_ID=<your_domain_id>" >> ~/.bashrc

export ROS_LOCALHOST_ONLY=1 Environment variable allows you to limit ROS 2 communication


echo "export ROS_LOCALHOST_ONLY=1" >> ~/.bashrc to localhost only

mkdir –p ros2_ws/src
colcon build
Creating a workspace

ros2 run demo_nodes_cpp talker Testing if everything is setup and working. Repeat the demo
ros2 run demo_nodes_cpp listener codes using _py for running python code

ROS users sometimes refer to the "ROS dance" or the "ROS shuffle," which describes the process of debugging
and troubleshooting issues, often involving trial and error and a bit of head-scratching.
Core ROS Concepts
Nodes: Independent processes that perform specific
tasks within a robot application
Topics: Channels for data exchange between nodes
using standardized message types
Services: Mechanisms for requesting specific
functionalities from other nodes
ROS Tools : roscore, rostopic, rosrun, rqt_console
rviz: 3D visualization tool for robot models, sensor
data, and robot paths.
ROS website: Extensive documentation, tutorials,
and community forums. https://www.ros.org/
Hands On
sudo apt install ros-humble-turtlesim Install turtlesim

ros2 pkg executables turtlesim Check if installation is successful

ros2 run turtlesim turtlesim_node Run the simulation

ros2 run turtlesim turtle_teleop_key Keyboard Control Turtle

ros2 node list


ros2 topic list
Use the list command associated with the
ros2 service list topics services and actions
ros2 action list

sudo apt install ~nros-humble-rqt* Install rqt

rqt Start rqt viewer


ros2 run turtlesim turtle_teleop_key --ros-args --remap To Remap a new turtle
turtle1/cmd_vel:=turtle2/cmd_vel
ROS2 Nodes
Nodes: Independent processes that perform specific tasks within a robot application
ros2 runs an executable from the package. Here we run
turtlesim node
ros2 run turtlesim turtlesim_node

List is used to view all running nodes


ros2 node list

Open teleop node in another window. Now run list again


ros2 run turtlesim turtle_teleop_key # in a new window

ros2 run turtlesim turtlesim_node --ros-args --remap Remap node like we did before for teleop. ros2 node list after
this to see all nodes mapped
__node:=my_turtle

All information about our turtle node


ros2 node info /my_turtle
ROS2 Topics
Topics: Channels for data exchange between nodes using standardized message types
ros2 run turtlesim turtlesim_node Open turtle simulation and another window,
ros2 run turtlesim turtle_teleop_key open teleop
rqt_graph You can also open rqt and then plugins >
introspection > node graph
ros2 topic list Check all topics listed

ros2 topic echo /turtle1/cmd_vel All published data of cmd_vel is shown. Move
turtle for change of values. Recheck rqt_graph
for new topic
ros2 interface show geometry_msgs/msg/Twist Shows linear and angular velocity of turtle

ros2 topic pub --once /turtle1/cmd_vel Repeat the same without using –once. Once is
geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, an optional argument
angular: {x: 0.0, y: 0.0, z: 1.8}}"
ros2 topic echo /turtle1/pose Here we see that turtlesim is also publishing
pose topic
Interesting Facts

• ROS2 is not a complete rewrite of ROS1, but rather a significant


evolution. It addresses limitations of ROS1 while maintaining
compatibility with existing code to some degree.
• ROS has been used in a variety of surprising applications beyond
robotics, including self-driving cars, drones, and even agricultural
robots tending to crops.
• The ROS community is known for its welcoming and supportive
nature. Many experienced users are willing to help beginners,
fostering a collaborative environment.
• The name "ROS" was chosen as a neutral term to avoid favoring
any specific robot platform or vendor. This aligns with its goal of
being a widely adopted and open-source framework.
Introduction to ROS2 Robots
• ROS2 Transforms
• ROS Visualization (rViz2)
• Visualization in Gazebo
• Questions
Introduction to ROS2 Transforms (tf)
Transforms are a fundamental concept used to represent the position and orientation
(Pose) of objects, sensors, and coordinate frames within a robotic system.

A frame refers to the coordinate system describing an object's


position and orientation, typically along x, y, and z axes in
space. For example, a robot may have frames for its base, its
camera, its gripper, etc.

A transform describes the relationship between two


coordinate frames. It consists of a translation (x, y, z) and a
rotation that specifies how one frame is positioned and
oriented relative to another.

These transforms allow robots to understand and navigate


their environment by providing a consistent way to relate the
position and orientation of different components relative to
each other. ROS2 uses a tree structurer to handle and
connect all the transforms in a system, handled by tf package.
Introduction to ROS2 Transforms (tf)
Install terminator
sudo apt install terminator

sudo apt-get install ros-humble-rviz2 ros-humble- To install rviz2, python examples to


turtle-tf2-py ros-humble-tf2-ros ros-humble-tf2- demonstrate TF2 library with turtlesim, TF2
tools ros-humble-turtlesim library, TF2 tools, and turtlesim
Opens a demo file to launch 2 turtles
ros2 launch turtle_tf2_py
turtle_tf2_demo.launch.py
Teleop Keyboard Control
ros2 run turtlesim turtle_teleop_key

Demonstrates using tf2 library to set up three coordinate frames in ROS: world, turtle1, and turtle2. It employs
a tf2 broadcaster to publish the turtle frames and a tf2 listener to calculate the positional differences between
the turtles, enabling one turtle to follow the other. view_frames creates diagram of frames being broadcasted.
View frames in pdf format in a 5 second interval
ros2 run tf2_tools view_frames

ros2 run tf2_ros tf2_echo turtle2 turtle1 See transform values displayed on the
screen. Move turtles to see values change
* Terminator Controls : Ctrl+Shft+O and Ctrl+Shft+E to split. Ctrl+Shft+W and Ctrl+Shft+Q to close. Ctrl+Shft+I for new window
ROS2 Visualization (rViz)
rviz2 is a 3D visualization tool that is useful for examining tf2 frames.
ros2 run rviz2 rviz2 or simply rviz2 to open rviz window
ros2 run rviz2 rviz2 -d $(ros2 pkg prefix --share Opens rViz windows. Make sure tf demo is
turtle_tf2_py)/rviz/turtle_rviz.rviz running and turtles still alive. World is
getting hotter everyday and turtles are
endangered
In the side bar you will see the frames broadcast by tf2. As you drive the turtle around you will see
the frames move in rviz. In the next slide, we will understand the units that make a rViz screen
Tools

Displays
3D Window View Cameras

Display Status

Add for more Displays


Gazebo Simulation (Ignition)
Gazebo is a powerful robotics simulator to simulate the behavior and interaction of
robots in virtual environment. Gazebo Ignition is a next-generation physics-based
simulation platform designed for scalability, performance, and cloud-based simulation. It
aims to address some of the limitations of traditional simulation platforms like Gazebo
Opens a populated Gazebo Window
ign gazebo -v 4 -r visualize_lidar.sdf
To list of topics created by Gazebo
ign topic -l
sudo apt-get install ros-humble-ros-ign-bridge ros_gz_bridge is bridge between ROS2 and
Gazebo. This installs bridge package

ros2 run ros_gz_bridge parameter_bridge source /opt/ros/humble/setup.bash


/model/vehicle_blue/cmd_vel@geometry_msgs/msg/Twist]igniti Create a bridge to talk to
on.msgs.Twist vehicle_blue topic
Install twist keyboard pkg if not installed
sudo apt-get install ros-humble-teleop-twist-keyboard
Control the vehicle using keyboard. Cmd_vel is
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros- remapped here
args -r /cmd_vel:=/model/vehicle_blue/cmd_vel
SILIRIS TECHNOLOGIES
COMPANY PROFILE
About Us - SILIRIS
SILIRIS Technologies is a private limited company with
multiple entities working on various fields of robotics,
electronics, artificial intelligence (AI), PCB
manufacturing, Laser Services and Electric Vehicles. We
also provide support software to help users build their
own robot.
VEEROBOT® is an electronic manufacture and
distribution division of SILIRIS Technologies Pvt. Ltd. with
our offices in Bangalore and Pune and worldwide digital
presence.

We have been helping turn ideas into reality since 2013.


Whether its an Arduino shield, raspberry pi hat, or those
nifty tiny sensor modules, Our boards and modules are
used everywhere to explore the frontier of electronics
and robotics or simply building a robot for schools and
colleges or maybe prototyping different products. No
matter the vision, our products, components and
resources are designed to broaden access to technology
and make way to a finished project. We're here to
support users create something new, something creative
to reach an end goal on the electronics and robotics
front.

Website : https://siliris.com
E-Commerce : https://veerobot.com
Our Portfolio
From PCB manufacturing to Robot building, we have our foot set
everywhere
PCB
Design to
Assembly

Li-Po / Li-Ion
Battery
Hobby
Drones Packs
Robot Kits
/ UAV’s

Surveillan
ce
Robots

Customized
Solutions Electric
Cycles
Arms & Grippers Sensors & Modules

Hobby
Robot Kits

Hobby Robot Kits Electronic Kits & Components


Surveillan
ce
Robots
Beetle Robot Ground Station

Wolf – RC Platform Wolf – ROS Platform


Surveillance Drones Ready to Fly Drones

Drones
/ UAV’s

Racing Drones
Drones Kits
Li-Po / Li-Ion
Battery Standard ebike / eScooter Customized Lithium based Battery Solutions
Packs Batteries
PCB
Design to Rigid 1-2 Sided Rigid Flex
Assembly

Standard Others / Custom Assembly &


Multilayer Designs Testing

You might also like