最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。

ROS アプリケーションの例

ROS および Gazebo のアプリケーションをシミュレートし、TurtleBot® ハードウェアに接続

以下の例では、ROS、実際のロボットおよびシミュレーター用に、特定のアプリケーションを作成する方法を説明します。これらを使用して、物理的ハードウェアおよびソフトウェア シミュレーション システムの要件について学習します。ロボットの設定情報については、Get Started with Gazebo and a Simulated TurtleBotおよびGet Started with a Real TurtleBotを参照してください。

トピック

ROS アプリケーション

Feedback Control of a ROS-Enabled Robot

Use Simulink® to control a simulated robot running in a separate ROS-based simulator.

Feedback Control of a ROS-enabled Robot over ROS 2

This example shows you how to use Simulink® to control a simulated robot running in a Gazebo® robot simulator over ROS 2 network.

Automated Parking Valet with ROS in MATLAB

This example shows how to distribute the Automated Parking Valet (Automated Driving Toolbox) application among various nodes in a ROS network. Depending on your system, this example is provided for ROS and ROS 2 networks using either MATLAB® or Simulink® . The example shown here uses ROS and MATLAB. For the other examples, see:

Sign Following Robot with ROS in MATLAB

This example shows you how to use MATLAB® to control a simulated robot running on a separate ROS-based simulator over a ROS network. The example shown here uses ROS and MATLAB. For the other examples with ROS 2 or Simulink®, see:

Gazebo

Get Started with Gazebo and a Simulated TurtleBot

This example shows how to set up the Gazebo® simulator engine. This example prepares you for further exploration with Gazebo and also for exploration with a simulated TurtleBot®.

Add, Build, and Remove Objects in Gazebo

This example explores more in-depth interaction with the Gazebo® Simulator from MATLAB®. Topics include creating simple models, adding links and joints to models, connecting models together, and applying forces to bodies.

Apply Forces and Torques in Gazebo

This example illustrates a collection of ways to apply forces and torques to models in the Gazebo® simulator. First, application of torques is examined in three distinct ways using doors for illustration. Second, two TurtleBot® Create models demonstrate the forcing of compound models. Finally, object properties (bounce, in this case) are examined using basic balls.

Test Robot Autonomy in Simulation

This example explores MATLAB® control of the Gazebo® Simulator.

TurtleBot

Get Started with a Real TurtleBot

This example shows how to connect to a TurtleBot® using the MATLAB® ROS interface. You can use this interface to connect to a wide range of ROS-supported hardware from MATLAB. If you are using a TurtleBot in Gazebo® refer to the Get Started with Gazebo and a Simulated TurtleBot example.

Get Started with Gazebo and a Simulated TurtleBot

This example shows how to set up the Gazebo® simulator engine. This example prepares you for further exploration with Gazebo and also for exploration with a simulated TurtleBot®.

Communicate with the TurtleBot

This example introduces the TurtleBot® platform and the ways in which MATLAB® users can interact with it. Specifically, the code in this example demonstrates how to publish messages to the TurtleBot (such as velocities) and how to subscribe to topics that the TurtleBot publishes (such as odometry).

Explore Basic Behavior of the TurtleBot

This example helps you to explore basic autonomy with the TurtleBot®. The described behavior drives the robot forward and changes its direction when there is an obstacle. You will subscribe to the laser scan topic and publish the velocity topic to control the TurtleBot.

Control the TurtleBot with Teleoperation

This example shows keyboard control of the TurtleBot® through the use of the ExampleHelperTurtleBotCommunicator class. The instructions describe how to set up the object and how to start the keyboard control. Instructions on how to use keyboard control are displayed when the function is launched. To change parameters of the function, edit the exampleHelperTurtleBotKeyboardControl function or the ExampleHelperTurtleBotKeyInput class. For an introduction to using the TurtleBot with MATLAB®, see the getting started examples (Get Started with a Real TurtleBot or Get Started with Gazebo and a Simulated TurtleBot)

Obstacle Avoidance with TurtleBot and VFH

This example shows how to use a TurtleBot® with Vector Field Histograms (VFH) to perform obstacle avoidance when driving a robot in an environment. The robot wanders by driving forward until obstacles get in the way. The controllerVFH (Navigation Toolbox) object computes steering directions to avoid objects while trying to drive forward.

Track and Follow an Object

In this example, you explore autonomous behavior that incorporates the Kinect® camera. This algorithm involves the TurtleBot® looking for a blue ball and then staying at a fixed distance from the ball. You incorporate safety features, such as bump and cliff sensing.