Search found 1003 matches

by fferri
15 Apr 2024, 10:18
Forum: General questions
Topic: How can I generate path from to write a letter or draw a picture?
Replies: 1
Views: 62

Re: How can I generate path from to write a letter or draw a picture?

You can have a look at the "3D Text Generator" add-on source code (in <coppeliaSim dir>/addOns/), which does something like that.
by fferri
15 Apr 2024, 10:11
Forum: General questions
Topic: Get the error: attempt to call a nil value (field 'getobjectMatrix')
Replies: 2
Views: 60

Re: Get the error: attempt to call a nil value (field 'getobjectMatrix')

Horizon wrote: 13 Apr 2024, 16:04

Code: Select all

Anc=Matrix:vertcat(Matrix(3,4,sim.getobjectMatrix(camera,tip)),Matrix(1,4,{0,0,0,1}))
Also, you can write that as simply:

Code: Select all

Anc=Matrix4x4(sim.getObjectMatrix(camera,tip))
Matrix4x4 initializes from either a 12 or 16 elements array.
by fferri
15 Apr 2024, 10:09
Forum: General questions
Topic: Get the error: attempt to call a nil value (field 'getobjectMatrix')
Replies: 2
Views: 60

Re: Get the error: attempt to call a nil value (field 'getobjectMatrix')

Lua is a case-sensitive language, and so are API function names.

Refer to Regular API reference.
by fferri
15 Apr 2024, 10:05
Forum: General questions
Topic: How to Import a URDF file
Replies: 5
Views: 112

Re: How to Import a URDF file

Force sensors are used for "Fixed joints".
by fferri
11 Apr 2024, 13:37
Forum: General questions
Topic: Rotate an object from API
Replies: 4
Views: 98

Re: Rotate an object from API

Then you want to specify the frame relative to something else than sim.handle_world.
Simply change that parameter when calling sim.setObjectOrientation
by fferri
11 Apr 2024, 13:36
Forum: Feature requests
Topic: I suggest the Drawing Curve should be reversed when screenshooting.
Replies: 2
Views: 92

Re: I suggest the Drawing Curve should be reversed when screenshooting.

You can replace drawing objects with shapes if you want to have them in 3D output.
by fferri
11 Apr 2024, 13:34
Forum: General questions
Topic: How to Import a URDF file
Replies: 5
Views: 112

Re: How to Import a URDF file

Yes, the URDF importer is very finicky about the resources' paths, and often those need to be adjusted...
by fferri
10 Apr 2024, 16:45
Forum: General questions
Topic: How to Import a URDF file
Replies: 5
Views: 112

Re: How to Import a URDF file

It is really transparent (opacity = 0) or it is in a hidden layer?
by fferri
10 Apr 2024, 09:04
Forum: General questions
Topic: How can I limit the working space of the robot?
Replies: 1
Views: 72

Re: How can I limit the working space of the robot?

There is an option to avoid joint limits in simIK.setGroupFlags: simIK.group_avoidlimits : joint limits are actively avoided A more customizable approach to drive the robot configuration towards "better" poses could be of introducing a secondary task, e.g. to attract the elbow up, without ...
by fferri
10 Apr 2024, 08:56
Forum: General questions
Topic: Rotate an object from API
Replies: 4
Views: 98

Re: Rotate an object from API

eulerAngles = sim.getObjectOrientation(shapeHandle, sim.handle_world) eulerAngles[3] = eulerAngles[3] + amount sim.setObjectOrientation(shapeHandle, eulerAngles, sim.handle_world) Notes: sim.handle_world is the default, so it is not required to specify it; objects rotate around their origin. Arbitr...