Search found 8984 matches

by coppelia
02 Dec 2021, 10:34
Forum: General questions
Topic: Smooth Path Following
Replies: 1
Views: 32

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: 790

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: 215

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: 192

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: 214

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: 348

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: 790

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: 1326

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
by coppelia
29 Nov 2021, 17:27
Forum: General questions
Topic: Grasp ball but always fall down
Replies: 1
Views: 1354

Re: Grasp ball but always fall down

Hello, grasping is not an easy task. Make sure to have high friction parameters for the ball and the various gripper elements. Additionally, try to adjust some of the gripper parameters (e.g. max. force of the open/close joint openCloseJoint , or the target velocity). The problematic aspect of a bal...
by coppelia
29 Nov 2021, 16:58
Forum: General questions
Topic: Python - Lua B0 server client
Replies: 1
Views: 1607

Re: Python - Lua B0 server client

Hello Marco, I think the simplest and best approach would be to use the ZeroMQ-based remote API , since you are using Python. Then, you will also be able, in a very simple and straight forward way, to call script functions from Python, sending and fetching data to/from CoppeliaSim, with sim.callScri...