Create a robotic arm model

Create a robotic arm model

1. Preparation

1) Create a workspace and create an arm function package under src
2) Create folders launch and urdf to store .launch files and .xacro files respectively
3) Create an urdf folder under the arm folder to create a description file of the robotic arm arm.xacro
4) Create a launch folder under the arm folder and create a display.launch file

Second, the creation of the robotic arm model

ROS provides a feature-rich simulation environment, so there is no real robot, and you can also learn, simulate, research, and develop robotic arms in the simulation environment. Therefore, virtual a six-axis robotic arm.
Write the URDF file of the robotic arm to prepare for the follow-up Moveit! and Gazebo simulation control.

1. Declare the macros in the model

Using xacro files to describe the URDF model of the robotic arm, the flexibility of the model can be improved through macro declarations.
The above are some macros defined for the robot arm model, which mainly contains three parts.
1) Color macro: Define the appearance color that needs to be used in the model, set the RGBA value of the color
2) Robot size: Define the three-dimensional size of the robot through the macro attribute, which is easy to modify
3) Inertial matrix macro: Each link needs to specify an inertial matrix, You can extract the module and enter the quality

2. Create a six-axis robotic arm model

Design the model of the robotic arm body. That is, the robot needs six joints, the terminal is equipped with a two-finger gripper, and one joint is used for driving.
This mainly includes the design of the link and joint related to the six links of the robotic arm and the two-finger grip.

3. Add Gazebo attributes

To add Gazebo attributes, you also need to set the link color in Gazebo, the transmission attributes of each joint, and the ros_control plug-in.

Robotic arm control tends to pay more attention to the joint position during movement. Generally, position control is the main focus. Therefore, the interface used by transmissin is PositionJointInterface, and the corresponding controller ros_control plug-in is libgazebo_ros_control.so. The specific configuration of the plug-in is done in the yaml configuration file.

4. Display the robot model

During the design process, the model was placed in rviz for visual display to verify the correctness of its design.

Guess you like

Origin blog.csdn.net/weixin_45661757/article/details/110006474