Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering ROS for Robotics Programming

You're reading from  Mastering ROS for Robotics Programming

Product type Book
Published in Dec 2015
Publisher Packt
ISBN-13 9781783551798
Pages 480 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Lentin Joseph Lentin Joseph
Profile icon Lentin Joseph

Table of Contents (19) Chapters

Mastering ROS for Robotics Programming
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Introduction to ROS and Its Package Management Working with 3D Robot Modeling in ROS Simulating Robots Using ROS and Gazebo Using the ROS MoveIt! and Navigation Stack Working with Pluginlib, Nodelets, and Gazebo Plugins Writing ROS Controllers and Visualization Plugins Interfacing I/O Boards, Sensors, and Actuators to ROS Programming Vision Sensors using ROS, Open-CV, and PCL Building and Interfacing Differential Drive Mobile Robot Hardware in ROS Exploring the Advanced Capabilities of ROS-MoveIt! ROS for Industrial Robots Troubleshooting and Best Practices in ROS Index

Visualizing the robot 3D model in RViz


After designing URDF, we can view it on RViz. We can create a view_demo.launch launch file and put the following code into the launch folder. Navigate to chapter_2_code/mastering_ros_robot_description_pkg/launch for the same code:

<launch>
  <arg name="model" />
  <param name="robot_description" textfile="$(find mastering_ros_robot_description_pkg)/urdf/pan_tilt.urdf" />
  <param name="use_gui" value="true"/>

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find mastering_ros_robot_description_pkg)/urdf.rviz" required="true" />

</launch>

We can launch the model using the following command:

$ roslaunch mastering_ros_robot_description_pkg view_demo.launch

If everything works fine, we will get a pan and tilt mechanism...

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 $15.99/month. Cancel anytime}