Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learning ROS for Robotics Programming Second Edition
  • Toc
  • feedback
Learning ROS for Robotics Programming Second Edition

Learning ROS for Robotics Programming Second Edition

By : Mahtani, Aaron Martinez
4 (8)
close
Learning ROS for Robotics Programming Second Edition

Learning ROS for Robotics Programming Second Edition

4 (8)
By: Mahtani, Aaron Martinez

Overview of this book

If you have ever tried building a robot, then you know how cumbersome programming everything from scratch can be. This is where ROS comes into the picture. It is a collection of tools, libraries, and conventions that simplifies the robot building process. What’s more, ROS encourages collaborative robotics software development, allowing you to connect with experts in various fields to collaborate and build upon each other's work. Packed full of examples, this book will help you understand the ROS framework to help you build your own robot applications in a simulated environment and share your knowledge with the large community supporting ROS. Starting at an introductory level, this book is a comprehensive guide to the fascinating world of robotics, covering sensor integration, modeling, simulation, computer vision, navigation algorithms, and more. You will then go on to explore concepts like topics, messages, and nodes. Next, you will learn how to make your robot see with HD cameras, or navigate obstacles with range sensors. Furthermore, thanks to the contributions of the vast ROS community, your robot will be able to navigate autonomously, and even recognize and interact with you in a matter of minutes. What’s new in this updated edition? First and foremost, we are going to work with ROS Hydro this time around. You will learn how to create, visualize, and process Point Cloud information from different sensors. This edition will also show you how to control and plan motion of robotic arms with multiple joints using MoveIt! By the end of this book, you will have all the background you need to build your own robot and get started with ROS.
Table of Contents (12 chapters)
close
11
Index

How distance sensors send messages


If you have uploaded the code correctly to Arduino and serial_node.py, it's working well and we can see the topic name /range in the topic list:

$ rostopic list

You can learn about the type of the topic as usual by using the rostopic type:

$ rostopic type /range
std_msgs/Int16

If you want to check the data contained in the messages, we should type the following:

$ rostopic echo /range

You can play with this sensor, pointing it at objects at different distances.

Creating an example to use the ultrasound range

In this example, the ultrasound sensor will command the turtle of the turtlesim node. The example is programmed to behave depending on the distance to objects. This way, it is possible to avoid obstacles, publishing geometry_msgs/Twist in turtlesim1/cmd_vel. When the ultrasound finds an object too close, that is, less than 20 cm, the turtle will go backward. If an obstacle is found at a middle distance, that is, between 20 and 40 cm, the turtle will turn...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete