Chapter 10. Controlling Baxter with MATLAB©

In Chapter 6, Wobbling Robot Arms Using Joint Control, Baxter the two-armed robot was described. The purpose of this final chapter is to spark your imagination by presenting control of Baxter using the MathWorks© MATLAB Robotics System Toolbox. The MathWorks corporation produces the popular MATLAB software that is widely used in industry and academia. In addition to the MATLAB software for mathematical operations and visualization, modules called add-ons can be added to the software.

The Robotics System Toolbox add-on considered in this chapter allows us to use MATLAB scripts using ROS commands to control robots. For users of MATLAB, this capability opens up new possibilities to design and implement sophisticated robotic programs for applications.

In this chapter, we will introduce the following:

  • Installing the MATLAB Robotics System Toolbox
  • Using MATLAB and ROS with the Robotics System Toolbox
  • Controlling Baxter with the Robotics System Toolbox

References for MATLAB software and the Robotics System Toolbox can be found at the following websites:

https://www.mathworks.com/

https://www.mathworks.com/products/robotics.html

Installing the MATLAB Robotics System Toolbox

Versions of MATLAB and its add-on toolboxes are updated as often as twice a year. For example, the version for our Linux operating systems is using MATLAB R2017b and version 1.5 of the Robotics System Toolbox. To add the toolbox, visit the following website:

https://www.mathworks.com/help/robotics/ug/install-robotics-system-toolbox-support-packages.html?s_tid=srchtitle

After MATLAB is installed and running, do the following to load the Robotics System Toolbox:

  • Go the Home tab of MATLAB and the Environment section
  • Click Add-Ons on the menu and choose Get Add-Ons from the dropdown menu

There appears a screen with a number of possible add-ons including the Robotics System Toolbox. If you have paid for the toolbox, simply choose it and download it.

MATLAB and the toolboxes are not open source. They must be purchased from the MathWorks corporation. In some cases, trial versions or reduced price student versions of the software are available.

Check the MATLAB and Robotics System Toolbox versions

In the MATLAB Command window, type the following command:

>> ver

Then, check from the output the version of MATLAB that is present and the toolboxes that are installed.

View the Robotics System Toolbox commands for ROS

In the MATLAB Command window, type the following command:

>> help robotics

This allows you to see the version of the toolbox and a list of the ROS commands and other commands useful for robotics.

Clicking on View Examples in the Command window brings up a window showing the Robotics System Toolbox examples, including several using a real TurtleBot and TurtleBot in simulation using Gazebo.

For a shortened version with just ROS commands, type the following in the command window:

>> help robotics.ROS
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.214.215