Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

ROS アプリケーションの例

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

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

トピック

ROS アプリケーション

  • Sign Following Robot with ROS in MATLAB
    Use MATLAB® to control a simulated robot running on a separate ROS-based simulator over a ROS 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:
  • Generate ROS Node for UAV Waypoint Follower
    This example shows how to use MATLAB® code generation to create a ROS node to move an unmanned aerial vehicle (UAV) along a predefined circular path and a set of specified custom waypoints.
  • Generate a ROS Control Plugin from Simulink®
    This example shows how to generate and build a ros_control plugin from a Simulink model. In this example, you first configure a model to generate C++ code for a ros_control package. You then deploy the plugin on a virtual machine running Gazebo® to control a Pioneer 3DX 2-wheeled differential drive robot.
  • Lane and Vehicle Detection in ROS Using YOLO v2 Deep Learning Algorithm
    This example shows how to use deep convolutional neural networks inside a ROS enabled Simulink® model to perform lane and vehicle detection. In this example, you first read traffic video as the input and publish the frames as sensor_msgs/Image messages to a topic on the ROS network. Then you detect vehicles, and the left and right lane boundaries corresponding to the ego vehicle in every frame, annotate the input image with the detections, and publish them to a topic in the ROS network. Finally, you generate CUDA® optimized code for the ROS node from the Simulink model for lane and vehicle detection.
  • Control a Simulated UAV Using ROS 2 and PX4 Bridge
    This example demonstrates how to receive sensor readings and autopilot status from a simulated UAV with PX4 autopilot, and send control commands to navigate the simulated UAV.
  • Fusion of Radar and Lidar Data Using ROS
    Perform track-level sensor fusion on recorded lidar sensor data for a driving scenario recorded on a rosbag. This example uses the same driving scenario and sensor fusion as the Track-Level Fusion of Radar and Lidar Data (Sensor Fusion and Tracking Toolbox) example, but uses a prerecorded rosbag instead of the driving scenario simulation.
  • 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.
  • Generate a Standalone ROS Node from MATLAB
    This example shows how to generate C++ code for a standalone ROS node from a MATLAB function. It then shows how to build and run the ROS node on a Windows® machine.
  • MATLAB Programming for Code Generation
    This example shows the recommended workflow for generating a standalone executable from MATLAB® code that contains ROS interfaces.

Gazebo

  • Gazebo およびシミュレートされた TurtleBot の入門
    この例では、Gazebo® シミュレーター エンジンの設定方法を説明します。
  • 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 Gazebo およびシミュレートされた TurtleBot の入門 example.
  • Gazebo およびシミュレートされた TurtleBot の入門
    この例では、Gazebo® シミュレーター エンジンの設定方法を説明します。
  • 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 Gazebo およびシミュレートされた 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.