Robot URDF model

Note: The virtual machine needs to be in the same LAN as the car, and the ROS_DOMAIN_ID needs to be consistent. You can check [Must read before use] to set the IP and ROS_DOMAIN_ID on the board.

1、Program function description

The car connects to the agent, runs the program, and the URDF model will be displayed in rviz.

2、Program start

Load URDF and generate a simulation controller, terminal input,

Open rivz to display the model and enter in the terminal,

image-20231219193556686

Change [Fixed Frame] to base_linke to display the car model.

image-20231219193707974

Then, use the mouse to adjust the viewing angle, slide the simulation controller just generated, and you can see that the tires/camera of the car are changing.

image-20231219193923867

zq_Joint:Control left front wheel

yq_Joint:Control right front wheel

yh_Joint:Control right rear wheel

zh_Joint:Control left rear wheel

jq1_Joint:Control PTZ 1

jq2_Joint:Control PTZ 2

Randomize:Randomly publish values to each joint

Center:All Joints are centered

3、Code analysis

Code location (take virtual machine as an example)

display_launch.py

4、URDF model

URDF, the full name of 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 item for XML and describes the version information of XML.

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

4.1、component

The relationship between link and joint: Two links are connected through joints. Imagine that an arm has a forearm (link) and an upper arm (link) connected through an elbow joint (joint).

1)、Introduction

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

Links can also describe the size, color, shape, inertial matrix, collision properties, etc. Each Link will become a coordinate system.

2)、Sample code

3)、Tag

introduction

4.1.2、joints

1)、Introduction

Describe the relationship between two joints, motion position and speed limits, kinematic and dynamic properties. The types of joints are as follows:

2)、Sample code

In the [joint] tag, the name attribute is required, which describes the name of the joint and is unique. In the type attribute of the [joint] tag, fill in the six joint types correspondingly.

3)、Tag introduction