Book Image

ROS Robotics By Example

Book Image

ROS Robotics By Example

Overview of this book

The visionaries who created ROS developed a framework for robotics centered on the commonality of robotic systems and exploited this commonality in ROS to expedite the development of future robotic systems. From the fundamental concepts to advanced practical experience, this book will provide you with an incremental knowledge of the ROS framework, the backbone of the robotics evolution. ROS standardizes many layers of robotics functionality from low-level device drivers to process control to message passing to software package management. This book provides step-by-step examples of mobile, armed, and flying robots, describing the ROS implementation as the basic model for other robots of these types. By controlling these robots, whether in simulation or in reality, you will use ROS to drive, move, and fly robots using ROS control.
Table of Contents (17 chapters)
ROS Robotics By Example
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Creating a custom ROS game controller interface


If you have played with the joystick with either Baxter or Crazyflie, you may think that the function of certain buttons or joysticks would be better with your own special design. Each type of game controller has one or more joysticks and various buttons or triggers to cause events depending on the game software being used. Here, for the Microsoft Xbox controller, we will do the following:

  • Show how to determine the mapping between controller joysticks, buttons, and triggers and the number corresponding to each using a graphical package, jstest-gtk

  • Use the terminal command jstest; this will enable you to determine the corresponding numbers of controller joysticks, buttons, and triggers

The ensuing diagram shows the Xbox 360 game controller. Pushing a button changes the output from 0 (off) to 1 (on) on the channel corresponding to the pushed button, which in turn can be read by a program and used to start an application. Moving the stick outputs...