A computer-implemented method for generating a motion control profile having an acceleration and a deceleration phase to control a motion of a load handling device from a first position to a second position on a grid structure comprising a plurality of tracks arranged in a grid pattern a first set of tracks extending in a first direction and a second set of tracks extending in a second direction which is transverse to the first direction, wherein the first and second set of tracks are in a substantially horizontal plane to form a grid comprising a plurality of grid spaces, to form a plurality of vertical storage locations beneath the grid for containers to be stacked between and be guided by uprights in a vertical direction through the plurality of grid spaces, wherein the load handling device is configured to lift a container from a vertical storage location beneath the grid and/or lower a container into a vertical storage location, and wherein the load handling device has a footprint corresponding to a single grid space, the motion control profile defining, as a function of time, at least one of an acceleration reference, a velocity reference, a position reference and a jerk reference, the load handling device comprising a wheel assembly comprising a first and second pair of wheels, a drive mechanism for driving the wheel assembly and a controller connected to the drive mechanism being instructed to drive the wheel assembly according to the motion control profile, the motion control profile being generated by the method comprising the steps of: i) receiving a plurality of constraints for the motion control profile, wherein the plurality of constraints comprises a plurality of jerk constraints; ii) selectively applying one or more of the plurality of jerk constraints for controlling the magnitude of the acceleration reference and the velocity reference within one or more of the plurality of constraints in an acceleration phase; and iii) selectively applying one or more of the plurality of jerk constraints for controlling the magnitude of the deceleration reference and the velocity reference within one or more of the plurality of constraints in an deceleration phase; such that the magnitude of the acceleration reference and the velocity reference is substantially zero at the second position; and wherein the plurality of jerk constraints in the acceleration phase and the deceleration phase comprises a first jerk constraint and a second jerk constraint such that: i) the magnitude of the acceleration reference and the velocity reference in the acceleration phase are controlled by selectively applying the first jerk constraint and the second jerk constraint within one or more of the plurality of constraints in the acceleration phase; and ii) the magnitude of the deceleration reference and the velocity reference in the deceleration phase are controlled by selectively applying the first jerk constraint and the second jerk constraint within one or more of the plurality of constraints in the deceleration phase, wherein the absolute value of each of the first and second jerk constraints is 20m/s 3. i) receiving a plurality of constraints for the motion control profile, wherein the plurality of constraints comprises a plurality of jerk constraints; ii) selectively applying one or more of the plurality of jerk constraints for controlling the magnitude of the acceleration reference and the velocity reference within one or more of the plurality of constraints in an acceleration phase; and iii) selectively applying one or more of the plurality of jerk constraints for controlling the magnitude of the deceleration reference and the velocity reference within one or more of the plurality of constraints in an deceleration phase; i) the magnitude of the acceleration reference and the velocity reference in the acceleration phase are controlled by selectively applying the first jerk constraint and the second jerk constraint within one or more of the plurality of constraints in the acceleration phase; and ii) the magnitude of the deceleration reference and the velocity reference in the deceleration phase are controlled by selectively applying the first jerk constraint and the second jerk constraint within one or more of the plurality of constraints in the deceleration phase, wherein the absolute value of each of the first and second jerk constraints is 20m/s 3.