Method and apparatus for online bin packing of arbitrary shaped three-dimensional items with physical constraints
By using geometrically provable candidate generation and learning-based sorting, combined with physical simulation verification, the problems of large action space, low efficiency, and insufficient real-time performance in the existing technology of irregular 3D packing problem are solved, and efficient and stable online packing of 3D items is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2026-02-12
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies, when dealing with the packing problem of arbitrary irregular three-dimensional shapes, suffer from huge action space, inefficient exploration, lack of systematic modeling with physical realizability, difficulty in compressing action space and training costs while ensuring density, and lack the ability to achieve sequential decision-making and real-time online requirements.
A method combining geometrically provable candidate generation and learning-based ranking is adopted. By acquiring container height maps and item point clouds, the value of candidate placement locations is calculated using a time-difference-based value estimation algorithm, and physical simulation is performed to verify the results, generating a compact and stable placement scheme.
It achieves efficient and stable placement of any irregular object under online conditions, compresses the action search space, reduces training and inference costs, balances real-time performance and training efficiency, and improves space utilization.
Smart Images

Figure CN121684766B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent manufacturing and robotics, specifically to an online packing method and apparatus for three-dimensional objects of arbitrary shapes that incorporate physical constraints. Background Technology
[0002] The packing problem is widespread in logistics, manufacturing, and robotics systems, and is a classic challenge in computational geometry and combinatorial optimization. 3D packing is generally considered an NP-hard problem, thus relying heavily on heuristic strategies and approximate solutions. In engineering practice, real-world scenarios often involve irregular 3D shapes, continuous pose variables, and physical realizability constraints (collision, friction, stability, and dynamics, etc.), making traditional methods difficult to implement directly.
[0003] Research on the bin packing problem can be broadly divided into three lines: bin packing strategies (especially bin packing of arbitrary shapes), bin packing-related tasks in computer graphics, and bin packing and object manipulation in robotics. 1) Bin Packing Strategies. Early work mainly focused on 2D / 3D regular solids (such as cuboids), proposing various heuristic strategies, but none were consistently optimal for all instances. As application requirements expanded to irregular shapes, several representative rules emerged: MTPE (Minimum Total Potential): Prefers placement with a lower center of gravity, tending to produce stable stacking; HM (Height Map Minimization): Minimizes volume / height increments from the loading direction, suitable for vertically dense stacking of non-convex shapes; BLBF (Bottom-Left-Back Fill): Prefers placement at the bottom, left, and back corners of the container. These rules are mostly based on human observation and design, limiting their applicability: for example, HM has difficulty distinguishing equivalent horizontal placements on flat containers, easily leading to suboptimal horizontal placement. To reduce reliance on human-defined rules, recent methods have introduced reinforcement learning (RL) to automatically synthesize bin packing strategies. Early RL methods primarily learned the order in which objects were placed into the bins, leaving the actual placement to heuristics or external algorithms. Subsequent approaches discretized placement positions, using the network to predict scores for discrete grid points, but this introduced a resolution-efficiency tradeoff and action space explosion. Another approach uses a candidate selection paradigm: a predefined set of candidates is given, and then the policy network sorts / selects them. This approach has been validated in tasks such as grasping, transferring, and assembling, effectively pruning suboptimal actions and improving sample efficiency. Parallel exploration has also been undertaken for learning-based bin packing of irregular 3D shapes. Some works directly learn in large-scale, resolution-complete action spaces, resulting in high training overhead and limited practicality. Therefore, how to pre-select small but optimal candidates while maintaining density, and then sort them by the policy, has become a key direction for improving training speed and bin packing effectiveness. 2) Bin Packing Related Problems in Computer Graphics The field of computer graphics has many optimization tasks similar to bin packing, all involving irregular shapes and continuous decision variables: UV texture map generation: A large number of irregular charts need to be densely arranged into a unified texture, balancing shape processing and continuous pose optimization. Traditional approaches separate "shape processing / segmentation" and "arrangement" into stages. Recently, to improve density, the charts are decomposed or deformed in a loop before applying a rectangular bin packing heuristic; however, these methods often ignore the order of bin packing or have prior constraints on the variability of chart boundaries / shapes. 3D printing volume and manufacturability constraints: To meet printing volume and structural strength requirements, large parts need to be segmented and rearranged within the printing volume. Typical workflows use score-based tree segmentation and local numerical optimization to handle continuous shapes and poses, but common strategies are short-sighted (one-step view), focusing only on the improvement of the current step and not modeling the complete sequential decision process. These works are essentially similar to 3D boxing: both involve creating a dense layout for irregular geometry in a continuous space.Modeling the problem as sequential decision-making can potentially narrow the suboptimal gap caused by phased / short-sighted optimization. 3) Packing and related operations in robotics. In the field of robotics, packing is usually placed in a complete pipeline of "perception-planning-prediction-control". Due to the small gaps between objects and the sensitivity to error accumulation, there are relatively few complete systems that can operate stably in a closed loop. Existing systems mostly adopt: top-suction end effectors and top / bottom-view perception schemes, combined with simple heuristic generation and placement such as HM; when errors occur, space is created or the process is restored by shaking / retracting the container to re-perceive; in assembly tasks, the target structure is predefined and the parts are positioned in preset positions, with a different focus than "maximizing space utilization" in packing. In contrast, bin-picking is widely used and can be stably executed on hardware, and its containers are usually much larger than the objects, so dense packing is not required. Although the task objectives are different, its common "candidate action set + learning ranking" paradigm is consistent with the candidate selection approach above, and the sample efficiency is significantly improved through equivalence / group invariance processing (such as factorization of planar rigid body rotation). These concepts also apply to 3D binning: stripping away equivalent transformations at the policy front end can reduce the learning burden on the network and enhance generalization.
[0004] In summary, existing technologies still have the following shortcomings: the geometric understanding and continuous pose search of arbitrary irregular 3D shapes still rely on high-dimensional discretization or strong heuristics, resulting in a huge action space and inefficient exploration; there is a lack of systematic modeling and training loops for physical realizability, which easily leads to geometrically feasible but physically unattainable / unstable placements; the sequential decision-making and real-time online requirements cause pure geometric or staged optimization to produce obvious suboptimal results and engineering bottlenecks; candidate generation is mostly based on empirical rules and lacks provable guarantees at the geometric level, making it difficult to compress the action space and training cost while ensuring density. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide an online packing method and apparatus for arbitrarily shaped 3D objects that combines physical constraints, in order to address the above-mentioned problems in the prior art. This invention aims to achieve efficient understanding of arbitrarily shaped 3D objects, and to reduce the search space by combining geometrically provable candidate generation and learning-based sorting, thereby achieving the goal of balancing real-time performance and training efficiency.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0007] A method for online packing of arbitrarily shaped three-dimensional objects that incorporates physical constraints includes the following steps:
[0008] S1, Get the container height map of the container;
[0009] S2, detect the items to be packed. If the items to be packed are detected, obtain the point cloud of the items and jump to step S3.
[0010] S3, determine the candidate placement position;
[0011] S4, take the container height map of the container and the item point cloud of the packed items as the "state" of the value estimation algorithm based on temporal difference, take the selection of candidate placement positions as the "action" of the value estimation algorithm based on temporal difference, and use the value estimation algorithm based on temporal difference to calculate the value of the packed items performing the "action" for each candidate placement position.
[0012] S5, Sort each candidate placement position in descending order according to value and truncate to generate a set of candidate placement positions;
[0013] S6, iterate through the candidate placement location set and select one candidate placement location as the target placement location;
[0014] S7, convert the "action" corresponding to the target placement position into a release pose and perform physical simulation. If the physical simulation passes, release the boxed item to the target placement position and proceed to step S9; otherwise, proceed to step S8.
[0015] S8, determine whether the candidate placement position set has been traversed. If it has been traversed, end and exit; otherwise, jump to step S6 to continue traversing the next candidate placement position.
[0016] S9, determine whether the task has ended. If the task has not ended, update the container height map and jump to step S2; otherwise, end and exit.
[0017] Optionally, obtaining the container height map in step S1 includes: acquiring a depth map of the container using an RGB-D camera viewing the container from above, and projecting the depth map onto the container coordinate system according to the following formula. Generate container height map :
[0018] ;
[0019] in, Container height diagram Grid within container height, To obtain the maximum value, For grid The set of points, For grid midpoint Depth, point For a set of points The point in the middle;
[0020] Step S2, obtaining the item point cloud, includes: acquiring the item point cloud of the boxed items using two structured light cameras, one of which acquires the item point cloud in the container coordinate system from a top-down angle. The upper surface point set is used, and another structured light camera acquires the contents of the boxed items in the container coordinate system from a downward angle. The bottom surface point set is used to generate the item point cloud of the packed items by combining the top surface point set and the bottom surface point set. And point the items to the cloud. Resample to the required number of points.
[0021] Optionally, determining the candidate placement location in step S3 includes:
[0022] S3.1, Initialize the planar rotation set , ,in The rotation angle interval is the size of the rotation set over the plane. Each orientation in Dot cloud of items to be packed Around Rotation of the axis yields the orientation Point cloud of items below Calculate orientation Point cloud of items below axis-aligned bounding box Record the offset of the lower left point FLB from the origin of the object's reference frame. ;
[0023] S3.2, with a preset sampling step size On the container plane Above the interval Sampling grid points To obtain the grid point set ,in and The size of the container along the X and Y axes;
[0024] S3.3, for grid point sets Each grid point in The displacement in the Z-axis direction is calculated using the landing altitude function. If the grid point Make cross the container plane The boundary, displacement in the Z-axis direction Greater than the height of the container If the grid point undergoes static penetration with the ray projection of an already placed object, then the grid point will be... Otherwise, mark them as infeasible, and finally obtain feasible grid points. and its displacement in the Z-axis direction The feasible grid set formed by the constructed grid The functional expression for the landing altitude function is:
[0025] ;
[0026] in, The rotation angle of the boxed items on the plane of rotation The subsequent set of bottom surface points, which is acquired by a structured light camera. Container height diagram Coordinates inside the container The height of the grid, They are the bottom points The length of the bounding box of the packaged object along the X, Y, and Z directions. This is a safety margin for penetration protection;
[0027] S3.4, in the feasible grid set Perform connectivity analysis to obtain the set of regions. ,in For a set of regions The j-th region; for adjacent grids within the same region, if the displacement of two points in the Z-axis direction... The absolute value of the difference does not exceed the preset threshold. If connectivity is maintained, then it is disconnected; finally, the set of regions to be filtered and deleted is removed. The area below the preset threshold The area;
[0028] S3.5, for the filtered set of regions Each area in , will the region The boundary pixel chains are closed into a polyline in coordinate order, and the polyline is used to approximate the corresponding polygon. Traversing polygons Find the vertices, calculate their interior angles, and determine their convexity to identify convex vertices, thus obtaining a set of convex vertices consisting of all convex vertices. For convex vertex sets If the distance between two convex vertices is less than a preset threshold r, then the displacement in the Z-axis direction is retained. Lower convex vertices;
[0029] S3.6, for the filtered set of regions Each region Each remaining convex vertex , will be towards Point cloud of items below axis-aligned bounding box The front-left lower point FLB and the convex vertex After alignment, the corresponding horizontal placement position is obtained. The displacement in the Z-axis direction is calculated using the landing altitude function. Thus, the orientation is obtained. Multiple candidate target placement locations ;
[0030] S3.7, Placement location for each candidate target. By analyzing the container height map Or towards Point cloud of items below axis-aligned bounding box The expansion is set to a specified size to determine if there is a conflict with the container's boundary; if a conflict exists, it is discarded.
[0031] S3.8, facing all Candidate target placement positions The summaries result in a set. ; set Displacement along the Z-axis Sort in ascending order; place the top N candidate targets in the desired positions. This will serve as the placement location for the final generated candidate targets.
[0032] Optionally, in step S4, when the container height map of the container and the item point cloud of the packed items are used as the "state" of the time-difference-based value estimation algorithm, and the selection of candidate placement locations is used as the "action" of the time-difference-based value estimation algorithm, the functional expression of the "state" of the time-difference-based value estimation algorithm is:
[0033] ;
[0034] in, for The state of observation at any given moment; for The state at any given time is represented by the container height map of the container and the item point cloud of the packed items, which is the "state" of the value estimation algorithm based on temporal difference. For container height diagram, The point cloud of the items to be packed is generated; the function expression of the "action" of the value estimation algorithm based on temporal difference is:
[0035] ;
[0036] in, for The robotic arm operations at specific times are used to select candidate placement positions as "actions" for the temporal difference-based value estimation algorithm; The angle of rotation in the plane. These represent the displacements required to place the candidate position along the X, Y, and Z axes, respectively; and the reward function used in the time-series difference-based value estimation algorithm is:
[0037] ;
[0038] in, Represents the state at time t. Select Action The reward , and For weight parameters, For items volume, For placing items The offset that occurred, For items Physical penetration constraint penalty when an item is detected. Physical penetration constraint penalty when penetration occurs with container boundaries or placed items. The value is a preset penalty constant -c; otherwise, a physical penetration constraint penalty is applied. The value of is 0.
[0039] Optionally, in step S4, the value of the "action" performed on each candidate placement location for the packed item is calculated using a time-series difference-based value estimation algorithm, including:
[0040] S4.1, Container Height Diagram Perform feature extraction to obtain container features Point cloud of objects Perform feature extraction to obtain item features Placement positions for each candidate Location information is used to extract features to obtain location features. The location information of the candidate placement location includes orientation and position;
[0041] S4.2, Place each candidate in its designated position. Location features Respectively with container features and item characteristics After concatenation, the value of each candidate placement location is obtained by feature extraction through a value estimation network. The value estimation network, trained on a loss function derived from the state at time t, is defined as the value of performing "actions" on each candidate placement location for the boxed item. Select Action Rewards The value of the candidate placement position at time t+1 is determined.
[0042] Optionally, in step S4.1, the container height diagram is... Perform feature extraction to obtain container features To implement point cloud analysis of objects using a convolutional neural network Perform feature extraction to obtain item features To achieve this using the PointNet network, each candidate placement position is analyzed separately. Location information is used to extract features to obtain location features. This is achieved through a multilayer perceptron; in step S4.2, the placement of each candidate position... Location features Respectively with container features and item characteristics The function expression for feature extraction via a value estimation network after concatenation is:
[0043] ;
[0044] in, Represents the first time at time t The value of each candidate position , The value estimation network is represented as a multilayer perceptron; the loss function used by the value estimation network during training is expressed as follows:
[0045] ;
[0046] in, The loss function used during training of the value estimation network. For the state at time t Select Action The reward As the attenuation factor, The maximum value among all candidate placement positions at time t+1. The index of the candidate placement position corresponding to the maximum value at time t+1.
[0047] Optionally, step S7, which converts the "action" corresponding to the target placement position into a release pose and performs physical simulation, includes: loading the container's size parameters, the size parameters of the packed items, and the three-dimensional coordinates and attitude parameters of the items to be packed according to the target placement position into the physics engine; performing dynamics solving through the physics engine to calculate the motion process of the packed items under gravity and contact constraints in the simulation environment; after the packed items reach a stationary state in the simulation environment, performing constraint checks on the packed items and the packed items; if any item exceeds the boundary of the container, the physical simulation is deemed to fail; otherwise, the physical simulation is deemed to pass.
[0048] The present invention also provides an online packing device for three-dimensional objects of arbitrary shape that incorporates physical constraints, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the online packing method for three-dimensional objects of arbitrary shape that incorporates physical constraints.
[0049] The present invention also provides a computer-readable storage medium storing a computer program or instructions that are programmed or configured to execute, via a processor, the online packing method for arbitrarily shaped three-dimensional articles incorporating physical constraints.
[0050] The present invention also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute, via a processor, the online packing method for arbitrarily shaped three-dimensional articles incorporating physical constraints.
[0051] Compared with existing technologies, the present invention mainly achieves the following beneficial effects: The present invention realizes a method for online packing of three-dimensional irregular objects by combining geometrically verifiable candidate action generation, parameterized strategy selection, asynchronous offline strategy reinforcement learning, and physical simulation closed loop. Under the condition of only partial observability (only the next object to be packed is visible) online, it can generate compact, stable, and achievable placement for any irregular object in real time. It can significantly compress the action search space, reduce training and inference costs, realize the placement position decision of the object to be packed and use the physics engine for simulation verification, realize working under the physical simulation closed loop, efficiently understand irregular geometry, and reduce the search space through geometrically verifiable candidate generation and learning-based sorting, so as to achieve the goal of balancing online real-time performance and training efficiency. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the basic process of the method in an embodiment of the present invention.
[0053] Figure 2 This is a schematic diagram of the network structure of the decision network in an embodiment of the present invention. Detailed Implementation
[0054] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings in the embodiments of the present invention.
[0055] like Figure 1 As shown, the online packing method for arbitrarily shaped three-dimensional items combined with physical constraints in this embodiment includes the following steps:
[0056] S1, Get the container height map of the container;
[0057] S2, detect the items to be packed. If the items to be packed are detected, obtain the point cloud of the items and jump to step S3.
[0058] S3, determine the candidate placement position;
[0059] S4, take the container height map of the container and the item point cloud of the packed items as the "state" of the value estimation algorithm based on temporal difference, take the selection of candidate placement positions as the "action" of the value estimation algorithm based on temporal difference, and use the value estimation algorithm based on temporal difference to calculate the value of the packed items performing the "action" for each candidate placement position.
[0060] S5, Sort each candidate placement position in descending order according to value and truncate to generate a set of candidate placement positions;
[0061] S6, iterate through the candidate placement location set and select one candidate placement location as the target placement location;
[0062] S7, convert the "action" corresponding to the target placement position into a release pose and perform physical simulation. If the physical simulation passes, release the boxed item to the target placement position and proceed to step S9; otherwise, proceed to step S8.
[0063] S8, determine whether the candidate placement position set has been traversed. If it has been traversed, end and exit; otherwise, jump to step S6 to continue traversing the next candidate placement position.
[0064] S9, determine whether the task has ended. If the task has not ended, update the container height map and jump to step S2; otherwise, end and exit.
[0065] In this embodiment, step S1, obtaining the container height map, includes: acquiring a depth map of the container using an RGB-D camera viewing the container from above, and projecting the depth map onto the container's coordinate system according to the following formula. Generate container height map :
[0066] ;
[0067] in, Container height diagram Grid within container height, To obtain the maximum value, For grid The set of points, For grid midpoint Depth, point For a set of points Points in the diagram. (Regarding the container height map) Perform feature extraction to obtain container features Previously, it also included a container height map of the container. Limited to the container coordinate system Within the valid area, any portion exceeding the boundary is set as an invalid grid. Container coordinate system The effective region can be represented as ,in and These represent the dimensions of the container along the X and Y axes, respectively. The final container height diagram is obtained. The resolution is , Indicates to Round up, Indicates to Round up, For height intervals.
[0068] In this embodiment, step S2, obtaining the item point cloud, includes: acquiring the item point cloud of the boxed items using two structured light cameras, one of which acquires the item point cloud in the container coordinate system from a top-down angle. The upper surface point set is used, and another structured light camera acquires the contents of the boxed items in the container coordinate system from a downward angle. The bottom surface point set is used to generate the item point cloud of the packed items by combining the top surface point set and the bottom surface point set. Record the points at this time. And point the items to the cloud. Resample to the required number of points (e.g., 1024). In this embodiment, the container coordinate system... The origin is defined as being at the bottom left corner of the bottom surface inside the container. The axis direction is to the right. The axis direction is backward. The axis direction is upward. Furthermore, this embodiment also defines a robot base coordinate system for the robot used to perform robotic arm operations. A camera coordinate system was defined for the three structured light cameras. ,in This is the serial number of the structured light camera. Internal and external parameter calibrations need to be completed beforehand to establish... → and Rigid body transformations are used to uniformly process depth and point clouds within the container coordinate system. This also includes time synchronization and distortion correction for the three cameras. The conveyor belt transports the boxed items at a constant speed. The items to be packed are in a stable planar orientation. When they enter the pickup window, they are detected by a top-down structured light camera or photogate, generating a list of items to be packed. The region of interest (ROI) is identified. By using background modeling or semantic segmentation to separate the foreground material from the conveyor belt background, the point cloud of the items on the upper surface can be obtained. In this embodiment, the three structured light cameras (RGB-D cameras) include: a) a container top-view camera (cam-1): which acquires a depth map of the container's current loading state and projects it onto the container coordinate system. And generate a container height map. If necessary, the container height diagram can be modified. Perform void filling and morphological smoothing (without changing the physical highest point). b) Incoming material top-view camera (cam-2): Acquire the depth of the upper surface of the incoming material and transform it to the container coordinate system. c) Obtain the point set of the upper surface. (c) Upward-looking camera (cam-3): The object is moved by the robot to the upward-looking camera's field of view, the bottom depth is collected, and the data is transformed to the container coordinate system. The point set of the bottom surface is obtained. The point cloud of the object is then processed. Perform feature extraction to obtain item features Previously, this also included the point cloud of items to be packed. Align to the container's coordinate system For example, in this embodiment, the container coordinate system is used. Based on this, the point cloud of the items to be packed is generated. Perform rigid body pre-alignment (only for perceptual feature extraction, without changing the true pose): for example, minimize the volume of the AABB and align the FLB (front left bottom) with the origin to improve the data efficiency of feature learning.
[0069] In this embodiment, step S3, determining the candidate placement position includes:
[0070] S3.1, Initialize the planar rotation set , ,in The rotation angle interval is the size of the rotation set over the plane. Each orientation in Dot cloud of items to be packed Around Rotation of the axis yields the orientation Point cloud of items below Calculate orientation Point cloud of items below axis-aligned bounding box Record the offset of the lower left point FLB from the origin of the object's reference frame. ;
[0071] S3.2, with a preset sampling step size (Select the maximum width of the items to be packed), on the container plane. Above the interval Sampling grid points To obtain the grid point set ,in and The size of the container along the X and Y axes;
[0072] S3.3, for grid point sets Each grid point in The displacement in the Z-axis direction is calculated using the landing altitude function. If the grid point Make cross the container plane The boundary, displacement in the Z-axis direction Greater than the height of the container If the grid point undergoes static penetration with the ray projection of an already placed object, then the grid point will be... Otherwise, mark them as infeasible, and finally obtain feasible grid points. and its displacement in the Z-axis direction The feasible grid set formed by the constructed grid The functional expression for the landing altitude function is:
[0073] ;
[0074] in, The rotation angle of the boxed items on the plane of rotation The subsequent set of bottom surface points, which is acquired by a structured light camera. Container height diagram Coordinates inside the container The height of the grid, They are the bottom points The length of the bounding box of the packaged object along the X, Y, and Z directions. For the safety margin used for penetration protection, the calculation function expression of this landing altitude function is equivalent to the Minkowski approximation under top view, which can achieve fast altitude calculation;
[0075] S3.4, in the feasible grid set Perform connectivity analysis to obtain the set of regions. ,in For a set of regions The j-th region; for adjacent grids within the same region, if the displacement of two points in the Z-axis direction... The absolute value of the difference does not exceed the preset threshold. If connectivity is maintained, then it is disconnected; finally, the set of regions to be filtered and deleted is removed. The area below the preset threshold The area;
[0076] S3.5, for the filtered set of regions Each area in , will the region The boundary pixel chains are closed into a polyline in coordinate order, and the polyline is used to approximate the corresponding polygon. Traversing polygons Find the vertices, calculate their interior angles, and determine their convexity to identify convex vertices, thus obtaining a set of convex vertices consisting of all convex vertices. For convex vertex sets If the distance between two convex vertices is less than a preset threshold r, then the displacement in the Z-axis direction is retained. Lower convex vertices;
[0077] S3.6, for the filtered set of regions Each region Each remaining convex vertex , will be towards Point cloud of items below axis-aligned bounding box The front-left lower point FLB and the convex vertex After alignment, the corresponding horizontal placement position is obtained. The displacement in the Z-axis direction is calculated using the landing altitude function. Thus, the orientation is obtained. Multiple candidate target placement locations ;
[0078] S3.7, Placement location for each candidate target. By analyzing the container height map Or towards Point cloud of items below axis-aligned bounding box The expansion is set to a specified size to determine if there is a conflict with the container's boundary; if a conflict exists, it is discarded.
[0079] S3.8, facing all Candidate target placement positions The summaries result in a set. ; set Displacement along the Z-axis Sort in ascending order; place the top N candidate targets in the desired positions. This will serve as the placement location for the final generated candidate targets.
[0080] In step S4 of this embodiment, when the container height map and the item point cloud of the packed items are used as the "state" of the time-difference-based value estimation algorithm, and the selection of candidate placement positions is used as the "action" of the time-difference-based value estimation algorithm, the functional expression of the "state" of the time-difference-based value estimation algorithm is as follows:
[0081] ;
[0082] in, for The state of observation at any given moment; for The state at any given time is represented by the container height map of the container and the item point cloud of the packed items, which is the "state" of the value estimation algorithm based on temporal difference. For container height diagram, The point cloud of the items to be packed is generated; the function expression of the "action" of the value estimation algorithm based on temporal difference is:
[0083] ;
[0084] in, for The robotic arm operations at specific times are used to select candidate placement positions as "actions" for the temporal difference-based value estimation algorithm; The angle of rotation in the plane. These represent the displacements required to place the candidate position along the X, Y, and Z axes, respectively; and the reward function used in the time-series difference-based value estimation algorithm is:
[0085] ;
[0086] in, Represents the state at time t. Select Action The reward , and For weight parameters, For items volume, For placing items The offset that occurred, For items Physical penetration constraint penalty when an item is detected. Physical penetration constraint penalty when penetration occurs with container boundaries or placed items. The value is a preset penalty constant -c; otherwise, a physical penetration constraint penalty is applied. The value of is 0.
[0087] like Figure 2 As shown, step S4 uses a time-difference-based value estimation algorithm to calculate the value of the "action" performed on each candidate placement location for the packed item, including:
[0088] S4.1, Container Height Diagram Perform feature extraction to obtain container features Point cloud of objects Perform feature extraction to obtain item features Placement positions for each candidate Location information is used to extract features to obtain location features. The location information of the candidate placement location includes orientation and position;
[0089] S4.2, Place each candidate in its designated position. Location features Respectively with container features and item characteristics After concatenation, the value of each candidate placement location is obtained by feature extraction through a value estimation network. The value estimation network, trained on a loss function derived from the state at time t, is defined as the value of performing "actions" on each candidate placement location for the boxed item. Select Action Rewards The value of the candidate placement position at time t+1 is determined. Figure 2 In the diagram, the values of the n candidate placement positions are respectively represented as... ~ .
[0090] In the location information of candidate placement positions, orientation refers to the attitude angle parameter of the object in three-dimensional space relative to the container coordinate system, including the rotation angle around the X, Y, and Z axes, while position refers to the position coordinates. In addition to orientation and position, the location information of candidate placement positions may also include some or all of the following: landing height, tightness score, region ID, and mask. The landing height refers to the vertical height of the lowest point of the object when it is placed at the candidate position and in contact with the bottom surface of the container or an already placed object. The tightness score is a rating of the geometric matching degree between the candidate position and the surrounding space, used to measure the space utilization and tightness of the placement scheme; a higher score indicates a tighter fit between the object and the container space. The region ID is an identifier obtained by numbering the connected spatial region where the candidate position is located, used to distinguish different partitions formed by the feasible placement areas within the container. The mask is a binary spatial distribution matrix used to indicate the feasible placement range of the candidate position in the container space, where valid positions are represented by "1" and unplaceable positions by "0". Figure 2 As shown, the location information of the candidate placement location in this embodiment includes orientation and position, which can be represented as follows: Different candidate positions are distinguished by superscripts, and can be represented as follows:
[0091] , , ..., ;
[0092] in, ~ These represent the features of the 1st to nth candidate positions, respectively.
[0093] like Figure 2 As shown, in step S4.1, the container height diagram is... Perform feature extraction to obtain container features To implement point cloud analysis of objects using a convolutional neural network Perform feature extraction to obtain item features To achieve this using the PointNet network, each candidate placement position is analyzed separately. Location information is used to extract features to obtain location features. This is achieved through a multilayer perceptron; in step S4.2, the placement of each candidate position... Location features Respectively with container features and item characteristics The function expression for feature extraction via a value estimation network after concatenation is:
[0094] ;
[0095] in, Represents the first time at time t The value of each candidate position , The value estimation network is represented as a multilayer perceptron; the loss function used by the value estimation network during training is expressed as follows:
[0096] ;
[0097] in, The loss function used during training of the value estimation network. For the state at time t Select Action The reward As the attenuation factor, The maximum value among all candidate placement positions at time t+1. The index of the candidate placement position corresponding to the maximum value at time t+1. The value estimation network estimates the value using a recursive estimation method based on temporal differences. The update will be performed, with the target value determined by the immediate reward. State at the next moment The value is determined jointly by the valuation.
[0098] In this embodiment, step S7, converting the "action" corresponding to the target placement position into a release pose and performing physical simulation, includes: loading the container's size parameters, the size parameters of the already packed items, and the three-dimensional coordinates and attitude parameters of the items to be packed according to the target placement position into the physics engine; using the physics engine to perform dynamic solving to calculate the motion process of the packed items under gravity and contact constraints in the simulation environment; after the packed items reach a stationary state in the simulation environment, constraint checks are performed on the packed items and the already packed items. If any item exceeds the container's boundary, the physical simulation is deemed to have failed; otherwise, the physical simulation is deemed to have passed. As an optional implementation, this embodiment uses the Bulle physical simulation environment as the physics engine.
[0099] As an optional implementation method, the decision in this embodiment needs to be made within a time limit. If completed within the specified timeframe, the time limit can be set. If the traversal has not been completed in step S8 of this embodiment, the preset threshold is set, and the decision time is further determined to be greater than or equal to the time limit. If the time limit is greater than or equal to If the process fails, the process ends and exits; otherwise, it jumps to step S6 to continue iterating through the next candidate placement position. It should be noted that the "end and exit" in step S8 only indicates that the situation exceeds the ability of the basic method of this embodiment to select candidate placement positions, resulting in the failure of candidate placement position selection. However, at this time, the desired handling strategy after the failure of candidate placement position selection can be selected, including, for example, selecting the highest-scoring calculated candidate position or the default conservative position.
[0100] To verify the effectiveness of the method in this embodiment, the container size was measured in the Bulle physics simulation environment. cm cm, with a uniform friction coefficient of 0.7. Based on the above settings, the method of this embodiment (this method) and existing bin packing methods (including random methods, MTPE methods, HM methods and BLBP methods) were compared on three representative shape sets: the General dataset, the BlockOut dataset, and the Kitchen dataset. Utilization, variance, quantity, and time were used as bin packing utility indicators, and the results are shown in Tables 1, 2, and 3, respectively.
[0101]
[0102]
[0103]
[0104] As shown in Tables 1, 2, and 3, the method of this embodiment (this method) outperforms existing methods in various bin packing utility metrics on the General dataset, BlockOut dataset, and Kitchen dataset. The decision-making time meets the requirements for real-time online scenarios with a frame rate ≥25 FPS; furthermore, in multiple random sequence evaluations, the method of this embodiment exhibits the smallest utility variance and higher stability. Under the same container and sequence conditions, the average number of objects packed by the method of this embodiment is generally higher than the baseline, demonstrating stronger space utilization and compact layout capabilities.
[0105] Furthermore, this embodiment also provides an online packing device for arbitrarily shaped three-dimensional objects with physical constraints, including a microprocessor and a memory interconnected thereto. The microprocessor is programmed or configured to execute the online packing method for arbitrarily shaped three-dimensional objects with physical constraints. This embodiment also provides a computer-readable storage medium storing a computer program or instructions programmed or configured to execute the online packing method for arbitrarily shaped three-dimensional objects with physical constraints via a processor. This embodiment also provides a computer program product including a computer program or instructions programmed or configured to execute the online packing method for arbitrarily shaped three-dimensional objects with physical constraints via a processor.
[0106] Those skilled in the art will understand that the technical solutions provided by this invention may take the form of a method, system, or computer program product. Therefore, this invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention may take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce an implementation of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0107] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. An online bin packing method for arbitrary shaped three-dimensional objects with physical constraints, characterized by, Includes the following steps: S1, Get the container height map of the container; S2, detect the items to be packed. If the items to be packed are detected, obtain the point cloud of the items and jump to step S3. S3, determine the candidate placement position; S4, the container height map of the container and the point cloud of the packed items are used as the "state" of the time-difference-based value estimation algorithm. The functional expression of the "state" of the time-difference-based value estimation algorithm is as follows: ; in, for The state of observation at any given moment; for The state at any given time is represented by the container height map of the container and the item point cloud of the packed items, which is the "state" of the value estimation algorithm based on temporal difference. For container height diagram, For the point cloud of the items to be packed, the selection of candidate placement locations is taken as the "action" of the temporal difference-based value estimation algorithm. The functional expression of the "action" of the temporal difference-based value estimation algorithm is as follows: ; in, for The robotic arm operations at specific times are used to select candidate placement positions as "actions" for the temporal difference-based value estimation algorithm; The angle of rotation in the plane. The values for the "actions" performed on the boxed items at each candidate placement position are calculated using a time-difference-based value estimation algorithm, representing the displacements along the X, Y, and Z axes required for placement at the candidate positions. The reward function used in the time-difference-based value estimation algorithm is as follows: ; in, Represents the state at time t. Select Action The reward , and For weight parameters, For items volume, For placing items The offset that occurred, For items Physical penetration constraint penalty when an item is detected. Physical penetration constraint penalty when penetration occurs with container boundaries or placed items. The value is a preset penalty constant -c; otherwise, a physical penetration constraint penalty is applied. The value is 0; the calculation of the value of the "action" performed by the packed item for each candidate placement position using the time-series difference-based value estimation algorithm includes: S4.1, for the container height map Perform feature extraction to obtain container features Point cloud of objects Perform feature extraction to obtain item features Placement positions for each candidate Location information is used to extract features to obtain location features. The location information of the candidate placement positions includes orientation and position; S4.2, assign each candidate placement position to... Location features Respectively with container features and item characteristics After concatenation, the value of each candidate placement location is obtained by feature extraction through a value estimation network. The value estimation network, trained on a loss function derived from the state at time t, is defined as the value of performing "actions" on each candidate placement location for the boxed item. Select Action Rewards The value of the candidate placement positions at time t+1 is determined; S5, Sort each candidate placement position in descending order according to value and truncate to generate a set of candidate placement positions; S6, iterate through the candidate placement location set and select one candidate placement location as the target placement location; S7. Convert the "action" corresponding to the target placement position into a release pose and perform physical simulation. If the physical simulation passes, release the boxed item to the target placement position and proceed to step S9; otherwise, proceed to step S8. S8, determine whether the candidate placement position set has been traversed. If it has been traversed, end and exit; otherwise, jump to step S6 to continue traversing the next candidate placement position. S9, determine whether the task has ended. If the task has not ended, update the container height map and jump to step S2; otherwise, end and exit.
2. The method for online bin packing of arbitrary shaped three-dimensional objects with physical constraints according to claim 1, wherein, Step S1, obtaining the container height map, includes: acquiring a depth map of the container using an RGB-D camera viewing the container from above, and projecting the depth map onto the container's coordinate system according to the following formula. Generate container height map : ; in, Container height diagram Grid within container height, To obtain the maximum value, For grid The set of points, For grid midpoint Depth, point For a set of points The point in the middle; Step S2, obtaining the item point cloud, includes: acquiring the item point cloud of the boxed items using two structured light cameras, one of which acquires the item point cloud in the container coordinate system from a top-down angle. The upper surface point set is used, and another structured light camera acquires the contents of the boxed items in the container coordinate system from a downward angle. The bottom surface point set is used to generate the item point cloud of the packed items by combining the top surface point set and the bottom surface point set. And point the items to the cloud. Resample to the required number of points.
3. The online packing method for arbitrarily shaped three-dimensional items combined with physical constraints according to claim 1, characterized in that, Determining the candidate placement location in step S3 includes: S3.1, Initialize the planar rotation set , ,in The rotation angle interval is the size of the rotation set over the plane. Each orientation in Dot cloud of items to be packed Around Rotation of the axis yields the orientation Item dot cloud Calculate orientation Item dot cloud axis-aligned bounding box Record the offset of the lower left point FLB from the origin of the object's reference frame. ; S3.2, with a preset sampling step size On the container plane Above the interval Sampling grid points To obtain the grid point set ,in and The size of the container along the X and Y axes; S3.3, for grid point sets Each grid point in The displacement in the Z-axis direction is calculated using the landing altitude function. If the grid point Make cross the container plane The boundary, displacement in the Z-axis direction Greater than the height of the container If the grid point undergoes static penetration with the ray projection of an already placed object, then the grid point will be... Otherwise, mark them as infeasible, and finally obtain feasible grid points. and its displacement in the Z-axis direction The feasible grid set formed by the constructed grid The functional expression for the landing altitude function is: ; in, The rotation angle of the boxed items on the plane of rotation The subsequent set of bottom surface points, which is acquired by a structured light camera. Container height diagram Coordinates inside the container The height of the grid, They are the bottom points The length of the bounding box of the packaged object along the X, Y, and Z directions. This is a safety margin for penetration protection; S3.4, in the feasible grid set Perform connectivity analysis to obtain the set of regions. ,in For a set of regions The j-th region; for adjacent grids within the same region, if the displacement of two points in the Z-axis direction... The absolute value of the difference does not exceed the preset threshold. If connectivity is maintained, then it is disconnected; finally, the set of regions to be filtered and deleted is removed. The area below the preset threshold The area; S3.5, for the filtered set of regions Each area in , will the region The boundary pixel chains are closed into a polyline in coordinate order, and the polyline is used to approximate the corresponding polygon. Traversing polygons Find the vertices, calculate their interior angles, and determine their convexity to identify convex vertices, thus obtaining a set of convex vertices consisting of all convex vertices. For convex vertex sets If the distance between two convex vertices is less than a preset threshold r, then the displacement in the Z-axis direction is retained. Lower convex vertices; S3.6, for the filtered set of regions Each region Each remaining convex vertex , will be towards Item dot cloud axis-aligned bounding box The front-left lower point FLB and the convex vertex After alignment, the corresponding horizontal placement position is obtained. The displacement in the Z-axis direction is calculated using the landing altitude function. Thus, the orientation is obtained. Multiple candidate target placement locations ; S3.7, Placement location for each candidate target. By analyzing the container height map Or towards Item dot cloud axis-aligned bounding box The expansion is set to a specified size to determine if there is a conflict with the container's boundary; if a conflict exists, it is discarded. S3.8, facing all Candidate target placement positions The summaries result in a set. ; set Displacement along the Z-axis Sort in ascending order; place the top N candidate targets in the desired positions. This will serve as the placement location for the final generated candidate targets.
4. The method of claim 1, wherein, Step S4.1 involves creating a container height diagram. Perform feature extraction to obtain container features To implement point cloud analysis of objects using a convolutional neural network Perform feature extraction to obtain item features To achieve this using the PointNet network, each candidate placement position is analyzed separately. Location information is used to extract features to obtain location features. This is achieved through a multilayer perceptron; in step S4.2, the placement of each candidate position... Location features Respectively with container features and item characteristics The function expression for feature extraction via a value estimation network after concatenation is: ; in, Represents the first time at time t The value of each candidate position , The value estimation network is represented as a multilayer perceptron; the loss function used by the value estimation network during training is expressed as follows: ; in, The loss function used during training of the value estimation network. For the state at time t Select Action The reward As the attenuation factor, The maximum value among all candidate placement positions at time t+1. The index of the candidate placement position corresponding to the maximum value at time t+1.
5. The online packing method for arbitrarily shaped three-dimensional items combined with physical constraints according to claim 1, characterized in that, Step S7, which converts the "action" corresponding to the target placement position into a release pose and performs physical simulation, includes: loading the container's size parameters, the size parameters of the already packed items, and the three-dimensional coordinates and attitude parameters of the items to be packed according to the target placement position into the physics engine; performing dynamics solving through the physics engine to calculate the motion process of the items to be packed under gravity and contact constraints in the simulation environment; after the items to be packed reach a stationary state in the simulation environment, constraining checks are performed on the items to be packed and the already packed items; if any item exceeds the boundary of the container, the physical simulation is deemed to fail; otherwise, the physical simulation is deemed to pass.
6. An on-line boxing apparatus for arbitrary shaped three-dimensional objects with physical constraints, comprising a microprocessor and a memory connected to each other, characterized in that, The microprocessor is programmed or configured to execute the online packing method for three-dimensional articles of arbitrary shape that incorporates physical constraints, as described in any one of claims 1 to 5.
7. A computer-readable storage medium having stored therein a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the online packing method for three-dimensional articles of arbitrary shape that incorporates physical constraints, as described in any one of claims 1 to 5.
8. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the online packing method for three-dimensional articles of arbitrary shape that incorporates physical constraints, as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Logistics robot scheduling method based on deep reinforcement learning
CN118536783A
Wind power assembly workshop multi-objective optimization scheduling method based on reinforcement learning
CN118690897A