I think you can divide your problem into two subproblems:
1) Partition your 2D scan into segments/clusters which represent single objects. A basic algorithm could be:
- Start at first laser reading and create a new cluster
- Add next reading (neighbor) to cluster, if the range difference is below a threshold
- Else create a new cluster
This approach can be enhanced with a slightly better "adding-condition" (2.) as demonstrated in e.g. http://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/bogoslavskyi16iros.pdf but applied in 2D.
2) Find labels for those clusters (leg, pallet, trolley etc.) -Classification. For this purpose you need to find features/properties of clusters, e.g. width, depth (max. range difference) or gather data and make use of classification algorithms like SVMs etc.
Especially 2) seems to be vary hard using only a 2D laser scanner. One also could imagine to combine multiple scans and create a map (-> SLAM algorithms) which also contains your obstacles, and subsequently find and classify the objects. For this purpose, ROS ("Robot Operating System") is a good starting point as many algorithms, such as SLAM, e.g. http://wiki.ros.org/gmapping, are already implemented.