URDF Model

1. Program function description

Start the car, run the program in the terminal, and the URDF model will be displayed in rviz.

2. Enter the car docker

Open the terminal and enter the following command to enter the docker,

The following interface appears, which means that you have successfully entered Docker. Now you can control the car through commands.

image-20240814152903441

4. Program startup

Load URDF and generate a simulation controller and start rviz, input in the terminal,

image-20240815161831838

Then, use the mouse to adjust the viewing angle and slide the simulated controller just created, and you can see the tires/camera of the car changing.

image-20240814194923976

l1_Joint: Control the left front wheel

l2_Joint: Control the left rear wheel

r1_Joint: Control the right front wheel

r2_Joint: Control the right rear wheel

arm1_Joint: Control gimbal 1

arm2_Joint: Control gimbal 2

Randomize: Randomly publish values to each joint

Center: All joints return to the center

5. Code analysis

Code location,

display_launch.py

6. URDF model

URDF, the full name is Unified Robot Description Format, translated into Chinese as Unified Robot Description Format, is a robot model file described in XML format, similar to D-H parameters.

The first line is a required field for XML and describes the version information of XML.

The second line describes the current robot name; all information about the current robot is included in the [robot] tag.

6.1. Components

Relationship between link and joint: two links are connected by joints, imagine that the arm has a forearm (link) and an upper arm (link) connected by an elbow joint (joint).

1), Introduction

In the URDF descriptive language, link is used to describe physical properties,

Links can also describe the size of the connecting rod (size)\color (color)\shape (shape)\inertial matrix (inertial matrix)\collision parameters (collision properties), etc. Each Link will become a coordinate system.

2), Sample code

  1. Tag introduction
6.1.2, joints
  1. Introduction

Describes the relationship between two joints, motion position and speed limits, kinematic and dynamic properties. There are several types of joints:

2), sample code