Hi Coppelia team,
I finished the big part of my work on my pick and place chain. Cans are auto generated and place and a cardboard as we wanted to.
Now, I want to perfect it, so that, we will be able to show it to potential Niryo's customers.
I'm using dummies to tell to the robot where to go, and I dynamically generate dummies on cardboard to tell where cans should be placed.
The issues is that, when I'm creating these dummies in a n-iterations loop, the one created in the current iteration loop is selected, which make it visible and give a weird effect.
Moreover, this effect also appears when I'm generating my cans & cardboards, which leads to the impossibility of following an object in the objects' panel
Is there a way to disable this auto-selection or maybe, set something on the created object so that it won't be selected ?
Hope my issue is clear.
Cheers
Rémi
How can I avoid V-REP to autoselect last created objects ?
Re: How can I avoid V-REP to autoselect last created objects ?
Hello Rémi,
try something like:
If running inside of a threaded child script, do following to avoid being interrupted in-between:
Cheers
try something like:
Code: Select all
local sel=sim.getObjectSelection()
-- create objects here...
sim.removeObjectFromSelection(sim.handle_all,-1)
sim.addObjectToSelection(sel)
Code: Select all
sim.setThreadAutomaticSwitch(false)
local sel=sim.getObjectSelection()
-- create objects here...
sim.removeObjectFromSelection(sim.handle_all,-1)
sim.addObjectToSelection(sel)
sim.setThreadAutomaticSwitch(true)
Cheers
Re: How can I avoid V-REP to autoselect last created objects ?
It's working pretty well now, thank you a lot team Coppelia ! And I would like to thank you once again for providing us with such a good help during our model conception :)coppelia wrote: ↑15 Oct 2019, 11:00 Hello Rémi,
try something like:
If running inside of a threaded child script, do following to avoid being interrupted in-between:Code: Select all
local sel=sim.getObjectSelection() -- create objects here... sim.removeObjectFromSelection(sim.handle_all,-1) sim.addObjectToSelection(sel)
Code: Select all
sim.setThreadAutomaticSwitch(false) local sel=sim.getObjectSelection() -- create objects here... sim.removeObjectFromSelection(sim.handle_all,-1) sim.addObjectToSelection(sel) sim.setThreadAutomaticSwitch(true)
Cheers
Cheers