Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Robotics using Python. - Second Edition

You're reading from  Learning Robotics using Python. - Second Edition

Product type Book
Published in Jun 2018
Publisher Packt
ISBN-13 9781788623315
Pages 280 pages
Edition 2nd Edition
Languages
Concepts
Author (1):
Lentin Joseph Lentin Joseph
Profile icon Lentin Joseph
Toc

Table of Contents (12) Chapters close

Preface 1. Getting Started with Robot Operating System 2. Understanding the Basics of Differential Robots 3. Modeling the Differential Drive Robot 4. Simulating a Differential Drive Robot Using ROS 5. Designing ChefBot Hardware and Circuits 6. Interfacing Actuators and Sensors to the Robot Controller 7. Interfacing Vision Sensors with ROS 8. Building ChefBot Hardware and the Integration of Software 9. Designing a GUI for a Robot Using Qt and Python 10. Assessments 11. Other Books You May Enjoy

Writing a ROS Python driver for ChefBot

After uploading the embedded code to LaunchPad, the next step is to handle the serial data from LaunchPad and convert it to ROS topics for further processing. The launchpad_node.py ROS Python driver node interfaces Tiva-C LaunchPad with ROS. The launchpad_node.py file is in the script folder, which is inside the ChefBot_bringup package. The following is an explanation of the important code sections of launchpad_node.py:

#ROS Python client 
import rospy 
import sys 
import time 
import math 
 
#This python module helps to receive values from serial port which execute in a thread 
from SerialDataGateway import SerialDataGateway 
#Importing required ROS data types for the code 
from std_msgs.msg import Int16,Int32, Int64, Float32, 
String, Header, UInt64 #Importing ROS data type for IMU from sensor_msgs.msg import Imu

The launchpad_node...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime