Telescopic structure robot system based on ROS
By designing a telescopic structure robot system based on ROS, the existing robot system has solved the shortcomings in functions and costs, and realized a robot system with simple structure, easy control and low development costs, meeting a variety of daily application scenarios, and promoting the popularization and marketization of intelligent robot products.
Patent Information
- Application Number
- CN202411888670.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-18
AI Technical Summary
The existing robot systems have shortcomings in terms of functions and costs, which are difficult to meet diverse daily application scenarios, and the high cost and complex control algorithms of traditional robotic arm solutions limit their promotion.
A telescopic structure robot system based on ROS is designed, including a mobile chassis, vertical lifting ladder, telescopic arms and jaws. It adopts a simple structure and control method to reduce development costs, and through the combination of ROS and STM32 microcontroller, flexible motion control and automatic grabbing functions are achieved.
It realizes a robot system with simple structure, easy control and low development cost, which can meet a variety of daily application scenarios and is suitable for home, medical and commercial fields, promoting the popularization and marketization of intelligent robot products.
Smart Images

Figure CN119635588A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a telescopic structure robot system based on ROS. Background Art
[0002] In recent years, robotics technology has made rapid progress, expanding from the industrial field to daily life, providing humans with a series of intelligent services, such as sweeping, meal delivery, companionship and home assistance robots, etc. These service robots are now an indispensable part of modern society. They assist humans in completing tasks in many fields such as home, medical and commercial, greatly reducing the burden of manpower and improving the quality of life.
[0003] Traditional industrial robots mainly refer to large robotic arms, which are usually fixed in a specific position to perform simple grabbing and placing tasks. However, with the advancement of technology and the development of the supply chain, small robots such as sweeping robots and food delivery robots have quickly occupied the market, allowing people to intuitively feel the convenience brought by technology. In recent years, robotics technology has developed rapidly, and robots represented by small, high-precision, and flexible robotic arms have become the research focus of enterprises and research institutions. Some companies have begun to study and even develop humanoid robots. This type of robot relies on high-precision and high-torque servo motors. Through multi-axis joints driven by multiple servo motors, it can flexibly adapt to various application scenarios, such as precise object grabbing and handling.
[0004] However, existing robots still have some shortcomings: in service scenarios such as home and medical care, the application of robots is increasing day by day. The most traditional ones include sweeping and food delivery robots, which have relatively simple functions and are only suitable for specific scenarios. However, some more advanced intelligent robots, such as AI smart butler robots with robotic arms, provide more functions. For example, Bot Handy launched by Samsung is an AI smart butler robot with a robotic arm. Its main body is designed in a columnar shape, which can achieve vertical lifting and is equipped with a multi-axis robotic arm, which can perform tasks such as cleaning the table, pouring wine or loading dishes into the dishwasher. However, the price of such robots is often as high as hundreds of thousands of RMB, partly because of the high hardware cost. The cost of the robotic arm itself is tens of thousands of yuan, coupled with the complex control algorithm, which leads to an increase in the overall cost, and it will take some time for them to be popularized; service robots mostly use robotic arm solutions at home and abroad. Although robotic arms have many advantages, their technical costs are high and large-scale promotion faces challenges. In order to solve this problem, the American company Hello Robot launched a collaborative robot Stretch with a telescopic structure. The Stretch robot abandons the traditional robotic arm solution and instead uses a simple telescopic arm and lifting rod solution, combined with a trolley chassis to build an X, Y, and Z three-dimensional space coordinate system. By controlling the movement of the telescopic arm, lifting rod, and trolley chassis, the end mechanical claw of the Stretch robot can reach any position in three-dimensional space. The three-axis movement of the Stretch robot is similar to that of a 3D printer. It achieves point-to-point movement by moving or retracting. It does not require high requirements for the drive motor, and the control does not require complex motion solutions. Although the Stretch robot is sufficient for most daily scenarios, it has low flexibility and cannot move at high speeds.
[0005] Therefore, a product with a simple structure, easy control, low development cost, able to meet the needs of most daily application scenarios, and able to promote intelligent robot products into people's lives more quickly needs to be studied urgently. Summary of the invention
[0006] The technical problem to be solved by the present invention is to overcome the defects of the above-mentioned technology and provide a telescopic structure robot system based on ROS.
[0007] In order to solve the above technical problems, the technical solution provided by the present invention is a telescopic structure robot system based on ROS: comprising a mobile chassis, a vertical elevator installed above the mobile chassis, a telescopic arm, and a gripper;
[0008] The mobile chassis includes a wheel mounting base, a plurality of support columns fixedly mounted above the wheel mounting base, an upper platform fixedly connected to the upper ends of the support columns, two driving wheels, and two passive wheels. The two driving wheels are symmetrically arranged at the two ends of the wheel mounting base and are independently driven by motors connected to them respectively, and the two passive wheels are symmetrically arranged at the other two ends of the wheel mounting base.
[0009] The vertical lift includes a 360-degree rotating base, two sets of screw lifting mechanisms, and two sets of link modules, wherein the 360-degree rotating base relies on a hollow slewing bearing as a supporting base, is equipped with a stepping motor and realizes free rotation in all directions through gear linkage, the screw lifting mechanism is assembled by 2020 aluminum profiles, 8mm screws, support seats and sliders, the telescopic arm is connected to two sliders through two sets of link modules, the function of the link module is to connect the slider and the telescopic arm, when the two sliders move synchronously, the lifting state of the telescopic arm as a whole is controlled, and when the two sliders move with a height difference, the pitch state of the telescopic arm as a whole is controlled;
[0010] The telescopic structure robot system is designed based on ROS2, and the telescopic structure robot system includes a visual recognition control module.
[0011] Furthermore, the telescopic arm is constructed with four square aluminum alloy sleeves with a length of 180 mm each. The outer diameters of the four sleeves decrease successively, namely 45 mm, 40 mm, 35 mm and 30 mm, and the thickness is uniformly 1.5 mm. A small spacing of 1 mm is maintained between two adjacent sleeves. An outer support seat and an inner support seat are installed on both sides of the sleeve, and each of the outer support seat and the inner support seat is equipped with 8 micro pulleys with a diameter of 5 mm.
[0012] Furthermore, the gripper includes four servo actuators, a connecting seat and a mechanical claw. The mechanical claw adopts a conventional product on the market, with a maximum opening of 92mm and a maximum grasping weight of 500g. Four degrees of freedom are achieved through four servo motors, namely horizontal rotation, vertical pitch, spin and gripper tightness.
[0013] Furthermore, the main controller is STM32, and the main controller adopts the OpenCTR B20 control board of Tucker Innovation Technology.
[0014] The advantages of the present invention over the prior art are: compared with the traditional complex and expensive robot system, the telescopic structure robot of the present invention has a simpler structure and control method, which makes its development simpler and lower in cost; it is controlled by ROS combined with an STM32 single-chip microcomputer, can realize movement in any direction and grasping within an effective range, and can easily meet the needs of grasping objects in various daily scenes; at the same time, combined with computer vision, it can realize automatic grasping of objects; it meets the needs of application scenarios such as home, medical and commercial, and is easier to promote and market. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a schematic diagram of the structure of a telescopic structure robot system based on ROS of the present invention. Figure 1 .
[0016] Figure 2 This is a schematic diagram of the structure of a telescopic structure robot system based on ROS of the present invention. Figure 2 .
[0017] Figure 3 This is a schematic diagram of the structure of a telescopic structure robot system based on ROS of the present invention. Figure 3 .
[0018] Figure 4 It is a partial structural schematic diagram of a mobile chassis part of a telescopic structure robot system based on ROS of the present invention.
[0019] Figure 5 It is a structural schematic diagram of a mobile chassis part of a telescopic structure robot system based on ROS of the present invention.
[0020] Figure 6 This is a partial structural diagram of the mobile chassis and vertical elevator part of a telescopic structure robot system based on ROS of the present invention. Figure 1 .
[0021] Figure 7 This is a partial structural diagram of the mobile chassis and vertical elevator part of a telescopic structure robot system based on ROS of the present invention. Figure 2 .
[0022] Figure 8 This is a schematic diagram of the structure of a telescopic arm of a telescopic structure robot system based on ROS of the present invention. Figure 1 .
[0023] Fig. 9 This is a schematic diagram of the structure of a telescopic arm of a telescopic structure robot system based on ROS of the present invention. Figure 2 .
[0024] Fig.10It is a structural schematic diagram of a gripper of a telescopic structure robot system based on ROS of the present invention.
[0025] Fig.11 It is a system design block diagram of a telescopic structure robot system based on ROS of the present invention.
[0026] Fig.12 It is a functional block diagram of a telescopic structure robot system based on ROS of the present invention.
[0027] Fig.13 It is the STM32 control software block diagram in the present invention.
[0028] Fig.14 It is a schematic diagram of the ROS coordinate definition in the present invention.
[0029] Fig.15 It is a schematic diagram of chassis kinematic analysis of a telescopic structure robot system based on ROS of the present invention.
[0030] Fig.16 The present invention is a flow chart of closed-loop speed control of a telescopic structure robot system based on ROS.
[0031] Fig.17 It is a schematic diagram of the steps of building a ROS2 environment of a telescopic structure robot system based on ROS of the present invention.
[0032] Fig.18 This is a built-in demo diagram for testing and starting a telescopic structure robot system based on ROS of the present invention.
[0033] Fig.19 It is a ROS2 node relationship diagram of a telescopic structure robot system based on ROS of the present invention.
[0034] Fig. 20 It is a control interface of a telescopic structure robot system based on ROS in the present invention.
[0035] Fig.21 The present invention discloses a component selection and editing interface of a telescopic structure robot system based on ROS.
[0036] Fig. 22 It is a schematic diagram of the connection between the APP end and the device end of a telescopic structure robot system based on ROS of the present invention.
[0037] Fig.23 It is a flow chart of the APP-side control program of a telescopic structure robot system based on ROS of the present invention.
[0038] Fig.24 This is a result diagram of an image processing process of a telescopic structure robot system based on ROS of the present invention.
[0039] Fig.25 This is a result diagram of obtaining the coordinates of the center point of a rectangle of a telescopic structure robot system based on ROS of the present invention.
[0040] Fig.26 It is a schematic diagram of image division areas of a telescopic structure robot system based on ROS of the present invention.
[0041] Fig. 27 The present invention discloses an identification control flow chart of a telescopic structure robot system based on ROS.
[0042] Fig.28 It is a grasping motion analysis diagram of a telescopic structure robot system based on ROS of the present invention.
[0043] As shown in the figure:
[0044] 1. Mobile chassis, 101. Wheel mounting base, 102. Support column, 103. Upper platform, 104. Driving wheel, 105. Passive wheel, 2. Vertical lift, 201. Rotating base, 202. Screw lifting mechanism, 3. Telescopic arm, 4. Gripper. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0046] Embodiment 1, in combination with Figure 1-28 , a telescopic structure robot system based on ROS, comprising a mobile chassis 1, a vertical lift 2 installed above the mobile chassis 1, a telescopic arm 3, and a gripper 4, the telescopic structure robot system is designed based on ROS2, and the telescopic structure robot system includes a visual recognition control module;
[0047] The mobile chassis 1 includes a wheel mounting base 101, a plurality of support columns 102 fixedly mounted above the wheel mounting base 101, an upper platform 103 fixedly connected to the upper end of the support column 102, two driving wheels 104, and two passive wheels 105. The two driving wheels 104 are symmetrically arranged at the two ends of the wheel mounting base 101 and are independently driven by the motors connected to them, and the two passive wheels 105 are symmetrically arranged at the other two ends of the wheel mounting base 101. The mobile chassis 1 adopts a two-wheel differential drive. The two-wheel differential chassis is one of the most common wheeled chassis, which has the characteristics of a relatively simple drive system and flexible movement. Its two driving wheels 104 can be controlled independently. It only needs to control the speeds of the two driving wheels 104 to be different, so that the chassis can be controlled to achieve rotation without sliding friction, and zero radius turning can also be achieved. The passive wheel 105 is usually an omnidirectional wheel or a universal wheel. In this design, an omnidirectional wheel is selected. The characteristic of omnidirectional wheels is that they do not need to turn when moving in any direction, and the control is relatively stable, but the load capacity is relatively weak. The load capacity of universal wheels is relatively strong, but their control is unstable, and there will be a certain tail swing effect when turning sharply. Comprehensive consideration is that the omnidirectional wheels are selected as passive wheels and are placed symmetrically front and back, which is more conducive to the stability of control and the flexibility of movement. 8 support columns 102 are arranged, distributed around the wheel mounting base 101, and copper columns are used to support the upper platform 103. The use of copper columns as support can not only reduce the complexity of the design and save internal space, but also ensure that the entire system has sufficient rigidity and stability;
[0048] The vertical lift 2 includes a 360-degree rotating base 201, two sets of screw lifting mechanisms 202, and two sets of link modules, wherein the 360-degree rotating base 201 relies on a hollow slewing bearing as a supporting base, is equipped with a stepper motor and realizes free rotation in all directions through gear linkage, and the screw lifting mechanism 202 is assembled by 2020 aluminum profiles, 8mm screws, support seats and sliders. The screws not only significantly reduce the torque requirements in the design, but also have self-locking functions and high-precision control characteristics. The stepper motor drives the screw to rotate, and the lifting and lowering of the slider can be accurately controlled. The telescopic arm 3 is connected to the two sliders through two sets of link modules. The function of the link module is to connect the slider and the telescopic arm 3. When the two sliders move synchronously, the lifting state of the telescopic arm 3 as a whole is controlled. When the two sliders move with a height difference, the pitch state of the telescopic arm 3 as a whole is controlled. Compared with the traditional design of a single motor controlling a single state, this design scheme cleverly realizes the simultaneous control of the lifting and pitching states by coordinating the control of two motors. During lifting and lowering operations, the two motors jointly provide power, effectively sharing the demand for motor torque and structural inertia; and during the pitch adjustment stage, the lever principle is used to achieve precise posture adjustment with only a small force.
[0049] The telescopic arm 3 is constructed of four sections of square aluminum alloy sleeves, each of which is 180 mm in length. The outer diameters of the four sections of the sleeves decrease in sequence, namely 45 mm, 40 mm, 35 mm and 30 mm, and the thickness is uniformly 1.5 mm. A small spacing of 1 mm is maintained between two adjacent sections of the sleeves. An outer support seat and an inner support seat are installed on both sides of the sleeves, and each outer support seat and inner support seat are equipped with 8 micro pulleys with a diameter of 5 mm, which can effectively reduce the friction resistance between adjacent sleeves and compensate for the gap caused by the spacing, thereby minimizing the droop at the end of the telescopic arm when it is fully extended. The total length of the telescopic arm 3 is 230 mm when fully retracted, and can reach 640 mm when fully extended, and the droop at the end is controlled within 30 mm. The drive mechanism of the telescopic arm 3 is a synchronous rope drive technology. It uses a highly wear-resistant PE wire with a wire diameter of 0.35mm and combines a certain pulley arrangement and combination method to construct a set of efficient synchronous stretching mechanisms, which can drive two sections of casing to synchronously extend and retract. There are three sections of casing that are synchronously extended and retracted in the telescopic arm 3, so two sets of such synchronous stretching mechanisms are required to achieve this. The power of the entire telescopic process comes from the stepper motor. The motor controls the reel reel to tighten or loosen the drive wire, thereby realizing the telescopic arm 3.
[0050] The gripper 4 includes four servo servos, a connecting seat and a mechanical claw. The mechanical claw adopts a conventional product on the market, with a maximum opening of 92mm and a maximum grasping weight of 500g. Four degrees of freedom are achieved through four servo motors, namely horizontal rotation, vertical pitch, spin and gripper tension. Each degree of freedom is precisely controlled by an independent servo servo, and the movement is flexible and precise. Horizontal rotation allows the gripper to rotate 270 degrees relative to the horizontal direction; vertical pitch enables the gripper to adjust up and down a certain angle in the vertical direction, which can adapt to the task of grasping targets at different heights; spin gives the gripper the ability to rotate on its own axis, so that it can grasp objects with irregular shapes or special positions; the gripper tension is controlled by controlling the servo servo to drive the mechanical claw to open and close, so as to achieve a firm grasp and release of the object.
[0051] Most of the robot is made of aluminum profiles, and a few parts are made by 3D printing. The robot is 70cm high, 30cm long and 30cm wide when fully retracted. The vertical elevator has a lifting range of 20cm to 62cm relative to the ground. The telescopic arm is 25cm long when fully retracted and 70cm long when fully extended. The gripper consists of four servo rudders, which can perform pitch, spin, turn left and right, and release operations. The maximum opening of the gripper is 92mm, and the maximum grip weight is 500g.
[0052] In this embodiment, a total of ten motors are used. In the mobile chassis 1 part, two 520 encoder DC reduction motors are selected. They have large torque and come with Hall encoders, which can obtain the motor speed information in real time, thereby realizing speed closed-loop control. The no-load speed of the motor is 178RPM, the reduction ratio is 56, and the maximum torque is 9.0Kg.cm. The diameter of the driving wheel 104 is 58mm. Even when the overall weight of the telescopic robot reaches 8kg, the two encoder motors can still flexibly drive the robot to move, and the maximum moving speed can reach 0.5m / s. In the vertical lift 2 and telescopic arm 3 parts, 42 stepper motors are selected. Stepper motors have the characteristics of high positioning accuracy, simple control method, smooth movement and extremely low cost. Four stepper motors are used in these two parts, one on the 360-degree rotating base 201, one on each of the two sets of screw lifting mechanisms 202, and one on the telescopic arm 3. The motor body length is 34mm, and the maximum torque is 2.9Kg.cm. Compared with the joint motors of other similar robots, the power is much smaller, but because the vertical lift 2 uses a screw combined with a lever and the telescopic arm 3 adopts a rope drive design, it is still more than enough to use this motor to drive the lifting and telescopic movements. However, stepper motors also have certain disadvantages. When the load is large, it is easy to lose steps, and the controller has more wiring, which is not conducive to the overall wiring of the robot. To solve the above problems, all stepper motors are equipped with a closed-loop servo drive module at the bottom. The module model is Emm42_V5.0, which comes from ZDT closed-loop servo technology. The Emm42_V5.0 module adopts advanced FOC vector closed-loop control algorithm, has high-precision magnetic encoder and current sensor, supports speed mode, position mode control, supports curve acceleration and deceleration and immediate stop, supports serial communication control, supports multi-module communication, has stall protection function, and runs smoothly and quietly. After installing the Emm42_V5.0 module, the stepper motor can also achieve absolute position control like a servo motor, making the lifting and telescopic control more accurate and simple, and the wiring is simpler, and only two wires are needed to control the operation of multiple motors.
[0053] In this embodiment, the gripper 4 uses four 20kg serial bus servo servos to control horizontal rotation, vertical pitch, spin and gripper tension respectively. The servo model is ZP20D, and the servos are connected to each other through an aluminum alloy bracket. The maximum torque is 20Kg.cm and the rotation angle is 270°, which can meet the power and flexibility requirements of the mechanical gripper. The control method is serial communication. The servos are connected in series through an interface, and different IDs can be set in the command to realize one data line to control multiple servos, which greatly simplifies the wiring and control methods.
[0054] In this embodiment, motion control is directly controlled by the STM32 control board, and the STM32 control includes DC motor drive, encoder reading, PID control and serial communication.
[0055] Kinematic Analysis of Mobile Chassis
[0056] The mobile chassis of the telescopic robot is a two-wheel differential chassis. By controlling the speed difference of the two driving wheels, the chassis will rotate around their common axis, which is differential steering.
[0057] In the ROS system, the establishment of the coordinate system follows the right-hand rule. For the mobile chassis, the X-axis points to the front of the mobile chassis, the Y-axis points to the left of the mobile chassis, and the Z-axis represents the counterclockwise rotation. The movement of the mobile chassis is usually in the same plane, and there will be no rolling and pitching movement in the horizontal plane. Therefore, the motion analysis of the X-axis and Y-axis only involves linear velocity, without considering angular velocity. Similarly, the height of the mobile chassis will not change, so the change of the linear velocity of the Z-axis is not considered. The analysis is shown in the attached figure. Fig.15 shown.
[0058] The parameters have the following meanings:
[0059] Robot vector speed:
[0060] VX: The target forward and backward speed of the robot at point O, with forward speed being positive, unit: m / s.
[0061] VY: The target left and right speed of the robot at point O, with left movement being positive, unit: m / s. Ignored for the two rounds.
[0062] VW: The target rotation speed of the robot around point O, counterclockwise is positive, unit: rad / s.
[0063] Chassis parameters:
[0064] W: wheelbase, the distance between two driving wheels, with the center at point O, unit: m.
[0065] R: The turning radius R generated by the chassis moving forward and rotating at the same time, unit: m.
[0066] Chassis wheel speed:
[0067] VA: Robot left wheel speed, forward direction is positive, unit: m / s.
[0068] VB: The speed of the robot’s right wheel, the forward direction is positive, unit: / S.
[0069] path
[0070] SL: The path traveled by the left wheel in a certain time t
[0071] SM: The path that the middle point O travels within a certain time t
[0072] SR: The path traveled by the right wheel within a certain time t
[0073] θ: The angle that the robot rotates within a certain period of time t, unit: rad.
[0074] The following is the kinematic forward and inverse formula for solving the chassis. First, the integral of speed over time equals the distance:
[0075] S L =V A *t
[0076] S M =V X *t
[0077] S R =V B *t
[0078] The arc length divided by the radius equals the radian:
[0079]
[0080] Right now:
[0081]
[0082] Integrating over time gives:
[0083]
[0084] Decomposition results in:
[0085]
[0086] According to the above equations, we can get the inverse kinematics formula. Given the target speeds VX and VW,
[0087] The speeds VA and VB of the driving wheels are obtained as follows:
[0088]
[0089] According to the kinematic inverse solution formula, it can be transformed into the kinematic forward solution formula. Given the speeds VA and VB of the driving wheels, the target speeds VX and VW are obtained as follows:
[0090]
[0091] Mobile chassis control method
[0092] The motor of the mobile chassis is controlled by the OpenCTR B20 control board. The motor is connected to two encoder motor interfaces on the control board. One interface occupies four IO ports of STM32. Two IO ports are responsible for PWM output to control the motor speed and forward and reverse rotation. The other two IO ports are used to read the levels of the A and B phases of the Hall encoder. The control of the encoder motor also uses the PID algorithm to achieve closed-loop speed control. The specific process is shown in Figure 16.
[0093] First, the target speeds of the chassis X, Y, and Z axes are obtained. These three target speed parameters are defined as global variables. The control instructions sent by the host computer are received through serial communication. The received instructions are parsed to extract the target speed values corresponding to each axis. After the target speed values are checked for over-limit, they are assigned to the pre-set global variables. Then, the target speeds of motors A and B are calculated through the kinematic inverse algorithm, and the motor target speeds are passed to the PID controller to calculate the PWM duty cycle value required to control the motor to reach the target speed. After the motor is running, the encoder feeds back the current speed of the motor to the PID controller in real time, and calculates the PWM duty cycle value again. This cycle is repeated to control the motor to run smoothly at the target speed.
[0094] The function of the above PID controller is to realize speed closed-loop control. Its basic principle is incremental PID. It measures the speed information of the motor according to the unit time and compares it with the target value to obtain the control deviation. Then, the deviation is controlled by proportion, integration and differentiation, so that the deviation tends to zero. The complete formula of incremental PID is as follows:
[0095] PWM+=Kp[e(k)-e(k-1)]+Ki*e(k)+Kd[e(k)-2e(k-1)+e(k-2)]
[0096] Among them, e(k) is the current deviation, e(k-1) is the previous deviation, e(k-2) is the previous deviation, Kp is the proportional term parameter, Ki is the integral term parameter, Kd is the differential term parameter, and PWM represents the incremental output. Since only PI control is used in the chassis closed-loop control system, the PID controller can be simplified to the following formula:
[0097] PWM+=Kp[e(k)-e(k-1)]+Ki*e(k)
[0098] The specific implementation is as follows. The input parameters are the encoder measurement value (actual speed) and the target speed, and the return value is the motor PWM. The PID controller code is as follows:
[0099]
[0100] The encoder measurement value (actual speed) is obtained by configuring the input capture of the STM32 timer and the external interrupt function to capture and count the encoder signal. The real-time wheel speed can be calculated based on the motor and wheel parameters. The specific calculation is as follows:
[0101]
[0102] Where WHEEL_DIAMETER is the wheel diameter, WHEEL_RESOLUTION is the encoder resolution, Counter is the Hall encoder count value, PID_RATE is the PID frequency, and PI is the pi ratio PI.
[0103] Kinematic analysis of vertical lift, telescopic arm and gripper
[0104] The vertical elevator includes two sets of identical screw lifting mechanisms, which are responsible for controlling the lifting and pitching of the telescopic arm. First, the single screw lifting mechanism is analyzed to determine the relationship between the number of stepper motor pulses and the lifting amount of the slider. The specific relationship is as follows:
[0105]
[0106] Among them, CLK is the pulse number, L is the lifting amount of the slider, C is the single-turn pulse coefficient, and S is the lead of the screw. When the telescopic arm is to be lifted vertically, the two lifting mechanisms operate synchronously. When the pitching movement is performed, there will be a difference (Dif) in the lifting amount of the two lifting mechanisms. The size and positive and negative of the difference determine the size and direction of the pitch angle.
[0107] First, convert the target pitch angle (Angle) into the difference in lift:
[0108] θ=Angle;Dif=tanθ*d
[0109] The lifting amount of lifting mechanism A and mechanism B is calculated as follows:
[0110]
[0111] Where d is the distance between the connection points of the telescopic arm and the two sets of lifting mechanisms, L a和 L b The current positions of the sliders of lifting mechanisms A and B respectively.
[0112] To analyze the telescopic arm, it is necessary to determine the relationship between the number of motor pulses (CLK) and the target length (Lr) of the telescopic arm. When the telescopic arm is fully retracted, Lr is 0. The specific relationship is as follows:
[0113]
[0114] Where CLK is the number of pulses, Lr is the target length, C is the single-turn pulse coefficient, and Tp is the reel diameter.
[0115] Each joint of the gripper is driven directly by the servo and only requires an angle parameter, so no analysis or calculation is performed for the time being.
[0116] In this part, the stepper motors used in the vertical lift and telescopic arm and the servos used in the gripper are all controlled through a serial bus, and are connected to the serial port 3 on the OpenCTR B20 control board for communication. The main control board sends control instructions and obtains position information fed back by the motor through the serial port 3. The stepper motor control communication protocol is shown in Table 1-1:
[0117] Table 1-1 Motor control communication protocol
[0118]
[0119] All motors are connected in series, and the specified motor is controlled by setting the address (ID_Addr). The default address is 1, and the setting range is 1-255. 0 is the broadcast address. Different commands correspond to different function codes and instruction data. The commands used in this system are shown in Table 1-2:
[0120] Table 1-2 Analysis of motor control instructions
[0121]
[0122]
[0123] The specific control function of the vertical elevator is as follows. The function input parameters are the movement speed (vel) and the absolute movement height (leng). After calculating the motor speed and pulse number based on the two, all data is passed to the Emm_V5_Pos_Control() function, and then the instructions are integrated according to the stepper motor protocol and sent to the motor through the serial port. The vertical elevator control code is as follows:
[0124]
[0125] The specific control function of the telescopic arm is as follows. The function input parameters are the movement speed (vel) and the absolute telescopic length (leng). The motor speed and pulse number are calculated based on the two, integrated and sent to the motor. The telescopic arm control code is as follows:
[0126]
[0127]
[0128] The protocols of servos and stepper motors are different. Stepper motor commands are in hexadecimal format, while servos are in character strings. The specific protocols are as follows:
[0129] Table 1-3 Servo control protocol
[0130]
[0131] The specific implementation is as follows. The parameters passed into the function are the servo address and the angle of motion. The servo control code is as follows:
[0132]
[0133] ROS2 Overview
[0134] ROS2 (Robot Operating System 2) is a standardized software framework designed for robot development. It provides a standardized method to handle the coordination between multiple modules, simplifies the communication and task allocation between multi-robot systems, reduces the complexity of software, and improves development efficiency. In ROS development, different software functions of the robot can be encapsulated into different nodes, and each node performs tasks independently.
[0135] The communication mechanism of ROS2 is one of its core functions, which allows efficient and reliable data exchange between different nodes. Communication is carried out through topics, which are communication channels for publishing and subscribing messages. Nodes can provide data by publishing messages to topics, and other nodes can subscribe to these topics to receive data. In addition to the publish / subscribe model, ROS2 also supports service communication, which allows nodes to interact through a request / response model. Service communication is usually used in situations where interactive operations between nodes are required.
[0136] ROS2 environment construction and use
[0137] The host computer hardware used in this solution is Horizon's X3 Pie ARM development board, running the Ubuntu 20.04 Desktop version, supporting ROS2 foxy version, and using Python in development, as shown in the attached Fig.17 Steps to build the ROS2 environment:
[0138] Test the built-in message sending and receiving demo. First, execute ros2 run demo_nodes_pylistener in one terminal to start the listener node, and then execute ros2 run demo_nodes_cpp talker in another terminal to start the talker node. At this time, the two terminals are constantly communicating, as shown in the attached figure. Fig.18 As shown, every time the talker node sends one, the listening node can hear one each time.
[0139] ROS2 Node Overview
[0140] In the ROS system, a node is an executable file that executes tasks independently. It can communicate with other nodes through ROSMaster. A node can publish or receive a topic, or provide or use a service. In this project, there are a total of 6 nodes, as shown in Table 1-4:
[0141] Table 1-4 Node introduction
[0142]
[0143] Nodes interact with each other through topics. The specific relationships are as follows: Fig.19 As shown in the figure, the oval is the node name, the box is the topic, and the topic acts as a bridge for communication between nodes. The keyboard node publishes the control mode information through the mode_selet topic, the node Select_ctl receives and sets the control mode, the Keyboard_Ctl, Blink_Ctl and Vision_Ctl nodes publish the robot control instructions through the mode_cmd topic, and the node Select_ctl determines whether to process the received instructions according to the set control mode. If it is to be processed, the command is split into chassis and body parts and parsed into the format corresponding to the communication protocol of the lower computer, and published through the cmd_vel and cmd_body topics respectively. Finally, the Uart_Ctl node sends it to the STM32 underlying lower computer through the serial port.
[0144] Specific functions and implementation of main nodes
[0145] Lower computer communication node
[0146] The main function of this node is to realize the communication between the ROS system and the STM32 underlying lower computer and send control instructions. The communication is realized through the serial port. In order to ensure the reliability of communication and meet the diversity of instruction functions, a special communication protocol is set, as shown in Table 1-5:
[0147] Table 1-5 Communication protocol of lower computer
[0148]
[0149] This communication protocol uses double frame headers and frame tails, which has stronger anti-interference ability. The data is high first, and its length is variable. It can freely combine 8-bit, 16-bit, and 32-bit data. The checksum is the low 8 bits of the cumulative sum of the previous data. The following bit example frame, the transmitted data is 1000, -1000: AA55|10|03E8FC18|XX. The function code definition is shown in Table 1-6:
[0150] Table 1-6 Function code definition
[0151]
[0152] Keyboard Control Node
[0153] Keyboard control is the most basic control method. You can control the movement of the robot and other parts through the keyboard. You can also select the control mode through the keyboard, and use the V and B keys to open the visual recognition control and mobile phone control modes respectively. The keyboard control node is implemented by monitoring the keyboard press and release events through the pynput library. The keyboard control code is as follows:
[0154] event_queue = queue.Queue()
[0155] def on_press(key):#Define a function to handle keyboard events
[0156] try:
[0157] event_queue.put(key.char,block=False)
[0158] except AttributeError:
[0159] event_queue.put(key,block=False)
[0160] def on_release(key):#Define a function to handle keyboard release events
[0161] if key == keyboard.Key.esc:
[0162] #Press the Esc key to exit monitoring
[0163] return False
[0164] event_queue.put(key,block=False)
[0165] listener=keyboard.Listener(on_press=on_press,on_release=on_release)#Create keyboard listener listener.start()#Start listening for keyboard events
[0166] A keyboard listener is defined to store keyboard events in a queue for subsequent processing. Whenever a key event occurs, whether the key is pressed or released, the listener will add the event to the queue. If the key is the Esc key, the work will stop. After listening to the key event, the corresponding message is published according to the corresponding key. For example, when the W key is pressed, a chassis forward movement message is sent, and when the W key is released, a stop message is sent.
[0167] Blinker Wireless Control Node
[0168] The main function of the Blinker wireless control node is to remotely control the robot's movement through a mobile phone. Blinker is a professional and easy-to-use IoT solution launched by DianDeng Technology, which provides server, application, and device SDK support. Using Blinker's simple and convenient application with the SDK supported by multiple devices can quickly realize device access and management.
[0169] Blinker wireless control can realize the control of the robot's forward and backward, lifting and retracting, and grasping movements. It also supports the modification of parameters such as speed. Fig. 20 The figure shows the mobile phone control interface. The Blinker mobile app provides modular component functions. Its components are rich and editable, which greatly reduces the difficulty of development. Fig.21 Shown is component selection and editing.
[0170] The design of Blinker wireless control node is mainly realized by calling Blinker Python SDK. BlinkerPython SDK implements MQTT communication, data sending and receiving, component creation and other functions. You only need to connect the device to the network and configure the device key to realize the communication between Blinker mobile APP and the device. The communication between APP and the device is through MQTT communication. The mobile phone publishes topics to the Blinker server, and the device sends and receives data by subscribing to related topics. The specific process is as follows. Fig. 22 shown.
[0171] After the APP is connected to the device, you need to declare the functions and component names of the relevant control components in the code, and register the callback functions of the corresponding components. In the APP, you can manually drag and drop to edit the creation of relevant control buttons, and bind them according to the previously declared component names. Clicking the buttons on the APP side sends data to the server, and the device side executes the corresponding callback function program when it receives the data. The specific program flow is as follows. Fig.23 shown.
[0172] Visual recognition control node
[0173] The main function of the visual recognition control node is to realize color block recognition following and color block recognition grabbing. The image is captured by the camera, and OpenCV is used to process and analyze the image to obtain the coordinates of the color block relative to the horizontal plane. By calculating the distance and position between the color block and the robot, it is determined whether to control the robot to move accordingly, and the robot will not stop moving until the position of the color block is within the specified range, thereby realizing the following function. Similarly, by judging whether the color block is facing the gripper and the distance between the color block and the robot, the color block recognition grabbing is realized. When the color block is not on the central axis of the machine, the robot is adjusted to rotate left and right, and then the distance between the color block and the center point of the robot is calculated, and the length of the telescopic arm is controlled according to the distance, thereby realizing grabbing.
[0174] Design of control module based on visual recognition
[0175] Color block recognition based on OpenCV
[0176] Color block recognition can be achieved through the OpenCV library. OpenCV is an open source computer vision and machine learning software library that provides a wealth of image processing and analysis functions. The specific steps of color block recognition based on OpenCV are as follows:
[0177] First, capture the video frame. Open the camera through cv2.VideoCapture(0), and read a frame of video image through ret, frame = cap.read(). The second step is to perform Gaussian blur and color space conversion on the image. The purpose of Gaussian blur is to reduce noise and enhance color consistency as much as possible, thereby improving the effect of subsequent processing steps. Color space conversion is to convert the image in BGR color space to HSV, which is to make it easier to identify and extract single colors. The third step is color filtering. Use cv2.inRange() to create a mask based on the pre-defined color range to filter out color areas that meet the conditions. Then perform morphological operations, use corrosion operations to eliminate small noise points, and then dilate operations to restore the shape loss that may be caused by corrosion. The last step is to extract and draw contours. Use the cv2.findContours() function to find the contours on the binary mask in the image, and cv2.drawContours() to draw the found contours back to the original image or on another empty image. The results of the above image processing process are shown in the attached figure. Fig.24 As shown, a is color space conversion, b is color filtering, and c is contour drawing.
[0178] Visual Identity Follow
[0179] Visual recognition and following means that when the color block on the same plane as the robot chassis moves, the robot also moves in the direction of the color block to achieve target tracking. Specifically, when the visual recognition and following mode is turned on, the robot begins to identify whether there is a color block. When a color block is identified, the coordinates of the center point of the color block are obtained. The robot uses the center point of the frame as the target coordinate. That is to say, when the coordinates of the center point of the color block are not equal to the target coordinate or are not within the target coordinate range, the next step is to control the movement of the robot. The specific movement is explained in detail below. The recognition of the color block has been realized in the previous section, but this is not enough. It is necessary to further obtain the pixel area of the color block and the center point of the color block. The area of the color block is obtained to filter out some objects that are too small or too large from being identified as target objects. By setting the area threshold, only the targets within the threshold are finally identified. Use minAreaRect() to find the minimum circumscribed rectangle of the contour in the image, and then obtain the coordinates of the center point of the rectangle. The coordinates represent the coordinates of the center point of the color block. The specific image is as shown in the attached Fig.25 As shown, the green point is the block center, the red point is the frame center, and the upper left corner is the coordinate value of the two points.
[0180] After obtaining the coordinates of the color block center and the frame center, the direction and straight-line distance between the color block center and the frame center can be calculated. Fig.25 The center point of the middle color block is located to the upper right of the frame center point. At this time, the robot is controlled to spin rightward in place until the line connecting the center point of the color block and the center point of the frame is parallel to the Y axis of the frame, then the robot stops rotating, and then moves forward until the center point of the color block coincides with the center point of the frame. The specific implementation is as follows.
[0181] The image captured by the camera is divided into seven parts, as shown in the following figure. Fig.26 As shown, they are upper left, lower left, upper right, lower right, Y-axis area, X-axis area and center area. The area where the color block is located is determined by obtaining the coordinates of the center point of the color block, and different operations are performed according to different areas.
[0182] When controlling the robot to follow, only two movements need to be controlled, one is the robot's left and right rotation, and the other is forward and backward movement. In the following, R, L, F and B are used to represent right rotation, left rotation, forward movement and backward movement. When the color block is in the upper left area, R movement and F movement are performed. When the center point of the color block is in the Y-axis area, R movement is stopped and only F movement is performed. All movements are stopped until the center point of the color block is in the center area. The detailed process is as attached. Fig. 27 As shown in the figure, R, L, F and B represent right rotation, left rotation, forward and backward rotation, R(1) represents right rotation, R(0) represents stop right rotation, and so on.
[0183] Visual recognition capture
[0184] Visual recognition grasping is also based on color block recognition. Its basic process is consistent with the visual recognition in the previous section. It also determines the position through the coordinates of the center point of the color block, and then adjusts the position of the robot so that the center point of the color block is located in the central area of the image. Finally, the vertical elevator, telescopic arm and gripper of the body part are controlled to achieve grasping.
[0185] Since the robot will be controlled to move so that the center of the color block is located at a fixed position after each color block recognition, the position of the color block and the robot is the same each time the grab is performed, so the movement of the Body part (vertical elevator, telescopic arm, gripper) is fixed. The advantage of this is that the control of the Body part is simpler, and the grabbing parameters only need to be set once.
[0186] The distance between the center point of the image (O1) and the center point of the robot chassis is S1. When the body is fully reset, the telescopic arm and the gripper are in a horizontal state. The distance between the end (Q) and the center point of the robot chassis (O) is S2, and the height from the ground is H. Fig.28 As shown:
[0187] Depend on
[0188]
[0189] The pitch angle of the telescopic arm is:
[0190]
[0191] Depend on
[0192]
[0193] The telescopic length of the telescopic arm is:
[0194] S=S3-S2
[0195] because
[0196] θ1=θ
[0197] So the pitch angle of the gripper is θ.
[0198] System Testing
[0199] Module Testing
[0200] Mobile chassis test
[0201] The mobile chassis test mainly tests the basic functions of the chassis, such as straight-line driving, turning, rotation, and stopping, to ensure that it responds to commands accurately and moves smoothly. The test details are shown in Table 1-7:
[0202] Table 1-7 Mobile chassis test results
[0203]
[0204]
[0205] Vertical lift test
[0206] The vertical elevator is a core component of the telescopic structure robot system. This test mainly focuses on evaluating its key performance indicators, including the control accuracy of the lifting speed, the position accuracy during the lifting process, the stability when carrying heavy objects, the precision of the pitch movement, and the accuracy of the rotation movement. The specific test content is to verify whether the vertical elevator can accurately and smoothly complete various actions when executing the corresponding instructions to ensure that it meets the design standards and actual application requirements. The detailed test results are shown in Table 1-8:
[0207] Table 1-8 Vertical lift test results
[0208]
[0209] Telescopic arm test
[0210] The telescopic arm is the most important component of the telescopic structure robot system. Its control accuracy directly affects the accuracy of the robot when grabbing objects. The telescopic arm adopts a unique synchronous rope drive control method, which brings certain difficulties to ensuring accuracy, but certain errors can still be compensated by software. The telescopic arm test mainly tests the telescopic accuracy, the push and pull force during telescopic movement, and the load capacity of the telescopic arm when fully extended. The detailed test results are shown in Table 1-9:
[0211] Table 1-9 Telescopic arm test results
[0212]
[0213] Gripper test
[0214] The gripper test mainly tests whether the joints of the gripper can rotate accurately and the gripping strength of the gripper. The detailed test results are shown in Table 1-10:
[0215] Table 1-10 Gripper test results
[0216]
[0217] Functional testing
[0218] Keyboard control test
[0219] Keyboard control is the most basic control method. The detailed test results are shown in Table 1-11:
[0220] Table 1-11 Keyboard control test results
[0221]
[0222] Mobile phone control test
[0223] Mobile phone control is remote wireless control through the network. The detailed test results are shown in Table 1-12:
[0224] Table 1-12 Mobile phone control test results
[0225]
[0226] Visual Identity Control Test
[0227] Visual recognition control includes color block recognition following and color block recognition grabbing. The detailed test results are shown in Table 7-7:
[0228] Table 7-7 Visual recognition control test results
[0229]
[0230] The present invention breaks through the cost and technical barriers of the traditional complex mechanical arm structure, and uses telescopic arms and lifting rods to replace complex multi-joint mechanical arms, reducing the development difficulty and manufacturing costs. In the system, the mobile chassis achieves flexible movement through two-wheel differential drive, the vertical lift uses a screw lifting mechanism and a stepper motor to control the lifting and pitching posture, the telescopic arm adopts a four-section sleeve structure, and uses synchronous rope drive technology to ensure the accuracy of telescoping, and the gripper achieves precise grasping action through a servo steering gear.
[0231] In terms of hardware design, the system selected motors and drive solutions with moderate performance and low cost, such as 520 encoder DC reduction motors for mobile chassis, 42 stepper motors with closed-loop servo drive modules for elevators and telescopic arms, and high-performance serial bus servo actuators for grippers. The main controller uses STM32 chips, integrates various sensors and motor control interfaces through the OpenCTR B20 control board, and combines the ROS2 operating system for upper-level control logic programming and communication management.
[0232] In terms of motion control, the system achieves efficient communication between the host computer and the underlying STM32 controller through node design under the ROS2 framework, realizes keyboard and mobile phone control of robot movement, and also realizes visual recognition control.
[0233] In the description of the embodiments of the present invention, it should be noted that if the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or the orientation or position relationship in which the invented product is usually placed when used. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0234] In addition, the terms "horizontal", "vertical", "overhanging" and the like do not mean that the components must be absolutely horizontal or overhanging, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0235] In the description of the embodiments of the present invention, "plurality" means at least 2.
[0236] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0237] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A telescopic structure robot system based on ROS, characterized in that: It comprises a mobile chassis (1), a vertical lift (2) installed above the mobile chassis (1), a telescopic arm (3), a gripper (4), a main controller, and a plurality of sensors; The mobile chassis (1) comprises a wheel mounting base (101), a plurality of support columns (102) fixedly arranged above the wheel mounting base (101), an upper platform (103) fixedly connected to the upper ends of the support columns (102), two driving wheels (104), and two passive wheels (105); the two driving wheels (104) are symmetrically arranged at two ends of the wheel mounting base (101) and are independently driven by motors connected to them respectively; and the two passive wheels (105) are symmetrically arranged at the other two ends of the wheel mounting base (101); The vertical lift (2) comprises a 360-degree rotating base (201), two sets of screw lifting mechanisms (202), and two sets of linking modules, wherein the 360-degree rotating base (201) relies on a hollow slewing bearing as a supporting base, is equipped with a stepping motor and realizes free rotation in all directions through gear linkage, the screw lifting mechanism (202) is assembled by 2020 aluminum profiles, 8mm screws, a support seat and a slider, the telescopic arm (3) is connected to two sliders through two sets of linking modules, and the function of the linking module is to connect the slider and the telescopic arm (3), when the two sliders move synchronously, the lifting state of the telescopic arm (3) as a whole is controlled, and when the two sliders move with a height difference, the pitch state of the telescopic arm (3) as a whole is controlled; The telescopic structure robot system is designed based on ROS2, and the telescopic structure robot system includes a visual recognition control module.
2. The ROS-based telescopic structure robot system according to claim 1, characterized in that: The telescopic arm (3) is constructed by using four sections of square aluminum alloy sleeves, each of which has a length of 180 mm. The outer diameters of the four sections of the sleeves decrease in sequence, namely 45 mm, 40 mm, 35 mm and 30 mm, and the thickness is uniformly 1.5 mm. A small spacing of 1 mm is maintained between two adjacent sections of the sleeves. An outer support seat and an inner support seat are respectively installed on both sides of the sleeves, and each of the outer support seat and the inner support seat is equipped with 8 micro pulleys with a diameter of 5 mm.
3. The ROS-based telescopic structure robot system according to claim 1, characterized in that: The clamp (4) comprises four servo steering gears, a connecting seat and a mechanical claw. The mechanical claw adopts a conventional product on the market, has a maximum opening of 92 mm, a maximum grasping weight of 500 g, and realizes four degrees of freedom through four servo motors, namely horizontal rotation, vertical pitch, spin and clamp tension.
4. The ROS-based telescopic structure robot system according to claim 1, characterized in that: The main controller is STM32, and the main controller adopts the OpenCTR B20 control board of Tucker Innovation Technology.
Citation Information
Patent Citations
High-working efficiency industrial robot
CN106112959A
Self-walking type space picking up and grasping robot
CN109986527A
AUPM570694A0
Cited By
Zero-gravity flexible machining platform suitable for semi-automatic drilling of aircraft skin covering cap
CN121018470A