A hybrid palletizing robot trajectory planning method and system

By identifying local spatial constraint types and generating lateral entry paths, the problems of collision and low efficiency in mixed palletizing are solved, achieving efficient and safe box stacking and adapting to narrow scenarios with multiple box sizes.

CN123129128APending Publication Date: 2026-11-20LOCTEK ERGONOMIC TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611190637.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing hybrid palletizing technologies, robotic arm trajectory planning methods have failed to effectively address the collision risks caused by box size errors, visual sensor errors, and robotic arm positioning errors. Furthermore, traditional obstacle avoidance solutions are inefficient, cannot adapt to palletizing in narrow spaces, and lack adaptive local path planning.

Method used

By identifying the type of local spatial constraints around the stacking point, a lateral entry path is generated for the final segment, potential collision detection is performed, a global collision-free path is constructed, and a stacking trajectory is generated to avoid collisions caused by vertical falls, thus adapting to narrow scenarios where multiple sizes of boxes are mixed and stacked.

Benefits of technology

It reduces the probability of failures such as box collisions, suction cup detachment, and stack tipping, improves operational efficiency, reduces ineffective lifting actions, lowers energy consumption, is suitable for open pallet scenarios, has low hardware costs, and is easy to implement in engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129128A_ABST
    Figure CN123129128A_ABST
Patent Text Reader

Abstract

The application provides a mixed palletizing mechanical arm trajectory planning method and system, relates to the technical field of industrial robot automatic boxing and palletizing, and comprises the following steps: identifying the number and relative direction relationship of lateral obstacle surfaces around a palletizing target point according to collected box set information, so as to determine the local space constraint type around the palletizing target point; generating an approach axis vector and an approach point of a final approach path according to the local space constraint type; detecting potential collision risks of a carrying path from a picking point to the approach point, and generating a set of intermediate key points for forming a global collision-free path from the picking point to the approach point according to the detection result; and generating a palletizing trajectory based on the picking point, the set of intermediate key points, the approach point and the target point, so as to drive the end of the mechanical arm to complete the palletizing operation of the to-be-palletized box. The beneficial effect is to solve the industry pain points of narrow palletizing space collision and low operation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated packing and palletizing technology for industrial robots, and in particular to a method and system for planning the trajectory of a hybrid palletizing robotic arm. Background Technology

[0002] With the rapid development of e-commerce and logistics, the importance of multi-specification material mixed palletizing technology in warehouse automation is becoming increasingly prominent. Mixed palletizing aims to arrange boxes of different sizes closely within pallets or containers to improve space utilization and transportation efficiency. Existing mixed palletizing technologies can be divided into two main technical aspects: pallet layout planning and robot trajectory execution, and have the following shortcomings: First, existing layout planning methods output a series of target placement poses with three-dimensional coordinates and rotation angles, but do not address the issue of robot trajectory execution to safely reach each target pose. In real industrial scenarios, multiple error sources make it difficult for ideal assumptions to hold true: moisture-induced expansion or deformation of the boxes leads to dimensional errors; visual sensor and calibration residuals lead to perception errors; repetitive positioning errors of the robotic arm and offset of the suction gripping center lead to execution errors; and multi-coordinate system transformations cause cumulative errors. After the errors are superimposed, in palletizing tasks with tight stacks and small gaps, traditional trajectory planning methods usually use "vertical lifting" movements at the beginning and end, which easily leads to shear-like rigid collisions between the bottom edge of the box and the top edge of the adjacent box, causing box damage, suction cup leakage and falling, or stack collapse, resulting in downtime.

[0003] Secondly, traditional obstacle avoidance solutions, in order to avoid collision risks, uniformly set the horizontal movement height of the robotic arm to the highest obstacle elevation in the entire field, maintaining a high lifting state throughout the process. This results in a large number of ineffective lifting and lowering movements, extending the single-box palletizing cycle time and increasing equipment energy consumption. Although existing global obstacle avoidance planning for general obstacles can generate collision-free paths, it cannot explicitly distinguish and reason about the local free space around the stacking target in the narrow space at the end of the palletizing process. It has poor fault tolerance when facing small stacking spaces, and insufficient palletizing stability under error conditions.

[0004] Third, when the target location is in an extremely confined space (canyon-type or deep well-type constraint) between two boxes or surrounded by three or four sides, traditional methods lack targeted approach strategies, resulting in a significant decrease in success rate. Existing technologies fail to adaptively adjust the approach direction and strategy according to the type of local geometric constraints, and only adopt a uniform vertical drop method. This greatly increases the probability of boxes getting stuck and colliding in narrow spaces, making it difficult to achieve safe and reliable stacking operations in confined spaces.

[0005] Fourth, the existing solution lacks the logic to distinguish the number and orientation of obstacles around the stacking point, and cannot adaptively generate the end approach path for lateral entry, making it difficult to adapt to various narrow stacking scenarios where multiple sizes of boxes are mixed together; while the packing method based on the push-and-pull strategy utilizes contact with the fence, it requires a pre-existing side wall structure, which is not suitable for stacking scenarios on open pallets.

[0006] Therefore, there is an urgent need for a hybrid palletizing robot trajectory planning method that can identify local spatial constraints at palletizing points, adaptively generate lateral entry paths, and plan collision-free crossings of key points as needed, in order to solve the industry pain points of collisions in narrow palletizing spaces and low operating efficiency. Summary of the Invention

[0007] To address the problems existing in the prior art, this invention provides a hybrid palletizing robot trajectory planning method, comprising: Step S1: Obtain the material picking posture information, the palletizing target posture information, and the information of the already stacked boxes of the boxes to be stacked; and determine the material picking point and the palletizing target point according to the material picking posture information and the palletizing target posture information, respectively. Step S2: Identify the number and relative orientation of lateral obstacle surfaces around the palletizing target point based on the information of the already stacked box set, so as to determine the type of local spatial constraint around the palletizing target point; Step S3: Generate the approach axis vector and approach point of the final approach path according to the local space constraint type, so that the end of the robotic arm starts from the approach point and laterally cuts into the palletizing target point along the direction of the approach axis vector; Step S4: Perform potential collision risk detection on the transport path from the picking point to the proximity point, and generate a set of intermediate key points based on the detection results to form a global collision-free path from the picking point to the proximity point. Step S5: Generate a palletizing trajectory based on the material picking point, the set of intermediate key points, the approach point and the palletizing target point, so as to drive the end of the robotic arm to complete the palletizing operation of the box to be stacked.

[0008] Preferably, in step S2, the local spatial constraint type is divided into non-special type and special type according to the type of lateral obstacle surface of the box to be stacked; In step S3, if the local spatial constraint type is non-special type, the approach axis vector and approach point are obtained according to the normal vectors of the bottom surface and all lateral obstacle surfaces, so that the end of the robotic arm moves laterally to the palletizing target point along the approach axis vector direction through the approach point. If the local spatial constraint type is special, the approach axis vector and approach point are obtained based on the normal vectors of the bottom surface and part of the lateral obstacle surface, and the pre-landing point is obtained based on the height of the lateral obstacle surface and the horizontal direction of the approach axis vector, so that the end of the robotic arm moves laterally from the approach point along the direction of the approach axis vector to the pre-landing point, and then descends vertically to the palletizing target point.

[0009] Preferably, in step S2, the non-special type of local spatial constraint includes 0 lateral obstacle surfaces, 1 lateral obstacle surface, and 2 adjacent lateral obstacle surfaces; Special types of local spatial constraints include canyon type and deep well type. The canyon type has two lateral obstacle surfaces that are opposite to each other, and the deep well type has no less than three lateral obstacle surfaces.

[0010] Preferably, in step S3, the generation of the approach axis vector includes mapping the corresponding lateral obstacle surface and bottom surface to unit normal vectors pointing to free space according to the local space constraint type, and then superimposing and discretizing all the unit normal vectors after taking their reverses to obtain the approach axis vector; When the local spatial constraint type is non-special type, all the lateral obstacle surfaces and bottom surfaces are mapped to unit normal vectors pointing to free space; When the local spatial constraint type is canyon type, the higher of the two opposing lateral obstacle surfaces and the bottom surface are mapped to unit normal vectors pointing to free space. When the local spatial constraint type is deep well type, the highest lateral obstacle surface and the lateral obstacle surface and bottom surface orthogonal to it are mapped as unit normal vectors pointing to free space.

[0011] Preferably, in step S3, the palletizing target point is moved back a distance in the opposite direction of the approach axis to obtain the approach point; The approach distance is determined as follows: When the horizontal projection length of the approach axis vector is zero, the approach distance is the product of the height of the box to be stacked and the safety factor; When the horizontal projection length of the approach axis vector is greater than zero, the projection support radius of the box to be stacked in the horizontal projection direction of the approach axis vector is calculated, and the horizontal margin is obtained by multiplying the safety margin by the safety factor after superimposing the safety margin. Then, according to the ratio of the modulus of the approach axis vector to the horizontal projection length, the horizontal margin is converted into the approach distance.

[0012] Preferably, the height of the pre-landing point is not less than the sum of the height of the palletizing target point and the minimum height margin, and the horizontal position of the pre-landing point is the position of the palletizing target point after applying a bounded offset along the horizontal sign direction of the proximity axis vector.

[0013] Preferably, step S4 includes: Step S41: The space occupancy of the box to be stacked during the process of moving from the picking point to the approach point is modeled as a sweep envelope. The sweep envelope is obtained by expanding the stack area envelope rectangle on the horizontal plane by half the size of the box to be stacked plus a safety margin. Step S42: Trim and intersect the line segment from the picking point to the approach point with the sweep envelope to obtain the intersection endpoints of the line segment and the sweep envelope. If there is no intersection, it is determined that there is no potential collision risk, and the intermediate key point set is configured to be empty. If there is an intersection, it is determined that there is a potential collision risk. Then, the in-stack edge point and the out-stack edge point are generated as elements of the intermediate key point set. The generation of in-stall edge points and out-stall edge points includes: Intersecting sections are identified as hazardous areas that need to be lifted and crossed, and a subset of potential collision obstacle boxes is selected accordingly. Obtain a unit vector along the trajectory direction from the material picking point to the approach point, and calculate the half-projection length of the box to be stacked in the direction of the unit vector; The boundary points of the subset of potential collision obstacle boxes are offset outward by the half-projection length along the trajectory direction to obtain the horizontal positions of the in-stack edge point and the out-stack edge point; The lifting height positions of the infeed edge point and the outfeed edge point are obtained by superimposing the highest height of the top surface of the potential collision obstacle box subset with the height of the box to be stacked and the safety clearance.

[0014] Preferably, step S5 includes: Step S51: Construct an initial key point sequence based on the material picking point, the intermediate key point set, the proximity point, and the palletizing target point. Step S52: Perform structural concave sliding culling on the elements contained in the intermediate keypoint set in the initial keypoint sequence to obtain the final keypoint sequence. Step S53: Perform segmented cubic Hermite interpolation on the final key point sequence to generate a discrete trajectory point sequence with continuous position, and use quaternion spherical linear interpolation to generate an attitude sequence with continuous attitude.

[0015] Preferably, in step S53, the attitude sequence is generated based on attitude timing constraints, wherein all attitude adjustments are completed before reaching the stack area, and only translational movements are performed within the stack.

[0016] This invention also provides a hybrid palletizing robot trajectory planning system, which applies the above-mentioned hybrid palletizing robot trajectory planning method, including: The status acquisition module is used to acquire the material picking posture information, the palletizing target posture information, and the set information of the already stacked boxes of the boxes to be stacked, and to determine the material picking point and the palletizing target point according to the material picking posture information and the palletizing target posture information, respectively. A local geometric constraint identification module, connected to the state acquisition module, is used to identify the number and relative orientation relationship of lateral obstacle surfaces around the palletizing target point based on the information of the already stacked box set, so as to determine the type of local spatial constraint around the palletizing target point; The proximity strategy generation module is connected to the local geometric constraint recognition module and is used to generate the proximity axis vector and proximity point of the final proximity path according to the local spatial constraint type, so that the end of the robotic arm starts from the proximity point and laterally cuts into the palletizing target point along the proximity axis vector direction. The key point generation module is connected to the proximity strategy generation module. It is used to perform potential collision risk detection on the material handling path from the picking point to the proximity point, and generate a set of intermediate key points based on the detection results to form a global collision-free path from the picking point to the proximity point. The trajectory and attitude planning module is connected to the crossing key point generation module and is used to generate a palletizing trajectory based on the material picking point, the intermediate key point set, the approach point and the palletizing target point, so as to drive the end of the robotic arm to complete the palletizing operation of the box to be stacked.

[0017] The above technical solution has the following advantages or beneficial effects: 1) By identifying the number and relative orientation of lateral obstacles around the palletizing target point, different types of local spatial constraints are distinguished, and corresponding lateral approach paths are generated. This changes the traditional vertical drop box placement method, replacing rigid impacts from sharp corners with low-speed side contact of the box. This significantly offsets multiple superimposed errors such as box deformation, visual calibration, and mechanical positioning, effectively reducing the probability of box collisions, suction cup detachment, stack tipping, and production line shutdowns under tight mixed stacking conditions.

[0018] 2) By conducting collision detection on the material handling path from the picking point to the proximity point, intermediate key points are generated as needed to construct a global collision-free path. This abandons the traditional movement mode of uniformly raising the entire process to the highest obstacle in the field. The lowest lifting point is only set when there is a risk of collision, reducing ineffective lifting actions, shortening the single-box palletizing cycle time, and reducing the energy consumption of the robotic arm.

[0019] 3) Based on the material picking point, intermediate key point, approach point and palletizing target point, a complete semantic path set is formed to generate an executable palletizing trajectory. The path logic is clear and the geometric reasoning process is intuitive and interpretable. There is no need to build fences in advance, machine learning training samples or additional force sensing hardware. The trajectory planning is completed only by the geometric size and spatial position data of the box. The hardware cost is lower, and it is suitable for various open pallet mixed palletizing scenarios. The engineering implementation is simple and the cross-device reusability is strong. Attached Figure Description

[0020] Figure 1 A flowchart illustrating a hybrid palletizing robot trajectory planning method is provided in a preferred embodiment of the present invention. Figure 2 This is a schematic diagram of a sub-process of step S2 in a preferred embodiment of the present invention; Figures 3(a) to 3(d) are schematic diagrams of four types of local spatial constraints and approach directions in a preferred embodiment of the present invention; Figure 4 In a preferred embodiment of the present invention, a comparison diagram of the path morphology of the final approach trajectory generated by the present invention and the traditional gate-type trajectory is provided. Figure 5 In a preferred embodiment of the present invention, a schematic diagram of the force analysis of two approach strategies in the presence of horizontal error is shown. Figure 6 This is a schematic diagram of a sub-process of step S4 in a preferred embodiment of the present invention; Figure 7 This is a schematic diagram of a sub-process of step S5 in a preferred embodiment of the present invention. Figure 8 This is a schematic diagram of a successful palletizing result under error conditions in the Gazebo physical simulation environment, which is a preferred embodiment of the present invention. Figure 9 The diagram shows the joint currents of a real robot. (a) is the joint current curve during vertical descent, and (b) is the joint current curve during lateral pushing of a 4 kg box. The shaded area represents the contact phase, and the six curves correspond to joints J1–J6. Figure 10 This is a schematic diagram of a hybrid palletizing robot trajectory planning system, which is a preferred embodiment of the present invention. Detailed Implementation

[0021] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment; other embodiments that conform to the spirit of the present invention may also fall within the scope of the present invention.

[0022] In a preferred embodiment of the present invention, based on the problems of collisions during the vertical descent of the hybrid palletizing end section, poor error tolerance, and low efficiency due to ineffective lifting of the gate-shaped trajectory in the prior art, a hybrid palletizing robotic arm trajectory planning method is provided. This method can be deployed in an integrated system including a robot body, an end effector gripper, a sensing and upper-level control computing unit, and a planning and execution software module. The entire logic relies solely on the box geometry and spatial coordinates to complete explicit geometric reasoning, without the need for force sensors, pre-set fixed fences, or massive training datasets. It is adaptable to various sizes of mixed pallet stacking conditions, and the parameters only require minor adjustments when ported to different six-axis and collaborative robotic arm platforms, demonstrating strong engineering reusability.

[0023] like Figure 1 As shown, the method includes: Step S1: Obtain the material picking posture information, the palletizing target posture information, and the information of the already stacked boxes for the boxes to be stacked; and determine the material picking point and the palletizing target point based on the material picking posture information and the palletizing target posture information, respectively. Step S2: Identify the number and relative orientation of lateral obstacle surfaces around the palletizing target point based on the information of the already stacked box set, so as to determine the type of local spatial constraint around the palletizing target point; Step S3: Generate the approach axis vector and approach point of the final approach path according to the local space constraint type, so that the end of the robotic arm can laterally cut into the palletizing target point from the approach point along the approach axis vector direction. Step S4: Perform potential collision risk detection on the material handling path from the picking point to the proximity point, and generate a set of intermediate key points based on the detection results to form a global collision-free path from the picking point to the proximity point. Step S5: Generate a palletizing trajectory based on the material picking point, intermediate key point set, approach point and palletizing target point, so as to drive the end of the robotic arm to complete the palletizing operation of the box to be placed.

[0024] Specifically, in step S1, the material picking pose information includes the three-dimensional physical dimensions (l, w, h) of the box to be stacked, and the top center pose (c) including the three-dimensional coordinates of the top center and the XYZ Euler rotation angle. x ,c y ,z top , The pose information (θ, ψ) can be provided by the upstream vision recognition system; the target pose information includes the top center pose (c) inside the target container. x,goal ,c y,goal ,z top,goal , ,θ goal ,ψ goalThe top center coordinates and target rotation posture of the boxes to be stacked are represented by the layout planning module, which can be provided by the upstream layout planning module. The output of the layout planning module is a series of target stacking postures with three-dimensional coordinates and rotation angles.

[0025] In this context, the top center point of the material picking pose information and the palletizing target pose information are determined as the material picking point and the palletizing target point, respectively, with the palletizing target point denoted as P. target =[c x,goal ,c y,goal ,z top,goal The height of the top and bottom surfaces of the boxes to be stacked at the target stacking point are determined accordingly.

[0026] In this embodiment, each stacked box in the stacked box set information is preferably represented by an axis-aligned bounding box (AABB), which includes size and top center coordinate information. In the case of arbitrary tilting of boxes in real working conditions, when the input posture is a general Euler angle or quaternion, this embodiment will not directly use the irregular bounding box of the tilted box to participate in obstacle determination. Instead, before the local geometric constraint perception in step S2, it is uniformly converted into a conservative AABB axis-aligned outer envelope parallel to the XY coordinate axis of the tray. This avoids the safety risk of missing obstacles at the corners of the tilted box and maintains the safety conservatism of the subsequent proximity determination.

[0027] The input data mentioned above can be transmitted to this system through ROS Topic or service interface, thereby achieving seamless connection with the upstream visual recognition module and layout planning module.

[0028] Furthermore, to facilitate engineering implementation and cross-platform parameter reuse, this embodiment centrally manages the parameters related to trajectory generation and execution in the form of JSON configuration files, and performs type conversion and boundary constraints on the parameters at runtime through a configuration manager. The parameters involved can be divided into three categories according to their function: One is safety and fault tolerance parameters, including lateral proximity threshold ∆side, effective height threshold ∆z, pre-landing point horizontal offset (δx,δy), safety factor λ, and safety crossing margin Zmargin, which are used to control the sensitivity of constraint recognition, filter low invalid obstacles, avoid the pre-landing point from being close to the side wall, establish a spatial buffer for approach distance, and ensure vertical clearance during crossing. The second is the trajectory generation parameters, including spline smoothness (tension parameter) α∈[0,1], approach point relaxation ratio ρ∈[0,1], approach point maximum offset ∆app, and corner smoothing radius r, which are used to adjust the interpolation smoothness, weaken the corner curvature abrupt change, and maintain the geometric semantics of entering from the approach direction, respectively. The third category consists of kinematic and execution parameters, including execution-side velocity scaling and acceleration scaling, retiming velocity ratio ηv and acceleration ratio ηa, and Cartesian step size. s, retiming period t and the total number of points on the forward path Nf. In a set of example configurations, m = 20mm, ρ = 0.35, app=50mm, Nf=30, α=0.5, t=0.01s, etav=0.6, etaa=0.15, s = 0.01m, r = 150mm, default safety factor λ = 1.25; to avoid abnormal configurations leading to unexecutable trajectories or unstable values, ρ is clamped to [0,1]. t is clamped to [0.002, 0.05]. s clamp to [10 -5 [0.05], and clamp ηv and ηa to [0.01,1].

[0029] With this centralized parameter management, the method of the present invention can be migrated and deployed without retraining or calibrating for specific hardware.

[0030] After completing the state acquisition and parameter configuration, step S2 divides the local space constraint type into non-special type and special type according to the lateral obstacle surface type of the box to be stacked. The non-special type includes unconstrained type, single-sided constraint type and L-constraint type, and the special type includes canyon type and deep well type, so as to realize explicit reasoning on the local free space structure around the stacking target point.

[0031] In a preferred embodiment of the present invention, such as Figure 2 As shown, step S2 includes: Step S21: Based on the information of the stacked box set, with the stacking target point as the center, perform proximity determination in four horizontal directions. When a lateral obstacle surface is determined to exist in any horizontal direction, the corresponding obstacle Boolean value is configured as 1; otherwise, it is configured as 0, resulting in a four-way obstacle Boolean value (0). +x O -x O +y O -y ); Step S22: The sum of the four obstacle Boolean values ​​is used as the number of lateral obstacle surfaces. The relative directional relationship is determined based on the value distribution of each obstacle Boolean value, and then the local spatial constraint type is matched.

[0032] Specifically, in this embodiment, the box to be stacked is denoted as target box T, with dimensions [L, W, H], and the stacking target point Ptarget = [c x,goal ,c y,goal ,z top,goal [and the height of the top surface of the boxes to be stacked] Height of the bottom surface of the boxes to be stacked The set of coded boxes {B} j Represented by an axis-aligned bounding box (AABB), its upper and lower height bounds are respectively... and And its top surface height .

[0033] When performing step S21, the palletizing target point P is used. target Centered on the target, all AABB bounding boxes of the pre-coded boxes are traversed sequentially along the four horizontal orthogonal directions of +X, -X, +Y, and -Y, and two sets of adjustable configuration parameters are introduced to complete the effective obstacle screening: The first group is highly effective thresholds. z, the determination rule is that it only applies when the height of the top surface of the stacked box is... Only then is it determined that the already stacked box can laterally obstruct the box to be stacked, and that there are ineffective low-lying interference objects such as filter trays and low-lying pads.

[0034] The second group is the lateral proximity threshold. side, only when the horizontal projections of the box to be stacked overlap with those of the already stacked box, and the distance between the projections of the opposite faces of the two boxes falls within [0, Within the [side] interval, a lateral obstacle is determined to exist in that direction. Preferably, the projection spacing is determined based on the one-dimensional projection overlap length. The formula for calculating the one-dimensional projection overlap length is: overlap(a,b) = min(amax,bmax) - max(amin,bmin). When the overlap length overlap(a,b) is greater than 0, it is considered that there is effective occlusion. For example, the surface distance in the +X direction can be taken as the difference between the minimum x-coordinate of the already stacked box and the maximum x-coordinate of the box to be stacked, i.e. .

[0035] After each horizontal obstacle determination is completed, a corresponding Boolean flag is generated: 1 if a lateral obstacle exists, and 0 if no obstacle exists. This results in a Boolean array of obstacles in all four directions.

[0036] When performing step S22, first sum the Boolean values ​​to obtain the total number of lateral obstacles C. Then, combine the locational relationship of the obstacles with the matching constraint type: C=0 indicates an unconstrained type, meaning the surrounding area is completely empty; C=1 indicates a single-sided constraint type, as shown in Figure 3(a), where there are stacked boxes on only one side; When C=2 and the directions of the two obstacle surfaces are adjacent, the L-constraint type is determined, as shown in Figure 3(b). The coordinate axes of the two obstacles are perpendicular to each other, forming a right-angled void. With C=2 and the two obstacle surfaces facing opposite directions, i.e., a pair of obstacles in the X direction or a pair in the Y direction are distributed opposite each other, as shown in Figure 3(c), the canyon type is determined, forming a narrow passage on both sides; C≥3 indicates a deep well type, as shown in Figure 3(d), where three or four sides surround and form a closed, narrow pit.

[0037] Five types of constraints fully cover all narrow stacking conditions in mixed palletizing. Based on this, the free space structure around the palletizing target point, which was originally difficult to use directly, is explicitly modeled as a determinable geometric quantity and its combination form. This provides a basis for subsequent adaptive generation of approach strategies according to the type of local spatial constraints, thereby overcoming the collision risk and decreased success rate caused by the traditional method of not distinguishing the constraint form and uniformly adopting the vertical descent method.

[0038] After determining the type of local spatial constraint, step S3 generates the approach axis vector and approach point of the final approach path. The generation of the approach axis vector includes mapping the corresponding lateral obstacle surface and bottom surface to unit normal vectors pointing to free space according to the type of local spatial constraint, and then superimposing and discretizing all unit normal vectors after taking their reverses to obtain the approach axis vector. Specifically, the bottom surface is always the obstacle surface, and its corresponding unit normal vector is in the vertically upward direction, denoted as n. bottom =[0, 0, 1]. If there is a lateral obstacle in the +X direction, then a unit normal vector [-1, 0, 0] is added to the free space in the -X direction, and the same applies to other directions. The proximity axis vector is obtained by taking the inverse superposition of the unit normal vectors of all lateral obstacles and then discretizing it. The calculation formula is as follows:

[0039] in, To approximate the axis vector, bottom is the bottom surface of the tray. This represents the set of unit normal vectors pointing to free space obtained by mapping from each lateral obstacle surface. is the unit normal vector of the lateral obstacle surface; sgn(·) is the component sign function, used to map each non-zero component to -1 or +1, and keep the zero component as 0, so as to reduce the influence of the difference in the number of obstacles on the composite weight and restrict the lateral translation to the discrete axis.

[0040] The rules for synthesizing near-axial quantities corresponding to different types of local spatial constraints are as follows: 1) When the local space constraint type is unconstrained, single-sided constrained, or L-constrained, all lateral obstacle surfaces and bottom surfaces are mapped to unit normal vectors pointing to free space to ensure natural bias towards open areas.

[0041] 2) When the local spatial constraint type is canyon type, there is a pair of relative obstacles. Direct superposition may cause the XY components to cancel each other out (e.g., [-1, 0, 0] + [1, 0, 0] = [0, 0, 0]), which will cause the approach axis to degenerate into a pure vertical descent and lose the advantage of lateral flexible approach. In order to avoid the cancellation of the normal vectors of the relative obstacle surfaces leading to the degradation of the approach axis, a height-priority synthesis rule is adopted, that is, the higher one of the two relative lateral obstacle surfaces and the bottom surface are mapped to a unit normal vector pointing to free space to ensure that there are clear components in the XY direction.

[0042] Specifically, the highest heights h1 and h2 of the two opposing obstacle surfaces are obtained respectively, and the free space normal vector corresponding to the side with the higher height is selected as the dominant direction. Only the normal vector and the bottom normal vector are used in the synthesis, and the calculation formula is as follows:

[0043] For example, when the obstacle height in the +X direction is h+x = 200 mm and the obstacle height in the -X direction is hx = 150 mm, selecting the free space normal vector [-1, 0, 0] corresponding to the +X direction to participate in the synthesis can result in a near axis with a clear -X lateral component.

[0044] 3) When the local space constraint type is deep well type, the synthesis rule of orthogonal selection surface is adopted, that is, the highest lateral obstacle surface and the lateral obstacle surface orthogonal to it and the bottom surface are mapped to unit normal vectors pointing to free space to avoid the vector cancellation problem.

[0045] Specifically, all lateral obstacle surfaces are sorted in descending order of height, and obstacle surfaces orthogonal to the selected directions are selected sequentially from high to low. This typically forms two directions, one horizontal and one vertical (e.g., [-1, 0, 0] and [0, -1, 0]), which together with the bottom surface form the approach axis. The calculation formula is as follows:

[0046] The above processing ensures that the XY projection of the approach axial quantity does not degenerate in extremely confined spaces, thus giving the subsequent calculation of the approach point and the pre-landing point a stable geometric semantics. Furthermore, by making the final motion present a lateral component, the risk of traditional "edge-edge" vertical hard collision is transformed into "face-to-face" low-speed contact or sliding contact, which significantly improves the success rate of stacking under error conditions.

[0047] After determining the approach axis vector, the palletizing target point is moved back a distance d in the opposite direction of the approach axis vector to obtain the approach point P. app The calculation formula is as follows: .

[0048] Wherein, let the approach axis vector be... Its horizontal projection length The approach distance d is determined as follows: when When the horizontal projection length of the approach axis vector is zero, the final segment is a pure vertical descent (without lateral components). The approach distance d only needs to provide a vertical gap. In this case, the approach distance d is the product of the height H of the box to be stacked and the safety factor λ. ; when When the horizontal projection length of the approach axis vector is greater than zero, the final segment approaches obliquely (with a lateral component). First, calculate the horizontal projection direction of the box to be stacked in the approach axis vector direction. The horizontal margin is obtained by multiplying the projected support radius, the safety margin, and the safety factor λ. The calculation formula is as follows:

[0049] in, The safety margin (mm) is where L is the length of the box to be stacked, and W is the width of the box to be stacked. The default safety factor λ = 1.25 is used to establish a space buffer.

[0050] Subsequently, based on the principle of similar triangles, the horizontal allowance is converted into a proximity distance according to the ratio of the modulus of the axial quantity to the horizontal projected length. The calculation formula is as follows:

[0051] This calculation method can naturally degenerate under different proximity conditions such as axial and diagonal, and provides a consistent lateral geometric margin under different proximity angles. This ensures that the process of the robotic arm end effector cutting laterally into the palletizing target point from the proximity point along the proximity axis vector direction has the necessary geometric buffer, thereby reducing the risk of end-stage collision in closely stacked scenarios.

[0052] The aforementioned rules for calculating the approach distance geometrically ensure that lateral entry has the necessary spatial margin. However, the approach distance itself only determines the spatial position of the approach point. What truly determines the direction in which the robotic arm's end effector enters the target point, and consequently, the form of contact between the end effector and the surrounding stacked boxes, is the approach axis vector. Spatial orientation. To intuitively illustrate the essential difference in geometric path between the lateral approach strategy employed in this invention and the traditional vertical descent strategy, Figure 4 The trajectory patterns of the two methods at the end of the palletizing process were compared. For example... Figure 4As shown in (a) and (b), the traditional gate-type trajectory adopts a vertical lifting method at the edge of the stacking area. The end of the robotic arm carries the box and descends directly to the target pose in the vertical direction. During this process, the bottom edge of the box and the top edge of the already stacked box are in the same projection area in the vertical direction. If there is any positive dimensional error or positioning deviation, the bottom edge of the box will inevitably have a shear-type rigid collision with the top edge of the adjacent box. However, the trajectory generated by the present invention has a clear lateral component when approaching the target pose. The end of the robotic arm starts from the approach point and cuts obliquely into the empty space in the stack along the approach axis vector direction, so that the box to be stacked slides into the target position in a low-speed side-fitting manner, transforming the risk of vertical hard collision of the traditional "edge-edge" into low-speed "surface-surface" fitting or sliding contact.

[0053] Figure 4 Figures (c) and (d) further demonstrate the trajectory generation results of the present invention under L-constraint and deep well constraints. It can be seen that even if there are lateral obstacles in multiple directions around the target pose, the present invention can still adaptively synthesize an approach direction with a clear lateral component according to the local spatial constraint type, ensuring that the end of the robotic arm always enters the target position along the local free space direction, rather than forcibly inserting vertically into the restricted space.

[0054] Figure 4 The differences between the two methods are revealed through the geometric morphology of the trajectories, and the mechanical mechanism behind this morphological difference is explained by... Figure 5 To provide a more in-depth explanation. For example... Figure 5 As shown in (a), when the robotic arm descends vertically carrying a box, the bottom edge of the box to be stacked and the top edge of the already stacked box form a line-edge contact in the vertical direction. If there is a positive error in the box dimensions (i.e., the actual size is larger than the nominal size) or a horizontal deviation in positioning, the theoretical gap between them decreases or even disappears. The vertical descent causes the two boxes to collide in a very short time, and the contact force is concentrated on the edges of the boxes in the vertical direction, generating an instantaneous rigid impact. The peak value of this impact force far exceeds the allowable crushing load of conventional cardboard boxes. This can cause minor damage such as crushing and breaking of the box corners, or even serious damage such as air leakage from the suction cups, box falling, or even the collapse of the entire stack. Simultaneously, the sudden increase in impact current may trigger the robot's overload protection, leading to a shutdown. Figure 5As shown in (b), this invention employs a lateral low-speed bonding approach. The end of the robotic arm advances along the approach axis direction with a lateral component, forming a surface-to-surface contact between the side of the box to be stacked and the side of the already stacked box. Even if there is a positive error in the box dimensions causing a reduction in the theoretical gap between them, the contact force acts horizontally on the side of the box because the lateral advancement speed is limited to a low-speed quasi-static range. Under surface pressure, the cardboard of the box has a certain elastic deformation capacity, which can convert the impact energy into a bounded frictional contact and sliding process, effectively absorbing the geometric interference caused by dimensional uncertainties. This transformation from a "line-edge rigid impact" to a "surface-to-surface frictional contact" mechanical model fundamentally explains the theoretical basis for maintaining a high success rate under error conditions.

[0055] Having clarified the geometry and mechanical mechanism of the lateral approach strategy, this embodiment further addresses extremely constrained scenarios such as canyon-shaped and deep-well-shaped spaces by introducing a pre-landing point strategy in step S3 to improve executability and robustness. In a preferred embodiment of the invention, when the local spatial constraint type is canyon-shaped or deep-well-shaped, step S3 further includes generating a pre-landing point Ppre as the final strategy switching point, so that the end effector of the robotic arm first slowly conforms to / advances along the approach axis vector to the pre-landing point and stops, and then enters the palletizing target point P from the pre-landing point in a vertical descent manner. target, This significantly improves feasibility and robustness in narrow spaces such as canyons and deep wells.

[0056] Specifically, in the canyon type, let the height of the two opposing obstacle surfaces be h. high with h low (h) high ≥ h low ), Pre-landing point height z pre The preferred value is the average of the highest heights of the two relative obstacle surfaces, i.e. .

[0057] In deep well scenarios, it is preferable to first sort the lateral obstacle surfaces in descending order of height to obtain h. (1) ≥h (2) h (3) ≥…, take the average height of the second and third highest obstacles as the pre-landing point height, that is… .

[0058] If the calculated pre-landing point height is not higher than the target palletizing point height, then raise it to the target palletizing point height plus a minimum height margin of millimeters δmin to ensure that the segmented strategy of stabilizing first and then landing is valid.

[0059] To avoid the pre-landing point moving too close to the sidewall, the horizontal position of the pre-landing point is the position of the palletizing target point after applying a bounded offset along the horizontal sign direction close to the axis vector. The expression is as follows:

[0060] in, Configure offset.

[0061] After generating the final approach strategy, step S4 proceeds to the global trajectory level, performing potential collision risk detection on the transport path from the material pick-up point to the approach point. In a preferred embodiment of the present invention, such as... Figure 6 As shown, step S4 includes: Step S41: The space occupied by the box to be stacked during its movement from the picking point to the approach point is modeled as a swept envelope. The swept envelope is obtained by expanding the stacking area envelope rectangle on the horizontal plane by half the size of the box to be stacked plus a safety margin. The expanded sweep envelope is obtained by extending the sum of the half-dimensional dimension of the box to be stacked in each direction outward from the boundary in each direction and the safety margin. It is expressed as follows:

[0062] Expanding the above equation yields:

[0063] Where, d x = L / 2 + m,d y = W / 2 + m, where m is the safety margin. This expansion operation ensures that the case where "the top centerline does not pass through the stack area but the edge of the box does" is captured, thus conservatively transforming the 3D sweep collision detection into a clipping and intersection problem of 2D line segments and the expansion rectangle.

[0064] Step S42: Trim and intersect the line segment from the picking point to the nearest point with the sweep envelope to obtain the intersection endpoints of the line segment and the sweep envelope. If there is no intersection, it is determined that there is no potential collision risk, and the intermediate key point set is configured to be empty. If there is an intersection, it is determined that there is a potential collision risk. Then, the in-stack edge point and the out-stack edge point are generated as elements of the intermediate key point set.

[0065] In the specific implementation, the line segment from the material pick-up point to the nearest point can be parameterized as follows:

[0066] The Liang-Barsky algorithm is then used to calculate the intersection parameter range [u1, u2] between the line segment and the expanded rectangle. When u1 ≥ u2, it indicates that the line segment and the expanded rectangle do not intersect, and it is determined that there is no potential collision risk throughout the path. The set of intermediate key points is directly set to empty, and only the material pick-up point P is retained in the basic path. start Approaching point P app Palletizing target point P targetThird, when u1<u2, it indicates that the line segment intersects the inflated rectangle, and the physical section corresponding to the intersection segment [u1, u2] is the dangerous area that needs to be lifted to cross, and then the stack entry edge point and stack exit edge point are generated as elements of the intermediate key point set.

[0067] In a preferred embodiment of the present invention, generating the stack entry edge point and the stack exit edge point includes: Taking the intersecting section as the dangerous area that needs to be lifted to cross, and screening out the potential collision obstacle box subset Bsweep accordingly; Obtaining a unit vector along the trajectory direction from the material taking point to the approaching point, and calculating the half projection length of the length and width of the box d to be stacked in the direction of the unit vector v This half projection length changes adaptively with the movement direction; Offsetting the boundary points of the potential collision obstacle box subset outward by the half projection length along the trajectory direction to obtain the horizontal position of the stack entry edge point and the horizontal position of the stack exit edge point , where, and are the earliest stack entry boundary and the latest stack exit boundary respectively, which are used to characterize the boundary points of the potential collision obstacle box subset, so as to ensure that the trajectory of the top center point entering or exiting the stacking area strictly corresponds to the physical box entity entering or exiting the stacking area, and avoid edge scratching. Preferably, let v be the unit vector in the direction of the trimmed trajectory, project the footprint corner points of each obstacle box onto v to obtain an ordered scalar interval, and then obtain the earliest stack entry boundary and the latest stack exit boundary and .

[0068] If the potential collision obstacle box subset is not empty, since the height of the trajectory points adopts the top surface height of the carried box, to ensure that there is still sufficient vertical clearance when the bottom surface of the carried box crosses the obstacle, Minkowski inflation with the carried box height H is performed on the obstacle height in the z direction, specifically, the highest top surface height of the obstacles in the potential collision obstacle box subset is superimposed with the height of the box to be stacked and the safe crossing margin to obtain the lifting height positions of the stack entry edge point and the stack exit edge point. Based on this, the crossing height exactly covers the top surface of the highest obstacle plus the height of the carried box plus the safety margin, which avoids the redundancy of the traditional gantry trajectory that is always lifted to a fixed elevation, reduces unnecessary lifting while ensuring collision-free crossing, improves the stacking rhythm and reduces energy consumption.

[0069] If the potential collision obstacle box subset is empty, the lifting height positions of the stack entry edge point and the stack exit edge point are configured as the higher top surface height of the material taking point and the approaching point.

[0070] After obtaining the material taking point, the intermediate key point set and the approaching point, step S5 generates a complete stacking trajectory, such as Figure 7As shown, step S5 includes: Step S51: Construct an initial key point sequence based on the order of material picking point, intermediate key point set, proximity point and palletizing target point; Step S52: Perform structural concave sliding sliding culling on the elements contained in the intermediate keypoint set in the initial keypoint sequence to obtain the final keypoint sequence. Step S53: Perform segmented cubic Hermite interpolation on the final keypoint sequence to generate a discrete trajectory point sequence with continuous position, and use quaternion spherical linear interpolation to generate an attitude sequence with continuous attitude.

[0071] In a preferred embodiment of the present invention, in step S53, an attitude sequence is generated based on attitude timing constraints, wherein all attitude adjustments are completed before reaching the stack area, and only translational motion is performed within the stack.

[0072] Specifically, when sweeping obstacles exist, the initial key point sequence is a five-point structure consisting of the picking point, the entry edge point, the exit edge point, the approach point, and the stacking target point. When there are no sweeping obstacles, the sequence degenerates into a three-point structure consisting of the picking point, the approach point, and the stacking target point.

[0073] When the initial keypoint sequence is a three-point structure, the initial keypoint sequence is the final keypoint sequence. When the initial keypoint sequence is a five-point structure, the elements (P) contained in the set of intermediate keypoints in the five-point sequence... entry P exit To perform structural concave diving detection, redundant lifting caused by trajectory concavity after order reduction is removed.

[0074] The process of detecting the concave structure during descent includes: Traverse all points within the initial keypoint sequence, compare the Z-coordinate of the point with the interpolated height of the line connecting the points before and after it. If the point is lower than the line connecting it, it is considered a concave, redundant, and lifted point and is deleted. For example, if the candidate point is P... v First, calculate its parametric projection and interpolated height relative to the reference line segment AB (the line connecting its immediate and next adjacent points):

[0075] when When the structure is concave, the candidate point is removed. After order reduction, the sequence is dynamically reduced to 4 points or 3 points, but at least the picking point, approach point, and palletizing target point are retained to maintain the geometric semantics of entering from the approach direction.

[0076] In the specific implementation of step S53, position interpolation uses piecewise cubic Hermite splines and Catmull-Rom tangent vectors. Unlike traditional high-order B-splines, this interpolation requires strict adherence to anchor key points (especially proximity points) to maintain the specified lateral proximity geometry. The tangent vector is weighted by neighbor distances and scaled using a tension parameter α to obtain robust smoothness. The number of sampling points in each segment is distributed proportionally to the segment length, ensuring that the overall output number of points meets the preset trajectory resolution requirements. The generated trajectory is continuous in both position and velocity, suitable for subsequent Cartesian path completion and time parameterization at the execution end.

[0077] To balance the geometric constraints of lateral insertion with the smoothness of joint space motion, soft constraint relaxation of the approach point is allowed within a bounded range. That is, given the approach point and its adjacent keypoints before and after it, the projection point of the approach point toward the line connecting the adjacent keypoints is moved in a bounded manner according to a relaxation ratio ρ. In one embodiment, soft constraint relaxation of the approach point can be implemented as follows: Given the original approach point P... app Its adjacent control point P prev ,P next , will P app Towards line segment P prev P next The projection point moves in a bounded manner. Let

[0078] The approach point after relaxation is:

[0079] Where ρ∈[0, 1] is the relaxation ratio, and ∆app is the maximum allowable offset (mm). If the offset is exceeded, the material will be cropped proportionally.

[0080] Furthermore, the preferred method also includes smoothing the corners of key intermediate points using a quadratic Bézier curve blend, with the smoothing distance being the minimum value among the corner smoothing radius and the lengths of the segments before and after the corner, within a certain ratio. For example, if the incident and exit unit directions are u... in ,u out Select smooth distance Construct endpoint A = C−du in B = C + du out The curve is:

[0081] The original corner neighborhood points are then replaced with discrete samples. To avoid deviations from proximity semantics due to smoothing, a deviation constraint can be introduced for corners containing proximity points: if the minimum distance between the smoothed curve and the proximity point exceeds ∆app, the smoothing distance is reduced proportionally until the constraint is satisfied.

[0082] For attitude interpolation, quaternion spherical linear interpolation (Slerp) is used to generate attitude sequences. When the input attitude is Euler angles, it can be converted to quaternions before interpolation. To reduce the risk of attitude sweep interference within the stack area (significant in-stack rotational offset may cause the box end to collide with adjacent obstacles), in one embodiment, attitude adjustment is forced to be completed before penetrating the pallet projection. Let u∈[0,1] be the normalized arc length parameter along the position trajectory (i.e., u=s / s). total s is from P start (Cumulative arc length at departure). If the edge point P of the stack is constructed. entry Then let u entry For P entry The corresponding arc length parameter; if the edge point P of the stack is not constructed. entry Then take u entry =1. The attitude sequence is defined as... This constraint requires that across u entry Beforehand, overall rotation synchronization is completed to ensure that the load rigidly maintains the target attitude throughout the obstacle crossing and final insertion process, thereby reducing the risk of attitude sweep interference caused by significant in-stack rotational offset in crowded areas, which could lead to the box end colliding with adjacent obstacles.

[0083] The trajectory generation method using semantic key points and continuous interpolation makes the position and orientation smooth and continuous, which is convenient for engineering execution and parameter reuse.

[0084] After the palletizing trajectory is generated, the trajectory execution module completes the closed-loop execution. In one embodiment, the trajectory generation end outputs a single-box trajectory data record (e.g., using serialized forms such as JSON / Protobuf / custom structures). This record includes at least: box number (e.g., box_num), box size (e.g., box_size), material picking pose, target palletizing pose, planning method identifier (e.g., planning_method), and a sequence of path points from material picking to the target (e.g., material_get_to_pallet) and a sequence of return path points (e.g., pallet_to_material_get). Each path point may include position, orientation (e.g., quaternion or Euler angles euler_zyx, ZYX order), frame, dynamics constraints (e.g., velocity_scaling), and optional stop and tag (e.g., vertical descent key point). To ensure clarity, in a preferred embodiment, the angle unit is uniformly rad; if deg is used as input, it is uniformly converted to rad on the parsing side and the unit marker is retained in the record (or deg / rad is determined by amplitude threshold as a compatible implementation).

[0085] In one embodiment, the execution end resolves path points into a sequence of pose targets. When the path point reference system is not the robot's base coordinate system, it is unified to the robot's base coordinate system through coordinate transformation. Subsequently, Cartesian path completion is invoked to generate a continuous trajectory, and the completion accuracy and speed are controlled by combining the configured Cartesian step size and collision detection switch. To suppress jitter caused by sparse points, the execution end performs time parameterization and retiming on the joint sequence, performs time resampling based on the retiming period, and generates smooth acceleration and deceleration curves by combining joint velocity, acceleration upper limit, and retiming velocity and acceleration ratios.

[0086] In one specific embodiment, the present invention does not rely on force sensors or explicit force control, but achieves flexible approach through low-speed quasi-static contact and passive flexibility of the end-adsorption structure: the actuator scales and limits the speed and acceleration, with both the speed scaling factor and acceleration scaling factor having an upper limit of 0.3, and further limits the speed in the final segment containing contact semantics (e.g., near the approach point or the vertical descent segment from the pre-landing point to the landing point) to suppress contact peaks and impacts. When a pre-landing point strategy is adopted, a stopping semantic is set at the pre-landing point and the final vertical descent action after stopping is executed. After completing the execution of a single box, the actuator outputs the execution status and box number, and the trajectory generation end subscribes to this status to realize box sequence advancement, failure retry, or alarm handling, thereby forming a closed-loop workflow that can be implemented in engineering.

[0087] In a specific example, the trajectory generation end and the execution end are deployed as ROS nodes. The trajectory generation node publishes the trajectory information of a single box to a specified topic in the form of a JSON string, and the execution end subscribes to the topic and publishes the execution status to the status topic.

[0088] To verify the practical effect of this invention, this embodiment compares the method of this invention with the traditional gantry trajectory method in the Gazebo physics simulation environment. The experimental platform is an aubo-i5 six-DOF industrial robotic arm and a vacuum suction cup. The test dataset contains three sets of mixed palletizing tasks: the first set contains 27 boxes, adapted from an industrial tight palletizing scenario; the second set contains 19 larger boxes; and the third set contains 16 flatter boxes. The latter two sets are generated by randomly partitioning a 0.3m × 0.3m × 0.3m cube within the robotic arm's workspace. The error injection method is to superimpose independent uniform percentage perturbations on the box dimensions, applying random perturbations of [-10%, 10%] and [-20%, 20%] respectively. Each dataset is repeated 5 times under each error setting. Success is defined as no box falling or the stack collapsing. Average time calculation: For each dataset and error setting, the average time is the average completion time of successful rounds; if there are failed rounds, only the average of successful rounds is calculated, and the success rate (k / 5) is also reported. The idle time of the gantry trajectory is also averaged over 5 repetitions. The baseline method is a comparison of traditional gantry trajectories under the same settings; because gantry trajectories collide frequently under error conditions, their cycle time is reported in idle mode as a conservative reference.

[0089] Parameter Configuration and Boundary Constraints (Experimental Conditions): During the experiment, parameters are centrally managed by a JSON configuration file, and type conversion and boundary constraints are performed during loading. Key parameters include: safety margin m (mm), proximity point relaxation ratio ρ∈[0, 1], maximum proximity point offset ∆app (mm), total number of points on the forward path Nf, spline smoothness α∈[0, 1], and inflection point... Angular smoothing radius r (mm), Cartesian step size at the actuator end s(m), retiming sampling period t(s), maximum joint velocity ratio ηv∈(0, 1], maximum joint acceleration ratio ηa∈(0, 1], etc. To avoid unexecutable trajectories or numerical instability caused by abnormal configuration, this embodiment clamps ρ to [0, 1]. t is clamped to [0.002, 0.05]. The s-value is selected to [10−5, 0.05], and the ηv and ηa-values ​​are selected to [0.01, 1]. Reasonable restrictions are imposed on the minimum corner radius and the number of sampling points. Example configuration values ​​are: m = 20 mm, ρ = 0.35. app = 50 mm, Nf = 30, α = 0.5, t =0.01 s, ηv = 0.6, eta = 0.15, s = 0.01 m, r = 150 mm.

[0090] In the Gazebo simulation, extensive testing was conducted on all three datasets. The experimental results are shown in Table 1 below. Successful palletizing results under error conditions in the physical simulation environment are as follows: Figure 8 As shown, where, Figure 8 From top to bottom, (a), (b), and (c) represent the tests for the three datasets. The leftmost subgraph in each row shows the ideal stacking for that dataset, while the three subgraphs on the right show the stacking results for the same dataset in different test rounds.

[0091] Table 1: Statistical results under different datasets and error settings

[0092] Combination Figure 8 As shown in the table above, dataset (a) contains 27 multi-specification boxes, representing a highly complex and tightly packed stacking scenario. Under ±10% dimensional error, all five rounds of testing resulted in successful stacking, while under a large ±20% error disturbance, only one failure occurred, achieving a success rate of 80%. Datasets (b) and (c) contain fewer boxes with larger individual box sizes. Under ±10% and ±20% error disturbances, all test rounds achieved collision-free stacking, no box drops, and neat stacking, achieving a 100% success rate. These simulation results intuitively demonstrate that the present invention, relying on a local geometric constraint adaptive lateral approach strategy, possesses extremely strong error tolerance and can stably complete stacking operations even under various dimensional and positioning deviations in industrial settings. Regarding efficiency, the baseline gantry trajectory experiences frequent collisions under error conditions. Its cycle time, reported in an unloaded manner as a conservative reference, is still slower than the loaded cycle time of the present invention. Since removing the load typically reduces movement time, this comparison is a conservative estimate, but it still indicates that the present invention reduces unnecessary vertical lifting. For example, with the error settings of [-10%, 10%] in Dataset1, the method of the present invention takes 659.57s, while the baseline idle time is 719.38s, indicating that the present invention achieves an efficiency improvement of approximately 5.41% to 10.56%.

[0093] To further verify the physical feasibility, this embodiment also recorded the timing joint current curves of a 4kg load being transported under two modes: vertical descent and lateral pushing trajectory, on a real robot. The actuator adopted a control configuration with a speed / acceleration scaling upper limit of 0.3, and further speed limiting was applied at the end of the contact-related phase to form a low-speed quasi-static contact. Figure 9 As shown, the timing comparison results of the six-axis joint currents of a real robot under two approach methods are presented. Figure 9 (a) shows the joint current curves during vertical descent. Figure 9(b) shows the joint current curves when a 4kg box is pushed laterally. The shaded area indicates the stage where the box comes into contact with the stacked pile. The six curves correspond to joints J1 to J6, respectively. Figure 9 As shown in (a), the vertical descent method generated a severe surge with a peak current of up to 20A during the contact phase. This high-current state lasted for approximately 8 to 10 seconds, exceeding the conventional overcurrent protection threshold of industrial robots and posing an extremely high risk of triggering an emergency stop. This phenomenon is related to... Figure 4 The mechanical model of the rigid collision in (a) is a perfect match. The vertical line-edge collision generates a huge impact force in a very short time. The joints of the robotic arm, especially the J2 and J3 joints that bear the main load, need to output extremely high torque to resist the collision reaction force, which leads to a sharp increase in current. Figure 9 As shown in (b), the lateral pushing method used in this invention has a current envelope duration of approximately 6 to 7 seconds during the contact phase, with the peak current safely suppressed below 8A. The current curves at each joint exhibit a smooth rising and falling waveform during the contact phase, rather than... Figure 9 (a) Steep peak shape. This current waveform characteristic is similar to... Figure 4 The mechanical model of bounded frictional contact replacing rigid collision in (b) is completely consistent. The low-speed surface-to-surface contact allows the contact force to be established gradually, and the output torque of each joint transitions smoothly. This confirms from an electromechanical perspective that the method of this invention transforms the impact peak into an absorbable low-speed sliding process. This significant electromechanical difference demonstrates that the low-speed contact strategy can effectively absorb dimensional uncertainties while keeping the actuator load within a safe range, and also confirms the feasibility of the flexible approach strategy of this invention on real hardware.

[0094] This invention also provides a hybrid palletizing robot trajectory planning system, which applies the above-mentioned hybrid palletizing robot trajectory planning method, such as... Figure 10 As shown, it includes: The status acquisition module 1 is used to acquire the material picking posture information, the palletizing target posture information, and the set information of the boxes that have been stacked, and to determine the picking point and the palletizing target point according to the material picking posture information and the palletizing target posture information, respectively. The local geometric constraint identification module 2 and the connection status acquisition module 1 are used to identify the number and relative orientation relationship of lateral obstacle surfaces around the palletizing target point based on the information of the already stacked box set, so as to determine the type of local spatial constraint around the palletizing target point; The proximity strategy generation module 3 is connected to the local geometric constraint recognition module 2. It is used to generate the proximity axis vector and proximity point of the final proximity path according to the local spatial constraint type, so that the end of the robotic arm can laterally cut into the palletizing target point from the proximity point along the proximity axis vector direction. The key point generation module 4 is connected to the proximity strategy generation module 3. It is used to perform potential collision risk detection on the material handling path from the picking point to the proximity point, and generate a set of intermediate key points to form a global collision-free path from the picking point to the proximity point based on the detection results. The trajectory and attitude planning module 5 is connected to the key point generation module 4. It is used to generate a palletizing trajectory based on the material picking point, intermediate key point set, approach point and palletizing target point, so as to drive the end of the robotic arm to complete the palletizing operation of the box to be stacked.

[0095] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made using the content of this specification and illustrations should be included within the protection scope of the present invention.

Claims

1. A method for trajectory planning of a hybrid palletizing robot arm, characterized in that, include: Step S1: Obtain the material picking posture information, the palletizing target posture information, and the information of the already stacked boxes of the boxes to be stacked; and determine the material picking point and the palletizing target point according to the material picking posture information and the palletizing target posture information, respectively. Step S2: Identify the number and relative orientation of lateral obstacle surfaces around the palletizing target point based on the information of the already stacked box set, so as to determine the type of local spatial constraint around the palletizing target point; Step S3: Generate the approach axis vector and approach point of the final approach path according to the local space constraint type, so that the end of the robotic arm starts from the approach point and laterally cuts into the palletizing target point along the direction of the approach axis vector; Step S4: Perform potential collision risk detection on the transport path from the picking point to the proximity point, and generate a set of intermediate key points based on the detection results to form a global collision-free path from the picking point to the proximity point. Step S5: Generate a palletizing trajectory based on the material picking point, the set of intermediate key points, the approach point and the palletizing target point, so as to drive the end of the robotic arm to complete the palletizing operation of the box to be stacked.

2. The hybrid palletizing robot trajectory planning method according to claim 1, characterized in that, In step S2, the local spatial constraint type is divided into non-special type and special type according to the type of lateral obstacle surface of the box to be stacked; In step S3, if the local spatial constraint type is non-special type, the approach axis vector and approach point are obtained according to the normal vectors of the bottom surface and all lateral obstacle surfaces, so that the end of the robotic arm moves laterally to the palletizing target point along the approach axis vector direction through the approach point. If the local spatial constraint type is special, the approach axis vector and approach point are obtained based on the normal vectors of the bottom surface and part of the lateral obstacle surface, and the pre-landing point is obtained based on the height of the lateral obstacle surface and the horizontal direction of the approach axis vector, so that the end of the robotic arm moves laterally from the approach point along the direction of the approach axis vector to the pre-landing point, and then descends vertically to the palletizing target point.

3. The hybrid palletizing robot trajectory planning method according to claim 2, characterized in that, In step S2, the non-special type of local spatial constraint includes 0 lateral obstacle surfaces, 1 lateral obstacle surface, and 2 adjacent lateral obstacle surfaces; Special types of local spatial constraints include canyon type and deep well type. The canyon type has two lateral obstacle surfaces that are opposite to each other, and the deep well type has no less than three lateral obstacle surfaces.

4. The hybrid palletizing robot trajectory planning method according to claim 3, characterized in that, In step S3, the generation of the approach axis vector includes mapping the corresponding lateral obstacle surface and bottom surface to unit normal vectors pointing to free space according to the local space constraint type, and then superimposing and discretizing all the unit normal vectors after taking their reverses to obtain the approach axis vector. Wherein, when the local spatial constraint is of a non-special type, all the lateral obstacle surfaces and bottom surfaces are mapped to unit normal vectors pointing to free space; When the local spatial constraint is canyon-shaped, the higher of the two opposing lateral obstacle surfaces and the bottom surface are mapped to unit normal vectors pointing to free space. When the local spatial constraint is a deep well type, the highest lateral obstacle surface and the lateral obstacle surface and bottom surface orthogonal to it are mapped as unit normal vectors pointing to free space.

5. The hybrid palletizing robot trajectory planning method according to any one of claims 1-4, characterized in that, In step S3, the palletizing target point is moved back a distance in the opposite direction of the approach axis to obtain the approach point; The approach distance is determined as follows: When the horizontal projection length of the approach axis vector is zero, the approach distance is the product of the height of the box to be stacked and the safety factor; When the horizontal projection length of the approach axis vector is greater than zero, the projection support radius of the box to be stacked in the horizontal projection direction of the approach axis vector is calculated, and the horizontal margin is obtained by multiplying the safety margin by the safety factor after superimposing the safety margin. Then, according to the ratio of the modulus of the approach axis vector to the horizontal projection length, the horizontal margin is converted into the approach distance.

6. The hybrid palletizing robot trajectory planning method according to claim 2, characterized in that, The height of the pre-landing point is not less than the sum of the height of the palletizing target point and the minimum height margin, and the horizontal position of the pre-landing point is the position of the palletizing target point after applying a bounded offset along the horizontal sign direction of the approach axis vector.

7. The hybrid palletizing robot trajectory planning method according to any one of claims 1-4, characterized in that, Step S4 includes: Step S41: The space occupancy of the box to be stacked during the process of moving from the picking point to the approach point is modeled as a sweep envelope. The sweep envelope is obtained by expanding the stack area envelope rectangle on the horizontal plane by half the size of the box to be stacked plus a safety margin. Step S42: Trim and intersect the line segment from the picking point to the approach point with the sweep envelope to obtain the intersection endpoints of the line segment and the sweep envelope. If there is no intersection, it is determined that there is no potential collision risk, and the intermediate key point set is configured to be empty. If there is an intersection, it is determined that there is a potential collision risk. Then, the in-stack edge point and the out-stack edge point are generated as elements of the intermediate key point set. The generation of in-stall edge points and out-stall edge points includes: Intersecting sections are identified as hazardous areas that need to be lifted and crossed, and a subset of potential collision obstacle boxes is selected accordingly. Obtain a unit vector along the trajectory direction from the material picking point to the approach point, and calculate the half-projection length of the box to be stacked in the direction of the unit vector; The boundary points of the subset of potential collision obstacle boxes are offset outward by the half-projection length along the trajectory direction to obtain the horizontal positions of the in-stack edge point and the out-stack edge point; The lifting height positions of the infeed edge point and the outfeed edge point are obtained by superimposing the highest height of the top surface of the potential collision obstacle box subset with the height of the box to be stacked and the safety clearance.

8. The hybrid palletizing robot trajectory planning method according to any one of claims 1-4, characterized in that, Step S5 includes: Step S51: Construct an initial key point sequence based on the material picking point, the intermediate key point set, the proximity point, and the palletizing target point. Step S52: Perform structural concave sliding culling on the elements contained in the intermediate keypoint set in the initial keypoint sequence to obtain the final keypoint sequence. Step S53: Perform segmented cubic Hermite interpolation on the final key point sequence to generate a discrete trajectory point sequence with continuous position, and use quaternion spherical linear interpolation to generate an attitude sequence with continuous attitude.

9. The hybrid palletizing robot trajectory planning method according to claim 8, characterized in that, In step S53, the attitude sequence is generated based on attitude timing constraints, which are that all attitude adjustments are completed before reaching the stack area, and only translational movements are performed within the stack.

10. A hybrid palletizing robot trajectory planning system, characterized in that, The method for planning the trajectory of a hybrid palletizing robot arm as described in any one of claims 1-9 includes: The status acquisition module is used to acquire the material picking posture information, the palletizing target posture information, and the set information of the already stacked boxes of the boxes to be stacked, and to determine the material picking point and the palletizing target point according to the material picking posture information and the palletizing target posture information, respectively. A local geometric constraint identification module, connected to the state acquisition module, is used to identify the number and relative orientation relationship of lateral obstacle surfaces around the palletizing target point based on the information of the already stacked box set, so as to determine the type of local spatial constraint around the palletizing target point; The proximity strategy generation module is connected to the local geometric constraint recognition module and is used to generate the proximity axis vector and proximity point of the final proximity path according to the local spatial constraint type, so that the end of the robotic arm starts from the proximity point and laterally cuts into the palletizing target point along the proximity axis vector direction. The key point generation module is connected to the proximity strategy generation module. It is used to perform potential collision risk detection on the material handling path from the picking point to the proximity point, and generate a set of intermediate key points based on the detection results to form a global collision-free path from the picking point to the proximity point. The trajectory and attitude planning module is connected to the crossing key point generation module and is used to generate a palletizing trajectory based on the material picking point, the intermediate key point set, the approach point and the palletizing target point, so as to drive the end of the robotic arm to complete the palletizing operation of the box to be stacked.