A non-transitory computer-readable storage medium storing a solution pool and one or more programs to be executed by a device for designing a serial manipulator that comprises an end effector, a plurality of links, and a plurality of motors, the one or more programs, when being executed by one or more processors of the device, causes the device to perform processing comprising:
- obtaining a desired motion profile of the end effector;
- discretizing the desired motion profile into a plurality of points, wherein each of the points carries information of speed, acceleration, and force/torque of the end effector at the point;
- determining a number of degrees of freedom of the serial manipulator, and initializing a length of each of the links and a motor type of each of the motors;
- at each of the points, optimizing the initialized lengths of the links and the motor types of the motors by calculating a dynamic manipulability ellipsoid at the end effector, to obtain desired lengths of the links and desired motor types of the motors, which allows the end effector to execute the desired motion profile under predetermined constraints;
- and
- controlling the serial manipulator having the desired lengths of the links and the desired motor types of the motors to test the serial manipulator;
- wherein the constraints comprise:
- the desired motion profile has a preset smoothness;
- the serial manipulator needs to avoid obstacles;
- and positions of the end effector in the dynamic manipulability ellipsoid at each of the points are able to be connected to one another to form the desired motion profile;
- wherein optimizing the initialized lengths of the links and the motor types of the motors by calculating the dynamic manipulability ellipsoid at the end effector, to obtain the desired lengths of the links and the desired motor types of the motors, which allows the end effector to execute the desired motion profile under predetermined constraints, comprises:
- (a) determining an algorithm for calculating the dynamic manipulability ellipsoid at the end effector according to whether the serial manipulator is redundant in degrees of freedom, and calculating the dynamic manipulability ellipsoid at the end effector according to information of the speed, acceleration, and force/torque of the end effector at a current point;
- (b) visualizing the dynamic manipulability ellipsoid, and displaying the visualized dynamic manipulability ellipsoid on a display;
- (c) determining whether the end effector is outside the dynamic manipulability ellipsoid;
- (d) saving configuration information of current lengths of the links and the motor types of the motors as configuration information of the serial manipulator in the solution pool, in response to the end effector being within the dynamic manipulability ellipsoid;
- (e) obtaining, by an input device, lengths of the links and motor types of the motors inputted by the user, and modifying the current lengths of the links and the motor types of the motors based on the obtained lengths and the obtained motor types, in response to the end effector being outside the dynamic manipulability ellipsoid, and going back to (a);
- wherein determining the algorithm for calculating the dynamic manipulability ellipsoid at the end effector according to whether the serial manipulator is redundant in degrees of freedom, comprises:
- determining whether the degrees of freedom of the serial manipulator in a joint space are redundant with respect to the degrees of freedom in a task space;
- in response to the degrees of freedom of the serial manipulator in the joint space being redundant with respect to the degrees of freedom in a task space, setting the speed and the acceleration at the current point to 0, and calculating the dynamic manipulability ellipsoid at the end effector using a Jacobian pseudo-inverse matrix according to the force/torque, the lengths of the links, and the motor types of the motors at the current point;
- in response to the degrees of freedom of the serial manipulator in the joint space not being redundant with respect to the degrees of freedom in a task space, determining whether a target point is reachable in the task space;
- in response to the target point not being reachable in the task space, modifying the current lengths of the links and the motor types of the motors;
- in response to the target point being reachable in the task space, setting the speed and the acceleration at the current point to 0, and calculating the dynamic manipulability ellipsoid at the end effector using a Jacobian inverse matrix according to the force/torque, the lengths of the links, and the motor types of the motors at the current point.