RoboDK Forum
adding multiple objects resets collision map- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+ - - -论坛:RoboDK错误(//www.sinclairbody.com/forum/Forum-RoboDK-bugs)
+--- Thread: adding multiple objects resets collision map (/Thread-adding-multiple-objects-resets-collision-map)



adding multiple objects resets collision map-malacasse-03-01-2022

When using a python script to add many copy items to my station, I found that the collision map pairs that I defined returned to their default value.
I reproduced it with the simple station in attached file by copy/paste 200 times a box.
See video for details.


RE: adding multiple objects resets collision map-Albert-03-01-2022

Calculating and updating the collision map takes a reasonable amount of time when you have many objects in your project. For this reason, RoboDK ignores previously set collision maps once you add a new object and you have many objects. This limit is 200 objects by default.

This behavior is not documented, however, if you use the API you can use functions such as setCollisionActivePair to set the collision map.

Another tip: the following command will set the default collision map after you have loaded all your objects:
Code:
RDK.Command("CollisionMap", "Default")



RE: adding multiple objects resets collision map-malacasse-03-02-2022

Good to know, thanks Albert


RE: adding multiple objects resets collision map-ysli-04-15-2022

(03-01-2022, 02:52 PM)Albert Wrote:Calculating and updating the collision map takes a reasonable amount of time when you have many objects in your project. For this reason, RoboDKignores previously set collision mapsonce you add a new object and you have many objects. This limit is 200 objects by default.
We also hit this limitation. We may hide objects to avoid collision checking. However, as we "Save Station", the collision map goes back to default.
Is it possible to keep already saved collision map instead of reset the map to default?


RE: adding multiple objects resets collision map-Albert-04-15-2022

你可以禁用这个default behavior by calling this function of the API:
Code:
RDK.Command("CollisionMapMaxSize",-1)



RE: adding multiple objects resets collision map-ysli-04-17-2022

(04-15-2022, 04:20 PM)Albert Wrote:你可以禁用这个default behavior by calling this function of the API:
Code:
RDK.Command("CollisionMapMaxSize",-1)
Thanks, this works.