Pioneer p3dx script

Report crashes, strange behaviour, or apparent bugs
Post Reply
Nuar
Posts: 4
Joined: 18 Oct 2021, 12:38

Pioneer p3dx script

Post by Nuar »

Hi.
I was using CoppeliaSim Edu, ver. 4.2.0, and I'm a beginner.
When I was studying the Рioneer_p3dx script, I became interested in these
two lines (nn 4, 5):

Code: Select all

      sim.addItemToCollection(obstacles,sim.handle_all,-1,0)
      sim.addItemToCollection(obstacles,sim.handle_tree,robot,0)

What are they doing? Perhaps the second line should look like this:

Code: Select all

     sim.addItemToCollection(obstacles,sim.handle_tree,robot, 1)
Thanks,
Andrey

coppelia
Site Admin
Posts: 8985
Joined: 14 Dec 2012, 00:25

Re: Pioneer p3dx script

Post by coppelia »

Hello Andrey,

you are perfectly right, the collection is composed by all objects in the scenes, minus the tree starting at the robot's base.

Cheers

Post Reply