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

adding multiple objects resets collision map

#1
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.


Attached Files
.rdk copypaste_reset_collision_map.rdk(Size: 3.11 MB / Downloads: 169)
.mp4 copyPasteBoxBug.mp4(Size: 3.56 MB / Downloads: 153)
#2
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")
#3
Good to know, thanks Albert
#4
(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?
#5
You can disable this default behavior by calling this function of the API:
Code:
RDK.Command("CollisionMapMaxSize",-1)
#6
(04-15-2022, 04:20 PM)Albert Wrote:You can disable this default behavior by calling this function of the API:
Code:
RDK.Command("CollisionMapMaxSize",-1)
Thanks, this works.




Users browsing this thread:
1 Guest(s)