Search found 7124 matches

by coppelia
13 Mar 2013, 13:40
Forum: General questions
Topic: Creating a matrix of cuboids issue
Replies: 17
Views: 6801

Re: Creating a matrix of cuboids issue

If you want to turn the visibility of an object on, try: simSetObjectInParameter (objectHandle,10,255) If you want to turn the visibility of an object off, try: simSetObjectInParameter(objectHandle,10,0) given that your visibility layers for the scene are in default state (first 8 on, last 8 off). ...
by coppelia
13 Mar 2013, 12:49
Forum: General questions
Topic: IMU Viz
Replies: 1
Views: 3202

Re: IMU Viz

Hello Roberto, Make sure you have a data stream of type "Various: user-defined" in your graph . Also, make sure your data stream is named "gyroX". Then, in a non-threaded child script : if (simGetScriptExecutionCount()==0) then graphHandle=simGetObjectHandle("imugraph") end s_gyroX = simGetIntegerSi...
by coppelia
12 Mar 2013, 22:11
Forum: General questions
Topic: Creating a matrix of cuboids issue
Replies: 17
Views: 6801

Re: Creating a matrix of cuboids issue

  • bit0 --> 1
  • bit1 --> 2
  • bit2 --> 4
  • bit3 --> 8
  • etc.
Cheers
by coppelia
12 Mar 2013, 20:53
Forum: General questions
Topic: Creating a matrix of cuboids issue
Replies: 17
Views: 6801

Re: Creating a matrix of cuboids issue

If your cuboids are dynamic objects (i.e. non-static), then they will fall. If you use simSetObjectPosition on them, it will reset them from the physics engine, move them to the desired position, then add them to the physics engine again (check the documentation). And they will fall. They won't fall...
by coppelia
12 Mar 2013, 20:45
Forum: Feature requests
Topic: Encoder parameters
Replies: 2
Views: 3888

Re: Encoder parameters

Hello, Well, this might already be a little bit too specific to integrate directly into V-REP. You can reach the same functionality very easily, without the need to write a plugin : just attach a child script to your joint , do your calculations and then publish the encoder value via various means: ...
by coppelia
12 Mar 2013, 14:14
Forum: General questions
Topic: Drawing in Vrep
Replies: 14
Views: 7513

Re: Drawing in Vrep

You can only import TGA format textures as of now. You can easily convert from one fromat to the other using a pain program, GIMP for instance which is free. And you can only import textures from the textures dialog . DXF is a CAD format, and only 3D information is kept in V-REP, so you cannot use t...
by coppelia
12 Mar 2013, 13:28
Forum: General questions
Topic: Drawing in Vrep
Replies: 14
Views: 7513

Re: Drawing in Vrep

Well, you can import textures if this is what you mean!

Cheers
by coppelia
12 Mar 2013, 12:34
Forum: General questions
Topic: Drawing in Vrep
Replies: 14
Views: 7513

Re: Drawing in Vrep

Hello Daniela, Yes! Have a look at functions similar to simAddDrawingObject . Have also a look how the various drawing models are operating (e.g. the pencil, the paint nozzle or the laser pointer in the folders models/components/modifiers or models/components/sensors ). Since version 3.0.3 you also ...
by coppelia
12 Mar 2013, 11:57
Forum: General questions
Topic: Creating a matrix of cuboids issue
Replies: 17
Views: 6801

Re: Creating a matrix of cuboids issue

Hello,

You are still doing it wrong in your code: if you create and object, then use the returned object handle. Don't get the handle indirectly via the name in that case: you have no guarantee of the name that you object will get during creation.

This topic might also be useful.

Cheers
by coppelia
12 Mar 2013, 11:16
Forum: General questions
Topic: Creating a matrix of cuboids issue
Replies: 17
Views: 6801

Re: Creating a matrix of cuboids issue

Hello,

Sorry for the late reply.
In your code you are not retrieving the handles correctly. simCreatePureShape actually returns the handle of the created shape. Try something similar to:

Code: Select all

handle=simCreatePureShape(...)
handlers[i][j]=handle
Cheers