Seeking Advice on Extending Reachable Poses Assessment Methodology to Robots with Translation Joints

조회 수: 1 (최근 30일)
Hello everyone,
I've developed a code for a 6-DOF cobot that assesses reachable poses using position and orientation constraints. This method is adaptable and suitable for any robotic structure with 6 revolute joints. Additionally, for these types of robots, the roll angle of the gripper is not crucial as the last joint can be adjusted to achieve any required roll angle.
Now, I'm considering expanding this methodology to obtain orientations for another robot with the same number of DOF but potentially featuring one or more translation joints. While the second robot is not yet complete, I'm preparing to build it shortly. In this context, I'm seeking recommendations on how to enable the second robot to reach the same orientations and distances, considering that some structures may not reach certain poses or require specific roll angles.
Especially for a robotic arm that has 3 translations at its wrists (an extreme case just to give a grasp of my reasoning), would it be advisable to switch to constraint poses instead of separate orientation and position constraints in the generalizedInverseKinematics function to address this challenge(idk I am just throwing ideas)? I'm open to insights and suggestions on this approach.
Ultimately, I aim to automate this process rather than creating specialized scripts for each unique robotic structure, if possible. Ideally, I would like to select a point and an approach orientation for the arm, specifying the roll angle of the gripper, and then check if it's reachable using the generalizedInverseKinematics function.
I hope my question was clear. It took me some time to explain it, and I apologize if it's confusing. If needed, I'm available for a Zoom meeting to provide further clarification.
rbt = loadrobot('universalUR5e');
rollAngles = [-pi/2 0 pi/2];
numRollAngles = numel(rollAngles); %Roll angles for the gripper
homeConfiguration = [0 -pi/2 0 -pi/2 0 0]; % Vertical initial configuration of the robotic arm
q0 = homeConfiguration;
% North Pole
northPole = [pi 0 0];
orientationsToTest = [northPole];
numObjects = size(pointsData,1); %Points data is a 64x3 matrix where each line represents x y z coordinates for each point
% 64 points in total
for pointIdx = 1:numObjects
currentPoint = pointsData(pointIdx, :);
% Create a rigid body for the current point
bodyName = ['object_', num2str(j)]; % Unique body name for each object to be picked up
body = rigidBody(bodyName);
setFixedTransform(body.Joint, trvec2tform(currentPoint));
% Add the body to the robot
addBody(rbt, body, rbt.BaseName);
gik_Pick = generalizedInverseKinematics('RigidBodyTree', rbt, ...
'ConstraintInputs', {'position','orientation'},'SolverAlgorithm','BFGSGradientProjection');
fixOrientation = constraintOrientationTarget(gripper);
fixOrientation.ReferenceBody = bodyName;
distanceFromObject = constraintPositionTarget(bodyName);
distanceFromObject.ReferenceBody = gripper;
distanceFromObject.TargetPosition = [0 0 0.1]; % 0.1m of distance between gripper(tool0) and the object
for orientationIdx = 1:size(orientationsToTest,1)
% for rollAngleIndex = 1:numRollAngles
currentOrientation = orientationsToTest(orientationIdx,:);
% Update the orientation constraint
fixOrientation.TargetOrientation = eul2quat(currentOrientation, 'XYZ');
eul2quat(currentOrientation, 'XYZ')
[qWaypoints(2,:),solutionInfo] = gik_Pick(q0,distanceFromObject,fixOrientation);
% qWaypoints(2,6) = rollAngles(rollAngleIndex);
% end
end
end
Unrecognized function or variable 'currentPoint'.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Robotics에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by