Book Image

ROS Robotics Projects - Second Edition

By : Ramkumar Gandhinathan
Book Image

ROS Robotics Projects - Second Edition

By: Ramkumar Gandhinathan

Overview of this book

Nowadays, heavy industrial robots placed in workcells are being replaced by new age robots called cobots, which don't need workcells. They are used in manufacturing, retail, banks, energy, and healthcare, among other domains. One of the major reasons for this rapid growth in the robotics market is the introduction of an open source robotics framework called the Robot Operating System (ROS). This book covers projects in the latest ROS distribution, ROS Melodic Morenia with Ubuntu Bionic (18.04). Starting with the fundamentals, this updated edition of ROS Robotics Projects introduces you to ROS-2 and helps you understand how it is different from ROS-1. You'll be able to model and build an industrial mobile manipulator in ROS and simulate it in Gazebo 9. You'll then gain insights into handling complex robot applications using state machines and working with multiple robots at a time. This ROS book also introduces you to new and popular hardware such as Nvidia's Jetson Nano, Asus Tinker Board, and Beaglebone Black, and allows you to explore interfacing with ROS. You'll learn as you build interesting ROS projects such as self-driving cars, making use of deep learning, reinforcement learning, and other key AI concepts. By the end of the book, you'll have gained the confidence to build interesting and intricate projects with ROS.
Table of Contents (14 chapters)

Visualizing Leap Motion data in RViz

We can also visualize Leap Motion data in RViz. There is a ROS package called leap_client (https://github.com/qboticslabs/leap_client).

You can install this package by setting the following environment variable in ~/.bashrc:

export LEAPSDK=$LEAPSDK:$HOME/LeapSDK

Note that when we add new variables in ~/.bashrc, you may need to open a new Terminal or type bash into the existing Terminal.

Now, we can clone the code in a ROS workspace and build the package using catkin_make. Let's play around with this package:

  1. To launch the nodes, we have to start LeapControlPanel:
$ sudo LeapControlPanel
  1. Then, start the ROS Leap Motion driver launch file:
$ roslaunch leap_motion sensor_sender.launch  
  1. Now launch the leap_client launch file to start the visualization nodes. This node will subscribe to the leap_motion driver and convert it into visualization...