Proxy option from sim.getObject does not work
Posted: 01 Dec 2023, 11:24
I have the strong suspicion that the 'proxy' option of sim.getObject doesn't work as intended - at least I can't get it to work.
I have a scenario with two robots '/R' (6DoF) and '/R_alt' (8DoF). I try now to get the number of joints attached to the robots by using a loop calling
robotBase=sim.getObject("/R")
for i=0,100,1 do
...
sim.getObject("/Joint_"..i,{proxy=robotBase,noError=true})
...
However, the command seems to ignore the proxy setting and always returns 8 joints (found from /R_alt). Playing around, it seems as if I can put any number or object into the proxy= statement, and nothing seems to have an effect - the function always finds all 8 joints.
However, if I use
sim.getObject("/R/*/Joint_"..i,{noError=true})
instead, I get the desired 6 joints from /R.
So either I use the proxy option in a wrong way, or it simply doesn't work.
I have a scenario with two robots '/R' (6DoF) and '/R_alt' (8DoF). I try now to get the number of joints attached to the robots by using a loop calling
robotBase=sim.getObject("/R")
for i=0,100,1 do
...
sim.getObject("/Joint_"..i,{proxy=robotBase,noError=true})
...
However, the command seems to ignore the proxy setting and always returns 8 joints (found from /R_alt). Playing around, it seems as if I can put any number or object into the proxy= statement, and nothing seems to have an effect - the function always finds all 8 joints.
However, if I use
sim.getObject("/R/*/Joint_"..i,{noError=true})
instead, I get the desired 6 joints from /R.
So either I use the proxy option in a wrong way, or it simply doesn't work.