Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering ROS for Robotics Programming

You're reading from   Mastering ROS for Robotics Programming Design, build, and simulate complex robots using the Robot Operating System

Arrow left icon
Product type Paperback
Published in Feb 2018
Publisher Packt
ISBN-13 9781788478953
Length 580 pages
Edition 2nd Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Lentin Joseph Lentin Joseph
Author Profile Icon Lentin Joseph
Lentin Joseph
Jonathan Cacace Jonathan Cacace
Author Profile Icon Jonathan Cacace
Jonathan Cacace
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Title Page
Copyright and Credits
www.PacktPub.com
Contributors
Preface
1. Introduction to ROS FREE CHAPTER 2. Getting Started with ROS Programming 3. Working with 3D Robot Modeling in ROS 4. Simulating Robots Using ROS and Gazebo 5. Simulating Robots Using ROS and V-REP 6. Using the ROS MoveIt! and Navigation Stack 7. Working with pluginlib, Nodelets, and Gazebo Plugins 8. Writing ROS Controllers and Visualization Plugins 9. Interfacing I/O Boards, Sensors, and Actuators to ROS 10. Programming Vision Sensors Using ROS, Open CV, and PCL 11. Building and Interfacing Differential Drive Mobile Robot Hardware in ROS 12. Exploring the Advanced Capabilities of ROS-MoveIt! 13. Using ROS in MATLAB and Simulink 14. ROS for Industrial Robots 15. Troubleshooting and Best Practices in ROS 1. Other Books You May Enjoy Index

Converting xacro to URDF


After designing the xacro file, we can use the following command to convert it to a URDF file:

$ rosrun xacro xacro pan_tilt.xacro --inorder > pan_tilt_generated.urdf

The --inorder option has been recently introduced in ROS to increase the power of the conversion tool. It allows us to process the document in read order, adding more features than there were in older ROS versions.

We can use the following line in the ROS launch file for converting xacro to URDF and use it as a robot_description parameter:

  <param name="robot_description" command="$(find xacro)/xacro --inorder 
 $(find mastering_ros_robot_description_pkg)/urdf/pan_tilt.xacro" 
 /> 

We can view the xacro of pan-and-tilt by making a launch file, and it can be launched using the following command:

$ roslaunch mastering_ros_robot_description_pkg view_pan_tilt_xacro.launch
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 £13.99/month. Cancel anytime
Visually different images