A Robot Collaborative Container Loading Space Optimization Method
By constructing a multi-dimensional physical model of the package and using reinforcement learning algorithms, combined with Kalman filtering and KD tree compensation mechanisms, the problem of inaccurate control of the robotic arm's grasping force was solved, achieving efficient, stable, and high-efficiency loading through robot collaborative loading.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, during the collaborative loading process of robots, it is difficult for the robotic arm to dynamically adjust the gripping force in real time and with high precision when grasping packages. This causes the package position and posture to deviate from the theoretical model, resulting in frequent global replanning and low efficiency.
A multi-dimensional physical model of the package is constructed using 3D laser scanning and pressure sensors. A loading scheme is generated by combining reinforcement learning algorithms, and the gripping force is adjusted in real time. Kalman filtering algorithm is used to monitor pose deviations, and a local spatial KD tree is constructed for compensation. The optimal compensation scheme is calculated by combining the collision probability gradient field, and a closed-loop feedback optimization system is established.
It achieves real-time and precise control of gripping force, reduces package damage rate, avoids global replanning, improves loading efficiency and space utilization, and reduces labor intensity and cost.
Smart Images

Figure CN121093406B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of space optimization technology, and more specifically, to a method for optimizing container loading space based on robot collaboration. Background Technology
[0002] The core challenge facing large-scale cross-border e-commerce logistics centers lies in how to efficiently and maximizing space utilization by loading massive amounts of parcels of varying shapes, sizes, and weights into standard containers. Traditional manual loading methods are not only inefficient and prone to errors, but also extremely labor-intensive. Therefore, adopting intelligent loading systems based on robot collaboration has become an important development direction. These systems first use algorithms to optimize container space and generate the optimal cargo placement plan. Then, they rely on multiple robots (such as robotic arms and AGVs) to collaboratively perform parcel identification, sorting, transfer, and precise loading tasks, significantly improving loading efficiency and space utilization.
[0003] However, existing technologies have significant shortcomings in key aspects of ensuring the precise execution of spatial optimization schemes by robots in a collaborative manner, which severely restricts system efficiency:
[0004] During collaborative loading by robots, existing control methods struggle to dynamically adjust the gripping force in real time and with high precision when the robotic arm grasps packages (especially fragile or other special packages). Excessive force can damage the package, while insufficient force can cause slippage or misalignment of the package's position. These seemingly minor physical execution errors accumulate rapidly during collaborative robot operations, causing the actual placement and orientation of the package to deviate significantly from the theoretical model calculated by the spatial optimization algorithm.
[0005] The cumulative effect of the aforementioned execution deviations means that when a significant deviation from the theoretical model is detected in the loading state, the existing system is typically forced to interrupt the entire loading process, triggering a replanning of the global spatial optimization algorithm. This requires recalculating the loading scheme for the entire container. Replanning often necessitates the robotic arm removing already placed packages and then repositioning them according to the new scheme. This global replanning and physical adjustment process is extremely time-consuming, leading to a precipitous drop in overall system efficiency, completely offsetting the potential efficiency and space utilization improvements brought about by the initial spatial optimization and robotic collaborative automation.
[0006] Therefore, there is an urgent need for a robot-cooperative method for optimizing container loading space that can dynamically adjust the gripping force in real time and accurately, and make efficient corrections when local deviations occur. Summary of the Invention
[0007] This invention provides a method for optimizing container loading space based on robot collaboration, which solves the technical problems in the aforementioned related technologies.
[0008] This invention provides a method for optimizing container loading space based on robot collaboration, comprising the following steps:
[0009] Step 100: Acquire point cloud data of the package using a 3D laser scanner, and combine it with weight distribution parameters collected by a pressure-sensing tray to construct a multi-dimensional physical model of the package that includes geometric features, center of mass position, and elastic modulus parameters.
[0010] Step 200: Based on the multi-dimensional physical model of the package, generate a loading scheme matrix through a reinforcement learning space optimization algorithm;
[0011] The loading scheme matrix includes: the target pose homogeneous transformation matrix, the pressure tolerance threshold matrix of the contact surface between packages, and the spatiotemporal dependency graph of the loading sequence;
[0012] Step 300: Control the robotic arm sequence to grasp based on the spatiotemporal dependency graph, and generate a motor current-position composite control command set through a pre-trained grasping dynamics model;
[0013] Step 400: The real-time collected package point cloud data, combined with the six-dimensional force sensor data, is used to calculate the actual pose of the package based on the Kalman filter algorithm; when the pose deviation between the actual pose and the homogeneous transformation matrix of the target pose exceeds a preset threshold, a compensation mechanism is triggered. A local spatial KD tree is constructed based on the package point cloud data, and combined with the pressure tolerance threshold matrix, a compensation pose solution set that satisfies the stacking stability constraint is generated by calculating the collision probability gradient field. The optimal compensation scheme is selected based on the stacking stability objective function.
[0014] Step 500: After executing the optimal compensation scheme, reacquire the adjusted actual pose, update the quadtree index of container space occupancy status based on the adjusted actual pose, and feed the updated quadtree index of container space occupancy status back to the reinforcement learning algorithm for online policy optimization.
[0015] Furthermore, the method for constructing the multi-dimensional physical model is as follows:
[0016] The package was scanned 360° using a 3D laser scanner to obtain high-density point cloud data P, with each point containing spatial coordinates and color information.
[0017] The package is placed on a smart tray equipped with an array of pressure sensors, and the weight distribution matrix is recorded to calculate the position of the package's center of gravity.
[0018] Geometric features are extracted from point cloud data, including volume, principal axis direction, minimum bounding rectangle size, and elastic modulus parameter. The extracted parameters are then integrated into a physical model of the enclosure.
[0019] Furthermore, the steps for generating the loading scheme matrix using the reinforcement learning space optimization algorithm include:
[0020] Define the state space as the current container space occupancy status, using a three-dimensional voxel mesh, where a value of 0 indicates free space and a value of 1 indicates occupied space.
[0021] Define the action space as a six-DOF placement operation encompassing three-dimensional coordinates and three rotation angles.
[0022] Define the reward function as follows:
[0023] R = 0.7 × ΔV filled / V total +0.3×S stability ;
[0024] Where ΔV filled To add the fill volume, V total S represents the total volume of the container. stability R represents the stacking stability score, and R is the reward function.
[0025] Furthermore, the inputs to the grasping dynamics model include: elastic modulus parameters, real-time six-dimensional force sensor data, and binocular vision pose feedback;
[0026] The six-dimensional force sensor data is obtained in real time from the real-time six-dimensional force sensor at the end of the robotic arm;
[0027] Binocular visual pose feedback is based on data collected in real time by binocular cameras.
[0028] Furthermore, the steps for calculating the actual pose of the package based on the Kalman filter algorithm include:
[0029] Package images are acquired in real time using a binocular camera, and the package point cloud is reconstructed through image preprocessing, SIFT feature extraction, feature matching, geometric verification, and triangulation.
[0030] By combining data from a six-dimensional force sensor and using a Kalman filter algorithm to fuse visual and force data, the actual pose of the package is calculated.
[0031] Furthermore, the method for calculating the pose deviation between the actual pose and the homogeneous transformation matrix of the target pose is as follows:
[0032] Calculate the positional deviation: d position =||t actual -t target ||2, where t actual Let t be the actual translation vector. target Let d be the target translation vector. position This is for positional deviation;
[0033] Calculate attitude deviation: d orientation =2·arccos(|qactual ·q target |), where arccos is the inverse cosine function, q actual q is the quaternion representation of the actual attitude. target Let d be the quaternion representation of the target attitude. orientation This is for attitude deviation;
[0034] Posture deviation: Where w = 0.1 is the attitude weight and d is the pose deviation.
[0035] Furthermore, the method for constructing a local spatial KD-tree is as follows:
[0036] Centered on the current package location, the search area has a spatial radius of 2.5 × d, where d is the pose deviation;
[0037] A three-dimensional KD-tree data structure with a dimension of 3 and a leaf node size of 10 is adopted for fast spatial nearest neighbor search.
[0038] The collision probability is calculated using the directed distance field. The formula for calculating the collision probability is: P collision (x)=1-min(1,SDF(x) / safety_margin);
[0039] Where safety_margin is the safety margin, SDF(x) represents the directed distance from position x to the nearest object surface, and P collision (x) represents the collision probability at displacement x.
[0040] Furthermore, the method for generating the optimal compensation scheme is as follows:
[0041] Generate a compensated pose solution set Ω = {T1, T2, ..., T} that satisfies collision-free constraints, support constraints, and pressure constraints. m},in:
[0042] The collision-free constraint is P collision (T)<0.05;
[0043] The support constraint is A supported / A bottom >0.5, A supported A is the area of the bottom surface that is supported. bottom This represents the total area of the bottom surface of the package;
[0044] The pressure constraint is F contact,i / A contact,i <P threshold,i For all contact surfaces i, F holds true. contact,i Let A be the contact force borne by contact surface i. contact,i Let P be the area of contact surface i. threshold,iThe pressure tolerance threshold of contact surface i;
[0045] Using the stacking stability objective function f stability =α·V contact +β·F ratio Evaluate each candidate solution, where V contact For the contact area, F ratio The support force distribution ratio is represented by α and β, which are the weighting coefficients for the contact area between packages and the uniformity ratio of the support force distribution, respectively. stability As a compensation plan;
[0046] Sort all candidate solutions and select f. stability The largest one is the optimal solution.
[0047] Furthermore, the method for constructing the quadtree is as follows:
[0048] Create a root node to represent the entire rectangular area on the bottom of the container;
[0049] Set the minimum splitting unit δ as the threshold for terminating the split of the quadtree;
[0050] Recursively split the node until the node size is less than or equal to the smallest splitting unit δ or the number of wrappers within the node is less than or equal to 1.
[0051] The leaf nodes store the package ID, the radius r of the circumscribed sphere, the centroid coordinates [Cx,Cy,Cz], the pose matrix, and the volume and weight attributes.
[0052] A container loading space optimization system based on robot collaboration includes:
[0053] The perception layer includes a 3D laser scanner, a pressure-sensing tray, a binocular camera, and a six-dimensional force sensor, used to acquire data on the physical properties and real-time status of the package.
[0054] The decision layer includes a physical model building module, a reinforcement learning space optimization module, a local pose compensation module, and an online policy optimization module. It is responsible for generating loading schemes and optimizing and adjusting policies. The decision layer receives input data from the perception layer and sends control commands to the execution layer.
[0055] The execution layer consists of multiple robotic arms, grippers, and AGV transport vehicles that work together to perform loading tasks.
[0056] The beneficial effects of this invention are as follows:
[0057] By constructing a multi-dimensional physical model of the package that includes geometric features, centroid position, and elastic modulus parameters, and combining it with a pre-trained grasping dynamics model to dynamically adjust the grasping force in real time, the problem of package damage or grasping slippage caused by inaccurate control of the grasping force of the robotic arm in the existing technology is effectively solved, and the package damage rate is significantly reduced.
[0058] A real-time pose monitoring and local compensation mechanism based on Kalman filtering is proposed. When the actual pose deviates from the target pose, a compensation scheme that satisfies the stacking stability constraint is quickly generated by constructing a local spatial KD tree and calculating the collision probability gradient field. This avoids global replanning in traditional methods and improves loading efficiency.
[0059] A complete closed-loop feedback optimization system was established. The container space occupancy status was updated in real time through a quadtree index, and the actual loading results were fed back to the reinforcement learning algorithm for online strategy optimization. This enabled the system to continuously learn and improve from actual operations, thereby improving the utilization rate of loading space.
[0060] By adopting a multi-robot collaborative operation mode, loading tasks are rationally allocated through a spatiotemporal dependency graph, and a distributed clock synchronization protocol is combined to ensure precise coordination between robotic arms. Overall loading efficiency is improved compared to manual operation, while significantly reducing labor intensity and labor costs. Attached Figure Description
[0061] Figure 1 This is a flowchart of a container loading space optimization method based on robot collaboration according to the present invention. Detailed Implementation
[0062] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.
[0063] At least one embodiment of the present invention discloses a method for optimizing container loading space based on robot collaboration, such as... Figure 1 As shown, it includes:
[0064] Step 100: Acquire point cloud data of the package using a 3D laser scanner, and combine it with weight distribution parameters collected by a pressure-sensing tray to construct a multi-dimensional physical model of the package that includes geometric features, center of mass position, and elastic modulus parameters.
[0065] 3D point cloud data acquisition: Using an industrial-grade laser scanner, the package is scanned 360° to obtain high-density point cloud data P = {p1, p2, ..., p n}, where each point p i = (x,y,z,r,g,b), where i∈[1,n] contains spatial coordinates (x,y,z) and color information, and r, g, and b represent the red, green, and blue color channel values, respectively. During the acquisition process, the laser line scanning device rotates around the package to collect information from the entire surface of the package.
[0066] Weight distribution measurement: The package is placed on a smart tray equipped with a 16×16 grid pressure sensor array, with a sampling frequency of 100Hz and a resolution of 0.05N, and the weight distribution matrix is recorded to calculate the position of the package's center of mass and weight non-uniformity.
[0067] Physical parameter extraction: Geometric feature extraction based on point cloud data. The system performs feature analysis and parameter calculation on the point cloud data, including:
[0068] Package volume V=∫∫∫dV(float32 type, unit cm) 3 (range [10, 100000]);
[0069] Principal axis directions v1, v2, v3 (obtained through PCA principal component analysis, unit vectors, float32 type);
[0070] Minimum bounding rectangle dimensions (L, W, H represent length, width, and height respectively) (float32 type, unit mm, range of each dimension [10, 2000]);
[0071] Elastic modulus parameter E m (float32 type, unit N / mm) 2 The range is [0.1, 10000], obtained by applying a standard pressure test.
[0072] Multi-dimensional physical model construction: Integrate the above parameters into a wrapper physical model M = {P, W, V, v1, v2, v3, L, W, H, E} m Let m be the mass of the package. The final generated physical model includes the geometric, physical, and material properties of the package.
[0073] The model data conversion process is as follows: point cloud data is converted into compressed binary format, and spatial encoding is used to reduce storage space; the weight matrix is converted into a sparse representation, storing only the non-zero value positions and their corresponding values; the principal axis direction is represented by unit quaternions to ensure the consistency and accuracy of data representation.
[0074] Step 200: Based on the multi-dimensional physical model of the package, generate a loading scheme matrix using a reinforcement learning space optimization algorithm;
[0075] The loading scheme matrix includes: target pose homogeneous transformation matrix, pressure tolerance threshold matrix of inter-package contact surface, and spatiotemporal dependency graph of loading sequence;
[0076] Reinforcement learning model definition:
[0077] State space: Current container space occupancy status, represented by a 3D voxel mesh (each voxel is 5cm×5cm×5cm in size), with a value of 0 indicating free space and a value of 1 indicating occupied space;
[0078] Action space: The six-degree-of-freedom placement operation of the package includes three-dimensional coordinates (x, y, z) and three rotation angles (roll, pitch, yaw), discretized into 10cm intervals and 15° angle intervals;
[0079] Reward function:
[0080] R = 0.7 × ΔV filled / V total +0.3×S stability ;
[0081] Where ΔV filled To add the fill volume, V total S represents the total volume of the container. stability R represents the stacking stability score, and R is the reward function.
[0082] Deep Q-network structure: In one embodiment of the present invention, a spatial optimization algorithm is implemented using a 6-layer three-dimensional convolutional neural network, the specific structure of which is as follows:
[0083] Input layer: Voxelized container state (128×96×256 resolution), with 2 channels (occupied state + centroid distribution);
[0084] First 3D convolutional layer: 64 3×3×3 convolutional kernels, stride 2, ReLU activation function;
[0085] The second 3D convolutional layer consists of 128 3×3×3 convolutional kernels with a stride of 2 and ReLU activation function.
[0086] The third 3D convolutional layer: 256 3×3×3 convolutional kernels, stride 2, ReLU activation function;
[0087] First fully connected layer: 1024 neurons, ReLU activation function;
[0088] Second fully connected layer: 512 neurons, ReLU activation function;
[0089] Output layer: The number of neurons is determined based on the dimension of the discretized action space, using a linear activation function.
[0090] The network has 2.5M parameters, is trained using the Adam optimizer with a learning rate of 0.001, and undergoes 100,000 training epochs.
[0091] Loading scheme matrix generation: Using the trained reinforcement learning model, a loading scheme matrix T is generated for each package, containing:
[0092] Target pose homogeneous transformation matrix T target The structure of this matrix is shown below:
[0093]
[0094] Where R is a 3×3 rotation matrix and t is a 3×1 translation vector. R is calculated using Euler angles (roll, pitch, yaw), and t is the target position coordinates (x, y, z).
[0095] Pressure tolerance threshold matrix P threshold Defines the maximum pressure that the six surfaces of the package can withstand, in N / cm². 2 According to the elastic modulus parameter E of the package m Calculate: P threshold =min(E m / 10,P max ), where P max This represents the maximum safe pressure for the material.
[0096] The spatiotemporal dependency graph G = (V, E) of the loading sequence is stored in the adjacency matrix format, where vertex V represents the package ID, edge E represents the loading order relationship between packages, and E(i,j) = 1 indicates that package i must be placed before package j.
[0097] The spatiotemporal dependency graph ensures that each package can only be placed after its supporting package, avoiding the risks of suspension and collapse. The loading sequence follows the topological sorting result, ensuring structural stability. In this way, the system can generate an optimal loading scheme that maximizes space utilization while ensuring loading stability.
[0098] Step 300: Control the robotic arm to grasp according to the spatiotemporal dependency graph, and generate a motor current-position composite control command set through the pre-trained grasping dynamics model;
[0099] Robotic arm task allocation: The package set is allocated to multiple robotic arms, and each robotic arm is responsible for loading a subgraph. The subgraph partitioning adopts the Kernighan-Lin algorithm to minimize the switching overhead between robotic arms.
[0100] The call relationship flow between components includes:
[0101] The central dispatch system sends loading task allocation instructions (including a list of package IDs and target poses) to the robotic arm controller;
[0102] The robotic arm controller sends a path planning request (including the starting position and the target position) to the motion planning module;
[0103] The motion planning module sends a collision check request (including motion trajectory and environment model) to the collision detection module;
[0104] The robotic arm controller sends low-level control commands (motor current-position composite control commands) to the actuator.
[0105] It should be noted that the environment model is based on a three-dimensional voxel mesh in the state space, encapsulating a multi-dimensional physical model, and is adjusted in real time based on the real-time six-dimensional force sensor data at the end of the robotic arm and the binocular visual pose feedback collected in real time by the binocular camera.
[0106] Inter-component communication uses the ROS2 communication framework and employs the following communication protocols:
[0107] Status data: DDS (Data Distribution Service) protocol is used, and QoS is configured as RELIABLE_RELIABILITY and KEEP_LAST_HISTORY;
[0108] Control commands: Employ real-time Ethernet communication protocol (EtherCAT, Ethernet for Control Automation Technology);
[0109] Inter-arm collaboration: Employs the distributed clock synchronization protocol IEEE 1588PTP;
[0110] Grasping dynamics model: The grasping dynamics model is pre-trained using deep reinforcement learning, with the elastic modulus parameter E as input. m The system uses real-time six-dimensional force sensor data at the end of the robotic arm and real-time binocular visual pose feedback collected by a binocular camera to output the optimal gripping force.
[0111] The training dataset contains 10,000 sets of grasping data with different materials and shapes. The model is implemented as a three-layer fully connected neural network, with 64, 32, and 6 neurons in each layer, and the output is the ideal grasping force (in N) at the six end gripping points.
[0112] Motor current-position composite control command generation: Based on the grasping dynamics model, the following control commands are generated in real time: The control equations for motor current control are as follows:
[0113] I = K p ·(F target -F actual )+K i ·∫(F target -F actual )dt;
[0114] Where K p =0.05A / N is the proportional gain coefficient, K i =0.02A / (N·s) is the integral gain coefficient, F target For target grasping force, F actual The measured value is from a six-dimensional force sensor, and I is the commanded value of the motor current.
[0115] The control equations for position control are as follows:
[0116] Δp=min(K v ·Δv,Δp max );
[0117] Where Δv is the positional deviation of the binocular visual pose feedback, and K v =0.8 is the position control proportional coefficient, Δp max =10mm / s is the maximum adjustment speed limit, and Δp is the position adjustment increment;
[0118] The motor current-position composite control command includes the motor current command value and the position adjustment increment;
[0119] It employs an adaptive PID controller with a control frequency of 1kHz to adapt to wraps of varying stiffness and brittleness. The controller parameters automatically adjust according to the physical characteristics of the wraps, ensuring gripping accuracy and stability.
[0120] Exception handling mechanism: The system implements a complete exception handling process:
[0121] Grab failure detection: When the motor current exceeds the safety threshold or the force sensor detects slippage (slippage speed > 5mm / s), a retry mechanism is triggered;
[0122] Timeout handling: If any action exceeds the preset time, the current operation will be automatically terminated and rescheduled;
[0123] Robotic arm coordination conflict: When the workspaces of multiple robotic arms overlap, a time-division multiplexing strategy is adopted, and the execution order is scheduled based on a priority queue;
[0124] Network communication interruption: The most recent 50 instructions are cached locally, allowing the execution of received tasks to continue even if communication is interrupted.
[0125] Step 400: The real-time collected package point cloud data, combined with six-dimensional force sensor data, is used to calculate the actual pose of the package based on the Kalman filter algorithm; when the pose deviation between the actual pose and the homogeneous transformation matrix of the target pose exceeds a preset threshold, a compensation mechanism is triggered. A local spatial KD tree is constructed based on the package point cloud data, and combined with the pressure tolerance threshold matrix, a compensation pose solution set that satisfies the stacking stability constraint is generated by calculating the collision probability gradient field. The optimal compensation scheme is selected based on the stacking stability objective function.
[0126] Actual pose calculation: Real-time acquisition of package images by binocular cameras:
[0127] The image processing workflow is as follows: Wrapped point cloud is reconstructed using SIFT (Scale-Invariant Feature Transform) feature matching and triangulation.
[0128] Image preprocessing: Gaussian filtering (kernel size 5×5) + histogram equalization;
[0129] SIFT feature extraction: contrast threshold 0.04, number of feature points ≥200;
[0130] Feature matching: The FLANN (Fast Library for Approximate Nearest Neighbors) algorithm was used, with a ratio test threshold of 0.7.
[0131] Geometric verification: RANSAC (Random Sample Consensus) algorithm to remove outliers, 1000 iterations;
[0132] Triangulation: Reconstructing 3D points using linear least squares;
[0133] Combined with data from a six-dimensional force sensor (sampling frequency 1kHz).
[0134] The Kalman filter algorithm is used to fuse visual and force data. The filter parameters are: process noise covariance Q = diag(0.01, 0.01, 0.01, 0.005, 0.005, 0.005, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05), and measurement noise covariance R is adaptively adjusted using an innovative sequence adaptive adjustment method. The innovative sequence covariance matrix C is calculated for each filtering cycle. k According to C k With R k-1 Difference calculation scaling factor α k and α k To ensure filter stability, the range is limited to [0.5, 2.0], with an update frequency of 30Hz. The actual pose T of the package is calculated.actual ;
[0135] The method for calculating pose deviation is as follows:
[0136] Calculate the positional deviation: d position =||t actual -t target ||2(Euclidean distance of translation vectors), where t actual Let t be the actual translation vector. target The target translation vector;
[0137] Calculate attitude deviation (quaternion distance): d orientation =2·arccos(|q actual ·q target |)(the arcsine of the unit quaternion dot product), where arccos is the arccosine function, q actual q is the quaternion representation of the actual attitude. target The quaternion representation of the target attitude;
[0138] Posture deviation: Where w = 0.1 is the attitude weight;
[0139] When d > δ (δ = 5 mm), the compensation mechanism is triggered, and the deviation detection logic is executed at a frequency of 5 Hz.
[0140] Local space optimization: Construct a local space KD-tree with a search radius of 2.5×d. The KD-tree is implemented using the nanoflann library with a dimension of 3 and a leaf node size of 10. Combined with the pressure tolerance threshold matrix P... threshold The collision probability field is calculated using a directed distance field (SDF) with a resolution of 5 mm. The calculation formula is as follows:
[0141] P collision (x)=1-min(1,SDF(x) / safety_margin);
[0142] Where safety_margin = 20mm is the safety margin, SDF(x) represents the directed distance from position x to the nearest object surface, and P collision (x) represents the collision probability at displacement x.
[0143] Generate a set of compensated pose solutions Ω = {T1, T2, ..., T} that satisfies the following constraints. m A local search method based on gradient descent is employed.
[0144] No collision constraint: P collision (T)<0.05, ensuring no interference with other packages;
[0145] Support constraint: Asupported / A bottom >0.5, ensuring at least 50% of the bottom area is supported, A supported A is the area of the bottom surface that is supported. bottom This represents the total area of the bottom surface of the package;
[0146] Pressure constraint: F contact,i / A contact,i <P threshold,i For all contact surfaces i, F holds true. contact,i Let A be the contact force borne by contact surface i. contact,i Let P be the area of contact surface i. threshold,i Let be the pressure tolerance threshold of contact surface i.
[0147] Optimal compensation scheme selection: Evaluate each candidate scheme using the stacking stability objective function:
[0148] f stability =α·V contact +β·F ratio ;
[0149] Among them, V contact For the contact area, F ratio The support force distribution ratio is represented by α and β, which are the weighting coefficients for the contact area between packages and the uniformity ratio of the support force distribution, respectively. stability This is a compensation plan.
[0150] The specific calculation method is as follows:
[0151] For each candidate pose in the compensated pose solution set, calculate:
[0152] Contact area V contact Calculated based on a 3D geometric intersection algorithm, unit: cm 2 ;
[0153] Support force distribution ratio F ratio = 1 - std(F) / mean(F), where F is the force at each contact point, std is the standard deviation, and mean is the mean;
[0154] Sort all candidate solutions and select f. stability The largest one is the optimal solution;
[0155] Where: V contact The contact area between packages is expressed in cm². 2 The larger the contact area, the more stable it is; F ratio This represents the ratio of uniformity of the supporting force distribution, with a value range of [0,1]. A larger value indicates a more uniform force distribution.
[0156] Step 500: After executing the optimal compensation scheme, reacquire the adjusted actual pose, update the quadtree index of container space occupancy status according to the adjusted actual pose, and feed the updated quadtree index of container space occupancy status back to the reinforcement learning algorithm for online policy optimization.
[0157] The specific execution process is as follows:
[0158] Compensation scheme execution: The robotic arm calculates the optimal compensation pose T. optimal Adjust the package's location. The compensation plan implementation process includes the following steps:
[0159] Motion path planning: The system plans the motion path based on the current pose T. current and target compensation pose T optimal This generates a smooth motion trajectory. Path planning takes into account the kinematic constraints and dynamic characteristics of the robotic arm to avoid shocks caused by sudden acceleration.
[0160] Execute specific motion patterns: The system selects different execution strategies based on the vulnerability of the package.
[0161] Fragile package: Performs low-speed, high-precision continuous motion with a speed factor of 0.5 and a maximum acceleration limit of 30% of the standard value;
[0162] Standard package: Performs regular motion, with a speed factor of 1.0 and standard acceleration limits;
[0163] Compensation effect verification: After the compensation operation is completed, the system immediately acquires the new actual pose T. new If the distance to the target pose still exceeds 3mm, fine-tuning is performed. Fine-tuning uses an iterative approximation method, reducing the adjustment amount by 50% each time, until the required accuracy is achieved.
[0164] In one embodiment of the present invention, a strict robotic arm control interface specification is defined to ensure the accurate execution of the compensation operation:
[0165] compensatePosition: Performs pose compensation adjustment, receiving the target pose, maximum allowable force (default 10N), accuracy level (range 1-10), and timeout (default 2s) parameters;
[0166] getCurrentRobotPose: Real-time acquisition of the current robot arm pose, with a sampling frequency of 100Hz;
[0167] isCompensationSuccessful: This function checks whether the compensation operation was successful. The criteria for this is that the position deviation is <1mm and the attitude deviation is <1°.
[0168] During the compensation process, the system continuously monitors force and position feedback to ensure safe and reliable operation.
[0169] Quadtree index update: After compensation, the adjusted actual pose T is reacquired using a binocular camera and a six-dimensional force sensor. actual_new Based on this, update the quadtree index of the container space occupancy status.
[0170] The quadtree construction process is as follows:
[0171] Initialization process:
[0172] Create a root node to represent the entire rectangular area on the bottom of the container;
[0173] Set the minimum splitting unit δ = 0.5m as the threshold for terminating the split of the quadtree;
[0174] Initialize the depth of the root node to 0 and establish the origin of the coordinate system;
[0175] Node splitting rules:
[0176] Recursively execute node splitting until one of the following conditions is met:
[0177] Node size ≤ minimum dividing unit δ (δ=0.5m);
[0178] The number of packages within a node is ≤1;
[0179] Splitting method: Divide the current node into four child nodes, corresponding to the four quadrants of southwest, southeast, northwest, and northeast respectively;
[0180] Leaf node information storage:
[0181] Package ID: A unique identifier assigned by the system;
[0182] Circumsphere radius r: The minimum circumsphere radius calculated based on the enclosed 3D model;
[0183] centroid coordinates [C x C y C z [: The centroid location calculated based on the package weight distribution;]
[0184] The quadtree data structure employs a hierarchical design, with nodes organized through parent-child relationships. Child nodes are arranged in the order of southwest, southeast, northwest, and northeast. Each node stores its boundary information (x...). min ,y min ,x max ,y max Leaf nodes store package information, including package ID, circumsphere radius, centroid coordinates, pose matrix, volume, and weight.
[0185] Online strategy optimization: The updated quadtree index is fed back to the reinforcement learning space optimization algorithm in step 200. The Q-network parameters are updated through an experience replay mechanism to achieve online strategy optimization. By adjusting the loading strategy in real time to adapt to the constantly changing loading environment and package characteristics, continuous optimization of system performance is ensured. The specific steps are as follows:
[0186] Experience Sample Generation: The system constructs quadruple experience samples (s) t ,a t ,r t ,s t+1 ),
[0187] in:
[0188] s t The quadtree index state before loading (including the spatial distribution of placed packages);
[0189] a t The loading action to be performed (package placement position and orientation);
[0190] r t The actual reward received (considering the increase in space utilization after local compensation);
[0191] s t+1 To compensate for the adjusted actual loading status;
[0192] These experience samples are stored in the experience replay buffer and updated using a first-in, first-out (FIFO) strategy.
[0193] Q: Network parameter update process:
[0194] Randomly sample a batch of experience samples from the experience store;
[0195] For each sample, if s t+1 If it is a terminated state, then the target value y t =r t Otherwise y t =r t +γ·max a Q(s t+1 a), where γ = 0.95 is the discount factor;
[0196] Calculate the mean squared error loss between the current prediction and the target value;
[0197] Perform gradient descent to update the Q-network parameters;
[0198] The optimization frequency is once every 10 packages.
[0199] This feedback mechanism enables the system to continuously learn from actual loading operations, gradually reducing the deviation between the initial loading plan and the actual execution results.
[0200] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A container loading space optimization method based on robot collaboration, characterized by, The method comprises the following steps: Step 100: Obtain package point cloud data by a three-dimensional laser scanner, and combine weight distribution parameters collected by a pressure sensor tray to construct a package multidimensional physical model comprising geometric features, center of mass positions and elastic modulus parameters; Step 200: Generate a loading scheme matrix based on the package multidimensional physical model by a reinforcement learning space optimization algorithm; The loading scheme matrix comprises: a target pose homogeneous transformation matrix, a pressure tolerance threshold matrix of contact surfaces between packages, and a space-time dependent relationship diagram of a loading sequence; Pressure tolerance threshold matrix : defines the maximum pressure that the six surfaces of the package can withstand, as a function of the package elastic modulus parameter Calculation: where is the maximum safe pressure for the material; Space-time dependency graph of loading sequence : stored as an adjacency matrix format, where vertex V represents package ID, edge E represents the loading before-and-after relationship between packages, E(i, j) = 1 indicates that package i must be placed before package j; Step 300: Control a mechanical arm sequence to grab according to the space-time dependent relationship diagram, and generate a motor current-position composite control instruction set by a pre-trained grabbing dynamics model; Step 400: Real-time collected package point cloud data are combined with six-dimensional force sensor data to calculate an actual pose of the package based on a Kalman filtering algorithm; when a pose deviation between the actual pose and the target pose homogeneous transformation matrix exceeds a preset threshold, a compensation mechanism is triggered, a local space KD tree is constructed based on the package point cloud data, and a compensation pose solution set satisfying a stacking stability constraint is calculated by a collision probability gradient field calculation based on the pressure tolerance threshold matrix, so that an optimal compensation scheme is selected according to a stacking stability objective function; The collision probability gradient field, in particular, is: constructing a local space KD tree, combining a pressure tolerance threshold matrix A collision probability field is calculated, and a directed distance field is used for representation, and the calculation formula is: ; wherein is a safety margin, denotes the directed distance of position x to the surface of the nearest object, is the collision probability at displacement x; Step 500: After the optimal compensation scheme is executed, an adjusted actual pose is reacquired, the container space occupation state quadtree index is updated according to the adjusted actual pose, and the updated container space occupation state quadtree index is fed back to the reinforcement learning algorithm for online policy optimization.
2. The method for optimizing container loading space based on robot collaboration according to claim 1, characterized in that, The construction method of the package multidimensional physical model comprises the following steps: A three-dimensional laser scanner is used to perform 360° omnidirectional scanning on the package to obtain high-density point cloud data P, each point comprising spatial coordinates and color information; The package is placed on an intelligent tray provided with a pressure sensor array, and a weight distribution matrix is recorded for calculating a center of mass position of the package; Geometric feature extraction is performed based on the point cloud data, including volume, principal axis direction, minimum circumscribed rectangle size, elastic modulus parameter, and the extracted parameters are integrated into the physical model of the package.
3. The method of claim 2, wherein, The steps of generating the loading scheme matrix by the reinforcement learning space optimization algorithm comprise the following steps: The state space is defined as the current container space occupation state, which is represented by a three-dimensional voxel grid, and a value of 0 represents idle and a value of 1 represents occupied; The action space is defined as a six-degree-of-freedom placement operation of the package, including three-dimensional coordinates and three rotation angles The reward function is defined as: ; wherein is the new fill volume, is the total container volume, is the stacking stability score, is the reward function.
4. The method of claim 3, wherein, The input of the grabbing dynamics model comprises: an elastic modulus parameter, real-time six-dimensional force sensor data and binocular vision pose feedback; The six-dimensional force sensor data are real-time data obtained from a real-time six-dimensional force sensor at the end of the mechanical arm; The binocular vision pose feedback is real-time data collected by a binocular camera.
5. The method for optimizing container loading space based on robot collaboration according to claim 4, characterized in that, The steps of calculating the actual pose of the package based on the Kalman filtering algorithm comprise the following steps: Real-time package images are collected by a binocular camera, and the package point cloud is reconstructed through image preprocessing, SIFT feature extraction, feature matching, geometric verification and triangulation; The actual pose of the package is calculated by fusing vision and force data using the Kalman filtering algorithm.
6. The method of claim 5, wherein, The calculation method of the pose deviation between the actual pose and the target pose homogeneous transformation matrix is: Compute the position deviation: where is the actual translation vector, is the target translation vector, is the position deviation; Computing the pose deviation: where is the arccosine function, is the quaternion representation of the actual pose, is the quaternion representation of the target pose, is the pose deviation; pose deviation: where w = 0.1 is the pose weight, is the pose deviation.
7. The method of claim 6, wherein, The construction method of the local space KD tree is: Search the space range with the current package position as the center and the search radius of 2.5xd, wherein d is the pose deviation; A three-dimensional KD tree data structure is adopted, the dimension is 3, the leaf node size is 10, and the three-dimensional KD tree data structure is used for fast space neighbor search; The collision probability is calculated in combination with the directed distance field, and the collision probability calculation formula is: ; where is a safety margin, denotes the directed distance of position x to the surface of the nearest object, is the collision probability at displacement x.
8. The method of claim 7, wherein, The generation method of the optimal compensation scheme is: Generating a set of compensated pose solutions that satisfy collision constraints, support constraints, and pressure constraints wherein: No collision constraint is ; Support constraint is , The bottom surface is supported by an area, The total area of the wrapped bottom surface; The pressure constraint is For all contact surfaces i, is the contact force on contact surface i, is the area of contact surface i, is the pressure tolerance threshold for contact surface i; Using a stacking stability objective function evaluating each candidate solution, wherein is a contact area, is a support force distribution ratio, , are a parcel-to-parcel contact area weight factor and a support force distribution uniformity ratio weight factor, respectively, is a compensation solution; ranking all candidate solutions and selecting the largest as the optimal solution.
9. The method of claim 8, wherein, The construction method of the quadtree is: A root node is created to represent the entire container bottom surface rectangular region; A minimum segmentation unit δ is set as the threshold value for terminating the splitting of the quadtree; Recursive node splitting is performed until the node size ≤ the minimum segmentation unit δ or the number of packages in the node ≤ 1 is satisfied; In the leaf node, the package ID, the circumscribed sphere radius r, the centroid coordinates [Cx, Cy, Cz], the pose matrix, the volume and the weight attributes are stored.
10. A system for performing the method of optimizing a container loading space based on robot collaboration according to any one of claims 1-9, characterized in that, It comprises: The perception layer comprises a three-dimensional laser scanner, a pressure sensing tray, a binocular camera and a six-dimensional force sensor, which are used to obtain the physical characteristics and real-time state data of the package; The decision layer comprises a package physical model construction module, a reinforcement learning space optimization module, a local pose compensation module and an online strategy optimization module, which are responsible for generating a loading scheme and optimizing an adjustment strategy; the decision layer receives input data from the perception layer and sends control instructions to the execution layer; The execution layer comprises multiple cooperative mechanical arms, gripping actuators and AGV transport vehicles, which are responsible for executing the loading task.
Citation Information
Patent Citations
Mechanical arm grabbing intelligent optimization method and system based on reinforcement learning
CN120363181A