How to create a dummy in a particular coordinate while simulation

Typically: "How do I... ", "How can I... " questions
Post Reply
Aadhithya K
Posts: 9
Joined: 05 Apr 2021, 16:26

How to create a dummy in a particular coordinate while simulation

Post 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

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

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

Post 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

Post Reply