obstacle avoidance is not available

Report crashes, strange behaviour, or apparent bugs
Post Reply
jmdwn
Posts: 3
Joined: 07 May 2018, 05:10

obstacle avoidance is not available

Post by jmdwn » 07 May 2018, 12:03

I was trying to adapt the script of the demo(motionplanningDemo1,the kuka one) to my own 6DOF manipulator.
I kept the main structure of the demo script, and I just change the parameters of the manipulator.
However, when it was running, the obstacle avoidance failed meanwhile the collision detection worked. Also I was informed as below:
Lua runtime error: [string "CHILD SCRIPT 0link"]:50: Collection does not exist. (sim.getConfigForTipPose)
stack traceback:
[C]: in function 'getConfigForTipPose'
[string "CHILD SCRIPT 0link"]:50: in function 'findCollisionFreeConfigAndCheckApproach'
[string "CHILD SCRIPT 0link"]:73: in function 'findSeveralCollisionFreeConfigsAndCheckApproach'
[string "CHILD SCRIPT 0link"]:275: in function <[string "CHILD SCRIPT 0link"]:233>
Would anyone tell me which problem I may get into?

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

Re: obstacle avoidance is not available

Post by coppelia » 09 May 2018, 16:29

Hello,

there appears to be a bug with that function (sim.getConfigForTipPose). Currently you can only provide entity pairs, if each of the entity is a collection.

Cheers

jmdwn
Posts: 3
Joined: 07 May 2018, 05:10

Re: obstacle avoidance is not available

Post by jmdwn » 09 May 2018, 18:25

Thanks a lot! I just fixed it.

However, I just encountered another problem. When I ran the simulation, no error was reported.

But the problem is that the manipulator moved from the initial configuration to the desired configuration ignoring the existence of the obstacle, which means it just went through the obstacle and activated the collision detection again.

What really confuse me is why a path which may cause collisions can be generated by my script? Being a green hand of v-rep, I am like I just walked into a dead end, so could you please help me analyze the cause in my script?

the .ttt file is attached in the link below.

https://www.dropbox.com/s/xx3flclz6e605 ... 5.ttt?dl=0

Many Thanks!

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

Re: obstacle avoidance is not available

Post by coppelia » 11 May 2018, 08:24

Your link is not available!

jmdwn
Posts: 3
Joined: 07 May 2018, 05:10

Re: obstacle avoidance is not available

Post by jmdwn » 11 May 2018, 15:05

Oops, I don’t know what happened to the link.
Anyway, I just fixed the problem by checking the option ‘exlicit handling’ in the ik calculation moudle.
So may I ask what does the option ‘explicit handling’ means?
Also when the obstacle avoidance task accomplished, my manipulator just lost control. Does it means that the PID parameters should be correct?

ps.I uploaded it again. Wish it could work.
https://www.dropbox.com/s/8fkt078p8frmx ... .ttt?dl=0

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

Re: obstacle avoidance is not available

Post by coppelia » 15 May 2018, 07:59

By default, if you create a collision object, a distance calculation object, and IK group, etc., their explicit handling flag is off. This means those objects will be implicitely handled by the main script. Typically with following calls from the main script:

Code: Select all

    sim.handleCollision(sim.handle_all_except_explicit)
    sim.handleDistance(sim.handle_all_except_explicit)
    sim.handleIkGroup(sim.handle_all_except_explicit)
    ...
When flagged as explicit handling, you will have to call those functions yourself upon the objects, e.g.:

Code: Select all

    sim.handleCollision(collisionObjectHandle)
    sim.handleDistance(distanceObjectHandle)
    sim.handleIkGroup(ikGroupHandle)
You have to break-down your script into several sections, and check if each one operates as expected. You seem to be searching for a path, following that path, then generating a straight path via IK, then following that path, then following that last path in reverse.

Cheers

Post Reply