09-17-2020, 10:15 PM
If you have collision check properly disabled you should not see the collision check time in the standard output/debug output. So, somewhere in the code you must be activating it or you may have another instance connecting to the API and doing other things.
I was able to run the following code without issues and getting constant timings.
I was able to run the following code without issues and getting constant timings.
Code:
RDK = new RoboDK();
RDK->Connected();
RDK->setCollisionActive(false);
RDK->Render(false);
//station = RDK->AddFile("Sim Robot.rdk"));
Item robot = RDK->getItem("", RoboDK::ITEM_TYPE_ROBOT);
Mat pose1 = RDK->getItem("Take").Pose();
Mat pose2 = RDK->getItem("Out").Pose();
tJoints home = robot.JointsHome();
Mat toolTCP = robot.PoseTool();
Mat robot2ref = robot.PoseFrame();
// Test reachable
for (int i=0; i<1000; i++){
tJoints start = robot.SolveIK(pose1, home, &toolTCP, &robot2ref);
if (start.Length() != 6) { return; }
tJoints end = robot.SolveIK(pose2, home, &toolTCP, &robot2ref);
if (end.Length() != 6) { return; }
// Simulate MoveL
auto res = robot.MoveL_Test(start, pose2);
qDebug() << res;
}