Search found 408 matches

by fferri
14 Nov 2019, 18:45
Forum: General questions
Topic: How can i use the SimulationTime for calculation ?
Replies: 1
Views: 32

Re: How can i use the SimulationTime for calculation ?

time_1 is nil because the condition distance_1 < 0.9 is false.

Fix the logic of your program. For example check that both variables are not nil:

Code: Select all

if time_1 ~= nil and time_2 ~= nil and time_1 - time_2 > 0 then
    sim.setStringSignal("SafetyStop","1")
end
by fferri
12 Nov 2019, 18:25
Forum: Bug reports
Topic: sim.setJointPosition is not working inside the callback function of subscriber in ROS.Please help me
Replies: 4
Views: 35

Re: sim.setJointPosition is not working inside the callback function of subscriber in ROS.Please help me

I tested sim.setJointPosition and it works fine also in a ROS callback.

If your joint doesn't move, you have research the cause in the joint mode and the resulting behaviour. Make sure to read and understand Joint types and operation.
by fferri
12 Nov 2019, 08:34
Forum: General questions
Topic: sim.setShapecolor,
Replies: 2
Views: 68

Re: sim.setShapecolor,

You can add a drawing object with sim.addDrawingObject and fill with items via sim.addDrawingObjectItem as the robot passes around.

Check also what types of drawing objects you can add.
by fferri
31 Oct 2019, 08:58
Forum: General questions
Topic: CodeEditor loading problem
Replies: 4
Views: 121

Re: CodeEditor loading problem

zdenoB wrote:
31 Oct 2019, 08:01
ldd "$dirname/libv_rep.so" #replace libv_rep.so with the library that is having difficulties to load

but I don't know the name of Library behind CodeEditor.
libv_repExtCodeEditor.so
by fferri
31 Oct 2019, 08:53
Forum: General questions
Topic: object's collision state
Replies: 4
Views: 104

Re: object's collision state

Use simxCallScriptFunction to call a Lua function that uses sim.checkCollision?
by fferri
31 Oct 2019, 08:46
Forum: General questions
Topic: How to display the planned path?
Replies: 1
Views: 61

Re: How to display the planned path?

It can be done at least in two ways:
by fferri
30 Oct 2019, 09:10
Forum: General questions
Topic: How to smooth the path in V-rep
Replies: 1
Views: 76

Re: How to smooth the path in V-rep

Path smoothing (while maintaining path validity) can only be performed by OMPL via PathSimplifier::smoothBSpline which currently not integrated in the plugin but you could try to modify the plugin code ( v_repExtOMPL/plugin.cpp ), calling the function PathSimplifier::smoothBSpline in void simplifyPa...
by fferri
23 Oct 2019, 16:11
Forum: General questions
Topic: How to create laser cone source?
Replies: 10
Views: 233

Re: How to create laser cone source?

Not really understanding, sorry. But in V-REP you don't have lasers. What you can do is to use proximity sensors or vision sensors to simulate some of the properties of rays of light. Then you can create drawing objects ( sim.addDrawingObject ) to give a visual feedback (proximity sensors already do...
by fferri
23 Oct 2019, 13:48
Forum: General questions
Topic: How to change the gravity during the simulation
Replies: 1
Views: 67

Re: How to change the gravity during the simulation

Hello,

you can change the gravity in the general dynamics properties.

You can also change gravity programmatically via sim.setArrayParameter(sim.arrayparam_gravity,{gx,gy,gz}).

Alternatively, you can apply forces/torques to objects via sim.addForce and sim.addForceAndTorque.
by fferri
23 Oct 2019, 13:41
Forum: General questions
Topic: How to create laser cone source?
Replies: 10
Views: 233

Re: How to create laser cone source?

Hello,

what do you want to achieve in the end?