Search found 8986 matches

by coppelia
02 Dec 2021, 10:47
Forum: General questions
Topic: Quadcopter Propellers
Replies: 1
Views: 53

Re: Quadcopter Propellers

Hello, make sure you use CoppeliaSim V4.2.0 or later. The object handle is needed mainly to be able to apply a force and torque to the related propeller origin. The rotation of the propeller is just visuals). The model works by applying vertical force to each of the 4 propeller locations. And by als...
by coppelia
02 Dec 2021, 10:34
Forum: General questions
Topic: Smooth Path Following
Replies: 1
Views: 45

Re: Smooth Path Following

Hello Mattia, have a look at the demo scene scenes/trajectoryAndMotion/pathToTrajectory.ttt . The idea is to see your path as a one-dimensional task, which is to follow it from its start, until you arrived at its length L. Then you can use sim.moveToConfig Make sure you also have a look at the other...
by coppelia
02 Dec 2021, 10:30
Forum: General questions
Topic: use 'sim.moveToPose' to control two object move with different position
Replies: 3
Views: 886

Re: use 'sim.moveToPose' to control two object move with different position

You can't call another coroutine/thread from a coroutine/thread. You'll have to work by organizing your coroutines as workers, that can be triggered/activated with specific variables for instance: function coroutineMain() while true do if commandPending then -- handle pending command commandPending=...
by coppelia
30 Nov 2021, 05:49
Forum: General questions
Topic: Error: [string -unknown location]:?: Call failed.
Replies: 1
Views: 261

Re: Error: [string -unknown location]:?: Call failed.

Hello, make sure that the script you are calling is initialized (e.g. if simulation is not running, child scripts are not initialized), and that the function exists. Additionally, as for your other post, I highly recommend you to use the ZeroMQ-based remote API : it will make everything much easier....
by coppelia
30 Nov 2021, 05:44
Forum: General questions
Topic: About simxGetModelProperty and simxSetModelProperty
Replies: 1
Views: 225

Re: About simxGetModelProperty and simxSetModelProperty

Hello, normally, sim.getModelProperty will return 0 when no property is overridden. The returned value is bit-coded. In your case, you won't get anything usable, since you are not using the appropriate operation mode (use simx_opmode_blocking to fetch values remotely). Finally, if you are running Py...
by coppelia
30 Nov 2021, 05:39
Forum: General questions
Topic: How to optimize the control of manipulator
Replies: 1
Views: 264

Re: How to optimize the control of manipulator

Hello, I am not sure I understand the question. Of course, in CoppeliaSim you can control/access models/objects/joints from several scripts at the same time, which will result in undefined behaviour. It is your responsibility to orchestrate everything. Additionally, it seems you are using an old Cop...
by coppelia
30 Nov 2021, 05:33
Forum: General questions
Topic: Inserting a path using x y coordinates
Replies: 3
Views: 409

Re: Inserting a path using x y coordinates

Hello,

here a simple example, creating a path with 4 control points located at (0,0,0),(1,0,0),(1,1,0),(0,1,0):

Code: Select all

    local ctrlPts={0,0,0,0,0,0,1,
                    1,0,0,0,0,0,1,
                    1,1,0,0,0,0,1,
                    0,1,0,0,0,0,1}
    sim.createPath(ctrlPts,0,100,0)
Cheers
by coppelia
30 Nov 2021, 05:26
Forum: General questions
Topic: use 'sim.moveToPose' to control two object move with different position
Replies: 3
Views: 886

Re: use 'sim.moveToPose' to control two object move with different position

Hello, you have at least 3 possibilities: use a threaded child script for each object to move write an alternative function similar to sim.moveToPose: that function merely uses sim.rmlPos, sim.rmlStep and sim.rmlRemove, and you can then write movement functions for n DoFs, or for n objects However t...
by coppelia
29 Nov 2021, 17:31
Forum: General questions
Topic: Quadcopter model Dynamics
Replies: 1
Views: 1428

Re: Quadcopter model Dynamics

Hello,

for parameters to adjust on that model, have a look at the child script attached to the model, in the init section.
But keep in mind that this model is only meant as an example, and it probably makes sense to write your own controller depending on your application.

Cheers