Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Speed of MoveL_Test

#1
Hi,
I implemented a test in my software to try a few trajectory before telling to the robot which one to take.
Everything seems to works but I have a problem, it take approximately 480 ms every time I to a MoveL_Test, I don't know why it is this slow, I only have one robot with no tool, the MoveL is 10 cm long, I don't even have the collision enabled.

Is it possible to speed this up ? I only need to test the reach + singularity on the moveL.

I could discretize and test SolveIK for each cm, but I would need to see the Jacobian to be sure I don't have any singularities. How should I do that ? Or any other fast way to try that ? I can't have more than ~20ms of delay.

Thanks
#2
Can you provide the RDK file and python code you are trying to run?

Using the Render function allows you to control if you render the screen after each test. Setting Render to False can help you speed up your calculations.
#3
I use the most basic RDK I could make (I even deleted the tool to fasten the process).

I start RoboDK with the -NOUI option. Then my c++ code looks like this:

Code:
RDK->setCollisionActive(false);

// Test reachable
tJoints start = robot.SolveIK(pose1, home, &toolTCP, &robot2ref);
if (start.Length() != 6) { return false; }
tJoints end = robot.SolveIK(pose2, home, &toolTCP, &robot2ref);
if (end.Length() != 6) { return false; }

// Simulate MoveL
auto res = robot.MoveL_Test(start, pose2);

return res == 0;

I didn't show how I set all my variable but since it works I guess you would't need it.
The test is the most basic I could make, when I had my tool it took between 450 ms and 1.9 sec, since I deleted my tool it take around 250-350 ms.

Should I deactivate the refreshing even with the -NOUI option ?

Just for information, the computer run on Ubuntu 20.04, with a Ryzen 3700X and a GTX 970, so the processing power should not be the issue
#4
I just noticed that inside the console of RoboDK, there are lines about "checking collision ..." but I disabled them ( RDK->setCollisionActive(false); ), is that normal ? could this cause the delay ?

(I tried to deactivate the render, it changed by 4 ms, so it was not the problem)
#5
Collision checking usually takes time and it can explain a 400 ms delay.

I'm not sure what is it that you changed but if you can send your project I can help you better.
#6
So if it test the collision, it means "RDK->setCollisionActive(false);" doesn't work ?

I sent you the snippet of code used to launch the test in my previous message, I can add the variable assignation but it won't change much, and I can't send you my c++ project.

I try to create a minimalist version of my c++ program to give you more information, I also send again the RDK file:

Code:
class Wrapper() {

Wrapper() {
RDK = new RoboDK();
RDK->Connected();

RDK->setCollisionActive(false);
RDK->Render(false);


station = RDK->AddFile("Sim Robot.rdk"));
robot = RDK->getItem("", RoboDK::ITEM_TYPE_ROBOT);

home = robot.JointsHome();
toolTCP = robot.PoseTool();
robot2ref = robot.PoseFrame();
}


bool testMoveL(Mat pose1, Mat pose2) {

// Test reachable
tJoints start = robot.SolveIK(pose1, home, &toolTCP, &robot2ref);
if (start.Length() != 6) { return false; }
tJoints end = robot.SolveIK(pose2, home, &toolTCP, &robot2ref);
if (end.Length() != 6) { return false; }

// Simulate MoveL
auto res = robot.MoveL_Test(start, pose2);

return res == 0;
}

RoboDK *RDK;
Item station;
Item robot;
tJoints home;
Mat robot2ref;
Mat toolTCP;

}

I instantiate this class once and run "testMoveL" which each of the trajectory I want to try.

I try 2 movements every time, one straight in tool frame, then one going up, it's the same function, only the positions changes, but every time the computation of the movement "going up straight" is faster (about x3 faster) I guess the movement is just simpler for the algorithm, but it's still weird since each movement move about the same distance.
#7
I had to delete everything to simplify the computation, with no tool, only the robot and nothing else, I can manage to get around 250 ms, it really seems that the collision stays enable whatever I try. If you have an idea to speed this up it would be great ! For now it's not usable in our machine (it's slower than the time I have with "CNT")
#8
Hi, sorry to insist but this is a problem which make my machine unusable, it's been 14 days that I have this issue and my trial version of RoboDK is nearly over . I will not be able to convince my team to use it if it doesn't work.. and this machine is supposed to be in demonstration since last week. Can you help me as soon as possible please ? Thanks.
#9
It would be great if you can provide the RDK project to better understand the slowdown.

Collision checking takes time in general and the time it takes to calculate can highly depend on where the robot is located.

Among other things you can try removing small geometry or simplifying the mesh, however, this could make things worse depending on your objects. More tips here:
https://robodk.com/doc/en/Collision-Avoi...isionCheck
#10
I used your tool in the forum to send the RDK, I sent it multiple times, if you don't see it it must be your website tools which have a problem. So here are the program: 

https://cloud.secma-sa.com/index.php/s/2AypYeFDGXrmMYG

As I told you, my RDK file only have the Robot, nothing else, no complexe geometry, not even a tool, the software is too slow to add anything else.

You already told me the collision takes time, and I already told you I disabled it, I even sent you the cpp code to show you (I try to disable the collision before every movement to be sure, it doesn't change anything), you can see the cpp I write to show you the problem in a previous message.

The problem is when I look at the console of RoboDK, when I test MoveL I have this:

Code:
MoveL Test: Started ...
MoveL Test: Linear Movement is possible. Checking collisions...
Collision check started...
Collision check time:  4  ms. Collisions:  0     Average:  1  ms
Collision check started...
Collision check time:  1  ms. Collisions:  0     Average:  1  ms
Collision check started...
Collision check time:  3  ms. Collisions:  0     Average:  1  ms
MoveL Test: Done! No collision found. Tested Times:  50
Done with API Command:  "CollisionMoveL"

I tried every possible way to disable the collisions, it takes more than 200ms, it is too slow to run in online mode.  I created my own collision checking, I just want to test the singularity and axis limit, nothing else.

So is the API broken and the software doesn't understand that it doesn't have to check for collision ? or is the software too slow to run online ?
  




Users browsing this thread:
1 Guest(s)