Book Image

ROS Robotics Projects

Book Image

ROS Robotics Projects

Overview of this book

Robot Operating System is one of the most widely used software frameworks for robotic research and for companies to model, simulate, and prototype robots. Applying your knowledge of ROS to actual robotics is much more difficult than people realize, but this title will give you what you need to create your own robotics in no time! This book is packed with over 14 ROS robotics projects that can be prototyped without requiring a lot of hardware. The book starts with an introduction of ROS and its installation procedure. After discussing the basics, you’ll be taken through great projects, such as building a self-driving car, an autonomous mobile robot, and image recognition using deep learning and ROS. You can find ROS robotics applications for beginner, intermediate, and expert levels inside! This book will be the perfect companion for a robotics enthusiast who really wants to do something big in the field.
Table of Contents (20 chapters)
ROS Robotics Projects
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Visualizing IMU TF in Rviz


In this section, we are going to visualize the TF data from Arduino on Rviz. Here's the procedure to do that.

Plug the Arduino to the PC and find the Arduino's serial port. To get topics from the Arduino-ROS node, we should start a ROS serial server on the PC, listening on the Arduino serial port. We did this in Chapter 4, Controlling Embedded Boards Using ROS. Still, let's look at the commands again in this section too.

Starting roscore first:

$ roscore

Starting the ROS serial server:

$ rosrun rosserial_python serial_node.py /dev/ttyACM0

You can get the following topics when you run the previous node:

Figure 9: Listing ROS topics from Arduino

You can simply echo these topics, or visualize the TF data on Rviz. You can run Rviz using the following command. The base_link option is the fixed frame, and we can mention that on the command line itself.

$ rosrun rviz rviz -f base_link

The Rviz window will pop up, and if there is no TF option on the left-hand side of Rviz...