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

Slow collision free planner

using the same cell and configuration, if I run the collision free planner through the GUI it's way faster than when I do through the API.
Are there some parameters/tricks I can use to speed it up?
I saw the section in the Doc, but I would exclude it's because of the STEP files since those are the same in both cases.
I would exclude it's the millimeters step or the joint step because I set the same values both on the api and on the gui
What function of the API are you using? It would help if you can send us an example we can use to reproduce it.
int samples = 10;
int edges = 5;
int collisionDegMM = 4;

RDK->PluginCommand("CollisionFreePlanner", "Clear");
RDK->PluginCommand("CollisionFreePlanner", "Samples", QString::number(samples));   
RDK->PluginCommand("CollisionFreePlanner", "Edges", QString::number(edges));       
RDK->Command("PathStepCollisionDeg", QString::number(collisionDegMM));
RDK->Command("PathStepCollisionMM", QString::number(collisionDegMM));

RDK->PluginCommand("CollisionFreePlanner", "Calc");

This is the code snippet where I calculate the map. It gets very slow since the very beginning, where a popup shows the number of samples and edges calculated
Do you clear your map using the UI as well?
How much slower does it get?

It would help if you can also provide an RDK file for us to replicate this issue.
I think I do... If clearing the map on the UI means deleting existing points instead of appending new ones when I launch the plugin
I attach an example. I use samples = 10, edges = 5,  collision deg and mm = 4. If I use RoboDK plugin it takes around 10 seconds. If I run the commands i wrote earlier it takes 2 and a half minutes.
In the station I attached you can first run the collision free plugin using the params as above and then you can run the python script called Calculate Map that I added to the station. It executes those instructions. Thanks!

Attached Files
.rdk   MapForum.rdk (Size: 4.96 MB / Downloads: 17)

Users browsing this thread:
1 Guest(s)