Page 1 of 1

How to create a dummy in a particular coordinate while simulation

Posted: 24 Apr 2021, 06:00
by Aadhithya K
Hello

I am simulating a wheelchair which detects a door and move towards it. I detected the door using an object detection model in python and found the world coordinates of the center of the door. Now I have to move my wheelchair to the door.
I thought of creating a dummy and using the inbuilt path planning in CoppeliaSim for it. For getting the goal I have to create a dummy at the position of the door. When using the simxCreateDummy() I cannot create a dummy at a different coordinate. I need to know a method or way to create a dummy at the goal coordinates.

I need to create the dummy while simulation as the position of the door has to be found dynamically.

Thanks in advance
Aadhithya K

Re: How to create a dummy in a particular coordinate while simulation

Posted: 28 Apr 2021, 13:35
by coppelia
Hello,

why don't you create the dummy (simxCreateDummy) and modify its position immediately after (simxSetObjectPosition)?

You can also create a script function that create the dummy (sim.createDummy) and places it accordingly (sim.setObjectPosition) at once. And you can then call that function via simxCallScriptFunction.

Cheers