ROS Tank Tutorial¶
This tutorial explains how to perform input/output using ROS in simulations with the “Tank” model, one of Choreonoid’s sample models. This is a ROS-oriented extension of the Tank Tutorial, which is based on Choreonoid’s basic functionality. Throughout this tutorial, we’ll reference relevant pages from the basic tutorial as needed. If you haven’t yet mastered the basics of simulation with Choreonoid, we recommend first completing the basic Tank Tutorial before proceeding with this tutorial.
This tutorial uses C++ for implementing control programs and utilizes ROS functionality through the roscpp library. By mastering this approach, you’ll be able to leverage various ROS features and resources through coding with the roscpp library. For details about the roscpp library, please refer to the roscpp manual and related documentation separately.
- Preparation
- Step 1: Controlling Tank by Subscribing to the Joy Topic
- Starting the Choreonoid Node
- Creating a Simulation Project
- Preparing the Gamepad
- Transmitting Gamepad State via Joy Node
- Choreonoid Version Joy Node
- Building the Controller
- Introducing the Controller
- Running the Simulation and Controlling the Tank Robot with the Gamepad
- Checking Joy Topic Connection Status
- Introducing a Launch File
- Source Code Explanation
- Note: Confirming ROS Environment Execution
- Step 2: Publishing Tank State Output via JointState Topics
- Step 3: Displaying Tank State by Subscribing to JointState Topics
- Step 4: Outputting Acceleration Sensor and Rate Gyro States
- Step 5: Enhancing Tank State Display by Subscribing to Sensor Information Topics